GX5296, GX5961, GX5964, File
Returns the record memory contents.
GtDio6xReadRecordMemory (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 read from, channels numbers are 0-based and refers to any channel in the Domain.Not supported by auxiliary channels. |
lRecordStart |
LONG |
Used to specify the offset into the Record Memory to start reading from:GX5961/GX5964:0-262143.GX5926:0- 67108863. |
lRecordCount |
LONG |
Used to specify the number of elements in the record array as well as the number of elements to read.GX5961/GX5964:1-262143.GX5926:1- 67108863. |
pucRecordArray |
PBYTE |
Used to return the Record array. Each element in the array contains one bit that 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);
GtDio6xWriteRecordMemory, GtDio6xStepSetRecordMode, GtDio6xWriteVectorMemory, GtDio6xReadVectorMemory, GtDio6xGetErrorString