105BCommunication processor
12.5 Modbus communication
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
581
10. Set the baud rate of the RS-485 serial interface:
P2010 Index 0= 4 (2400 baud)
5 (4800 baud)
6 (9600 baud)
7 (19200 baud
8 (38400 baud)
9 (57600 baud)
12 (115200 baud)
11. Enter the Slave address.
Each drive (a maximum of 31) can be operated over the bus.
P2011 Index 0=(0 to 31)
12. Set the serial link timeout.
This is the maximum permissible period between two incoming data
telegrams. This feature is used to turn off the inverter in the event of a
communications failure. Timing starts after a valid data telegram has been
received. If a further data telegram is not received within the specified time
period, the inverter will trip and display fault code F0070. Setting the value to
zero switches off the control.
P2014 Index 0=(0 to 65,535 ms)
0=timeout disabled
13. Transfer the data from RAM to EEPROM:
P0971=1 (Start transfer) Save the changes
to the parameter settings to EEPROM
12.5
Modbus communication
12.5.1
Overview of Modbus RTU and TCP communication
Modbus function codes
●
A CPU operating as a Modbus RTU master (or Modbus TCP client) can read/write both
data and I/O states in a remote Modbus RTU slave (or Modbus TCP server). Remote
data can be read and processed in the user program.
●
A CPU operating as a Modbus RTU slave (or Modbus TCP server) allows a supervisory
device to read/write both data and I/O states in a remote CPU. The supervisor device can
write new values in remote CPU memory that can be processed in the user program.
Table 12- 45 Read data functions: Read remote I/O and program data
Modbus function code
Read slave (server) functions - standard addressing
01
Read output bits: 1 to 2000 bits per request
02
Read input bits: 1 to 2000 bits per request
03
Read Holding registers: 1 to 125 words per request
04
Read input words: 1 to 125 words per request