Modbus RTU Master
The Modbus RTU Master program is used to define the communication block in order to read and write
the data from and to the Modbus RTU Slave using the serial communication module.
Registering the Modbus RTU Master program
Select [File] -> [New Program] -> [MODBUS/RTU Master] menu.
Enter the Program Name, Program ID and Program Free Space (OnlineEdit Buffer).
Click the [OK] button.
Writing the Modbus RTU Master program
An example for controlling the MODBUS-RTU Slave using the Serial (SC0nn) module at local base, slot #0.
Communication block that reads 5 data from the coil status (Start Address: 0) of the Slave (station number: 1) and saves it in 5 bits from M0005.
Click [Add] button.
Counterparty’s Station Number: (1)
Function: (01 Read Coil Status)
Point Number: (1) Enter the number that is bigger than Start Address by 1.
Data Type: If the data to read is bit, the data type is meaningless.
Data Count: (5)
Device: (M0005)
If you don’t select "Do not transmit automatically" option, the communication block will be automatically processed.
Click [OK] button.
Communication block that writes 4 words from D00000 at the Multiple Registers (Start Address: 0) of the Slave (station number: 1)
Click [Add] button.
Counterparty’s Station Number: (1)
Function: (16 Preset Multiple Registers)
Point Number: (1) Enter the number that is bigger than Start Address by 1.
Data Type: (INT16: High order byte first)
Data Count: (4)
Device: (D00000)
If you don't select "Do no transmit automatically" option, the communication block will be automaticaly processed.
Click [OK] button.
You can change the block locations using the [Up] and [Down] buttons.