GX5296, GX5961, GX5964, File
Fills the Vector memory with a predefined set of Vectors
GtDio6xFillVectors (nHandle, lChannelCount, palChannelList, lVectorStart, lVectorSize, nFillType, ucHighOpcode, ucLowOpcode, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Session identifier:● Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization. ● File handle is used when communicating with a file. The File handle session identifier is returned by calling GtDio6xFileOpen. |
lChannelCount |
LONG |
Used to specify the number of channels in the Channel List Array. |
palChannelList |
LONG |
An array to specify the channels to write to.Not supported by auxiliary channels. |
lVectorStart |
LONG |
Used to specify the start vector. |
lVectorSize |
LONG |
Used to specify the number of vectors to write. |
nFillType |
SHORT |
Used to specify the type of Vector to fill with Vector Memory with.0. GTDIO6X_FILL_VECTORS_OP: Fill Vector Memory with the High Opcode.1. GTDIO6X_FILL_VECTORS_CLOCK: Fill Vector Memory with an alternative clock type vector where the alternating states are ucHighOpcode and ucLowOpcode.2. GTDIO6X_FILL_VECTORS_RAMP: Fill Vector Memory with a ramp type vector where a “High” state is represented by the ucHighOpcode, and a “Low” state is represented by ucLowOpcode.3. GTDIO6X_FILL_VECTORS_INCREMENT: Fill Vector Memory with an incrementing patter type where a “High” state is represented by the ucHighOpcode and a “Low” state is represented by ucLowOpcode. |
ucHighOpcode |
BYTE |
The Opcode representing a “High” state in the fill vector. The Opcodes are enumerated in the Comments section below. |
ucLowOpcode |
BYTE |
The Opcode representing a “Low” state in the fill vector. The Opcodes are enumerated in the Comments section below. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
The vector data is expressed as an ASCII code described below:
Pin Action |
Data OpCode |
Disable channel |
'Z’ |
Collect CRC |
'C' |
Drive Low |
'0' |
Drive High |
'1' |
Repeat Previous Code |
'R' |
Invert Previous Code |
'I' |
Expect Valid Low |
'L' |
Expect Valid High |
'H' |
Expect Valid |
'V' |
Expect Invalid |
'B' |
Drive Low, Expect Low |
'I' |
Drive High, Expect High |
'h' |
Drive Low, Expect High |
'/' |
Drive High, Expect Low |
'\' |
The following example fills the vector memory with a clock vector (alternating between ‘h’ and ‘l’ opcodes) in the first 1000 vectors for channels 0 to 63:
LONG alChannelListArray [64];
SHORT nStatus, i;
for (i=0; i<64; i++)
alChannelListArray[i]=i;
GtDio6xFillVectors(nHandle, 64, alChannelListArray, 0, 1000, GTDIO6X_FILL_VECTORS_CLOCK, ‘h’, ‘l’, &nStatus);
GtDio6xReadVectorMemory, GtDio6xWriteVectorMemory, GtDio6xGetErrorString