I-8124W DeviceNet Master API functions User’s Manual (V 1.6) 2021/10/04
97
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 back the whole output data of all slave devices.
Offset = 0; //Read back the data from the beginning of the output area.
DataLen = 5 + 4 + 5 + 8 + 7; //The sum of all slave
’s output length.
I8124_ReadbackOutputArea (cSlot, Offset, DataLen, DataArray);
DataArray = [The whole output data];
//Read back the output data of the slave device which ID = 5.
Offset = 5 + 4; //Read back the data from the beginning of the ID = 5.
DataLen = 5; //The output length of the ID = 5.
I8124_WriteOutputArea (cSlot, Offset, DataLen, DataArray);
DataArray = [The output data of the ID = 5];