PLC libraries After a rising edge of "bExecute" and successful execution of the ReadInputs command, the content of digital inputs 30 - 49 is written into the arrData array: Requirements 7.1.3 FB_MBReadRegs (Modbus function 3) This function is used for reading 1 to 128 output registers (16 bit). The first byte contains the lower eight bits and the second byte the upper eight bits. VAR_INPUT VAR_INPUT sIPAddr : STRING(15); nTCPPort : UINT:= MODBUS_TCP_PORT; nUnitID : BYTE:=16#FF; nQuantity : WORD; TS6250 22 Version:
1.2 Digital outputs Array offset Status 29-36 1 0x34 The status of inputs 36 is the MSB of this byte (left) The status of inputs 29 is the LSB of this byte (right) 37-44 2 0x56 The status of inputs 44 is the MSB of this byte (left) The status of inputs 37 is the LSB of this byte (right) 45-49 3 0x07 Since only 20 outputs are to be read, the remaining bits (5-8) are set to 0. Development environment Target system type PLC libraries to be linked TwinCAT v2.8.0 PC (i386) TcModbusSrv.Lib