beckhoff TS6250 — 7.1.4 FB_MBReadInputRegs (Modbus function 4)

PLC libraries After a rising edge of "bExecute" and successful execution of the ReadRegs command, the content of registers 25 and 26 is in the arrData array: Requirements 7.1.4 FB_MBReadInputRegs (Modbus function 4) This function is used for reading 1 to 128 input registers (16 bit). Endian VAR_INPUT VAR_INPUT sIPAddr : STRING(15); nTCPPort : UINT:= MODBUS_TCP_PORT; nUnitID : BYTE:=16#FF; nQuantity : WORD; nMBAddr : WORD; cbLength : UDINT; pDestAddr : UDINT; bExecute : BOOL; tTimeout : TIME; END_VAR sIPAddr : Is a string containing the IP address of the target device. TS6250 24 Version:

1.2 Register Array offset Status 25 1 0x1234 ( as byte 0x34 0x12) 26 2 0x5563 ( as byte 0x63 0x55) Development environment Target system type PLC libraries to be linked TwinCAT v2.8.0 PC (i386) TcModbusSrv.Lib