GX5290, G5295, File
Reads a block of mask memory from the specified board (Master or Slave).
DioRealTimeCompareReadMaskMemory (nHandle, pvMemory, dwStart, dwSize, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Board or File Board handle. |
pvMemory |
PVOID |
Pointer to an array, array data type needs to comply with the I/O width settings and board type, see comments for details. |
dwStart |
DWORD |
Starting step to read from. |
dwSize |
DWORD |
Number of steps to read. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The program counter will be set to zero upon return.
Number of Channels |
Array Type |
32 |
Array data type is Double Word (DWORD) when I/O configuration is set to 32-bits width (default).GX5291: Maximum array size is 32M of double words.GX5292: Maximum array size is 64M of double words.GX5293: Maximum array size is 64M of double words.GX5295: Maximum array size is 64M of double words. |
16 |
Array data type is Word (WORD) when I/O configuration is set to 16-bits width (channels 0-15).GX5291: Maximum array size is 64M words.GX5292: Maximum array size is 128M words.GX5293: Maximum array size is 128M words.GX5295: Maximum array size is 128M words. |
8 |
Array data type is Byte (BYTE) when I/O configuration is set to 8-bits width (channels 0-7).GX5291: Maximum array size is 128MB.GX5292: Maximum array size is 256MB.GX5293: Maximum array size is 256MB.GX5295: Maximum array size is 256MB. |
Note: The board must be in HALT state before calling this function.
The board has to be in Real Time Compare operating mode prior calling this function. See the DioDomainSetupOperatingMode function for more details.
Note: the Real Time Compare functionality is supported by GX529x boards with firmware versions 0x8A00 and above.
The following example reads 64 steps from the Master board expected memory beginning at step 128:
DWORD adwMemory[64];
DioRealTimeCompareReadMaskMemory (nHandle, adwMemory, 128, 64, &nStatus);
DioRealTimeCompareSetupConditionValue, DioRealTimeCompareSetupDataDelay, DioRealTimeCompareSetupInputDataClockEdge, DioRealTimeCompareSetupResultsDataType, DioRealTimeCompareSetupStopCondition, DioRealTimeCompareWriteExpectedMemory, DioRealTimeCompareWriteMaskMemory, DioRealTimeCompareReadResults