GX5296, GX5961, GX5964, File
Writes the record memory contents.
GtDio6xWriteRecordMemory (nHandle, lChannelCount, palChannelList, lRecordStart, lRecordCount, pucRecordArray, 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. |
lRecordStart |
LONG |
Used to specify the offset into the Record Memory to start write to (0-262143). |
lRecordCount |
LONG |
Used to specify the number of elements in the record array as well as the number of elements to write. (1-262144). |
pucRecordArray |
PBYTE |
Used to write the Record array. Each element in the array contains one bit. Each bit can represent a recorded logic HI (1) or logic LO(0) when the Step record mode is Response, and Error (1) or No Error (0) when the Step record mode is Error. This array must be at least lChannelCount*lRecordCount bytes in size. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
The record memory contains either the error data (1 = error, 0 = no error) or response data (1 = logic high, 0 = logic low).
The error/response selection is programmed per step by the GtDio6xStepSetRecordMode function.
Each element of the byte array pucRecordArray, contains one bit of information that represents the record data (1 or 0) for one channel/vector pair.
The following example writes 15 elements of record data starting at address 10 for channels 1, 3 and 5 and then read back those channels:
LONG alChannelList[3];
BYTE aucWriteRecordArray[15*3];
BYTE aucReadRecordArray[15*3];
SHORT nStatus;
// Fill the channels array
alChannelList[0]=1;
alChannelList[1]=3;
alChannelList[2]=5;
GtDio6xWriteRecordMemory(nHandle, 3, alChannelList, 10, 15, aucWriteRecordArray, &nStatus);
// Read it back
GtDio6xReadRecordMemory(nHandle, 3, alChannelList, 10, 15, aucReadRecordArray, &nStatus);
GtDio6xReadRecordMemory, GtDio6xStepSetRecordMode, GtDio6xWriteVectorMemory, GtDio6xReadVectorMemory, GtDio6xGetErrorString