GX5055, File
Reads a block of data to the valid data memory of the specified board (Master or Slave).
DioReadValidDataMemory (nHandle, pvMemory, dwStart, dwSize, pnStatus)
Name |
Type |
Comments |
nMasterHandle |
SHORT |
Board or File board handle. |
pvMemory |
PVOID |
Pointer to an array, array data type is Double Word (DWORD) and maximum array size is 512K of double words. |
dwStart |
DWORD |
Starting address to write. |
dwSize |
DWORD |
Number of steps to write. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The program counter will be set to zero upon return.
The input voltage can be inside one of the following ranges:
● Input voltage is higher than high voltage threshold, input is logic high. Data will be logged as logic high to the input memory and 0 to the invalid logic level input memory.
● Input voltage is lower than low voltage threshold, input is logic low. Data will be logged as logic low to the input memory and 0 to the invalid logic level input memory.
● Input voltage is higher than low voltage threshold and lower then high voltage threshold, input is invalid. Data will be logged as logic low to the input memory and 1 to the invalid logic level input memory.
Note: The board must be in HALT state before calling this function.
The following example writes 64 steps to the Master board’s valid data memory beginning at step 128:
DWORD adwData[64];
DioReadValidDataMemory (nHandle, adwData, 128, 64, &nStatus);
DioWriteValidDataMemory, DioWriteCtrlMemory, DioReadCtrlMemory, DioReadInMemory, DioReadOutMemory