PLC libraries After a rising edge of "bExecute" and successful execution of the ReadRegs command, the content of registers 3-5 is in the arrData array: Requirements 7.1.5 FB_MBWriteSingleCoil (Modbus function 5) This function is used for writing a single digital output (coil). Bit access is used. VAR_INPUT VAR_INPUT sIPAddr : STRING(15); nTCPPort : UINT:= MODBUS_TCP_PORT; nUnitID : BYTE:=16#FF; nMBAddr : WORD; nValue : WORD; bExecute : BOOL; tTimeout : TIME; END_VAR sIPAddr : Is a string containing the IP address of the target device. nTCPPort : Port number of the target device. TS6250 26 Version:
1.2 Register Array offset Status 3 1 0x4543 ( as byte 0x43 0x45) 4 2 0x5234 ( as byte 0x34 0x52) 5 3 0x1235 ( as byte 0x35 0x12) Development environment Target system type PLC libraries to be linked TwinCAT v2.8.0 PC (i386) TcModbusSrv.Lib