Example

Example:
MODBUS interface of the client COM1
Client writes to Server 1
Data

adwWriteDWord[0] := 18DEC = 00000012HEX;

adwWriteDWord[1] := 65561DEC = 00010019HEX;

Source address at client adwWriteDWord : ARRAY[0..1] OF DWORD;
Target address at server %MD0.8192 : 4000HEX = 16384DEC
The values of the Double WORD variables adwWriteDWord[0].. adwWriteDWord[1] on the client are written to %MD0.8192..%MD0.8193 on the server.
MODBUS request of the client
Server address Function code Server operand address Number of words Number of bytes Data Data Data Data CRC
High / Low High / Low   High / Low High / Low High / Low High / Low High / Low
01HEX 10HEX 40HEX / 00HEX 00HEX / 04HEX 08HEX 00HEX / 00HEX 00HEX / 12HEX 00HEX / 01HEX 00HEX / 19HEX 60HEX / B3HEX
MODBUS response of the server
Server address Function code Server operand address Number of words CRC
High Low High Low High Low
01HEX 10HEX 40HEX 00HEX 00HEX 04HEX DAHEX 0AHEX
Parameterization \ of the COM_MOD_MAST Function Block inputs
EN COM SLAVE FCT TIMEOUT ADDR Number of words = 2 x Number of double words DATA

FALSE

-> TRUE

1 1 16 Application- specific 16384 4 ADR (adwWriteDWord[0])