I-8124W DeviceNet Master API functions User’s Manual (V 1.6) 2021/10/04
93
BYTE cSlot = 0; //Assume that the I-8124 was plugged in the slot 0.
WORD Offset = 0;
WORD DataLen = 0;
BYTE DataArray[512] = {0};
//Read whole input data of all slave devices.
Offset = 0; //Read the data from the beginning of the input area.
DataLen = 4 + 4 + 4 + 6 + 6; //The sum of all slave
’s input length.
I8124_ReadInputArea (cSlot, Offset, DataLen, DataArray);
DataArray = [The whole input data of all slave devices];
//Read input data of the slave device which ID = 5.
Offset = 4 + 4; //Read the data from the beginning of the ID = 5.
DataLen = 4; //The input length of the ID = 5.
I8124_ReadInputArea (cSlot, Offset, DataLen, DataArray);
DataArray = [The input data of the slave device which ID = 5];