PLC libraries nWrQuantity : WORD; nWrMBAddr : WORD; arrRdData : ARRAY [1..9] OF WORD; arrWrData : ARRAY [1..9] OF WORD; END_VAR After a rising edge of "bExecute" and successful execution of the ReadWriteRegs command, arrRdData contains the read register data, and the data from arrWrData are written to the registers. Requirements 7.1.10 FB_MBDiagnose (Modbus function 8) The diagnosis function provides a series of tests for checking the communication system between the master and the slave and for examining a variety of internal error states within the slave. VAR_INPUT VAR_INPUT sIPAddr : STRING(15); nTCPPort : UINT:= MODBUS_TCP_PORT; nUnitID : BYTE:=16#FF; nSubFnc : WORD; nWriteData :
WORD; bExecute : BOOL; tTimeout : TIME; END_VAR sIPAddr : Is a string containing the IP address of the target device. TS6250 35 Version: 1.2 Development environment Target system type PLC libraries to be linked TwinCAT v2.8.0 PC (i386) TcModbusSrv.Lib