Example of communication for the CN-8031 module
1 Topology
2 Example of communication for Modbus Poll software with module
- 1.In IO Config software, it can view the default parameters of CN-8031 module, Modbus Tcp parameters: IP address (192.168.0.100).
- 2. Use IO Config software to monitor CN-8031 and the address table of the attached Io Module online.
Note: After the IO module is fixed in order, its Modbus address is fixed.
For example, the address table of the I/O modules is as follows:
The address area corresponding to CT-121F is:10000~10015,
The address area corresponding to CT-222F is:00000~00015,
The address area corresponding to CT-3134 is:30000~30003,
The address area corresponding to CT-4234 is:40000~40003.
3.Open the Modbus Poll software, click connection, select the MODBUS TCP, and the IP Address is 192.168.0.100, 502, click OK. Click Setup-Read/Write Define, select the function code, start address, and data length to monitor the value of the I/O module.
Power the DI0 of the CT-121F to 24V, assign 1 to the DO8 of the CT-222F, assign the AO0 channel of the CT-4154 to 3000, and connect the AI0 channel of the CT-3134 to the AO1 channel of the CT-4154 to 2000, and connect the AI1 channel of the CT-3134 at the same time.
- 4. Online diagnosis
On the interface of the Modbus poll software, use the Modbus 04 function code to capture the status input of the module as shown in the following figure:
It can see from the screenshot:
There is no DIP on the lower left side of the hardware, and the DIP value is 0 by default.
Module IP address 192.168.0.100.
The size of the input and output data of the module.
There is a value for the configuration port, that is, the online connection of the configuration software is configured.
The MODBUS TCP client has 1 connection here.
This application uses Siemens TIAV16 software, and Siemens PLC S7-1214C DC/DC/DC is used as a Modbus TCP client to connect to CN-8031 Modbus TCP adapter for test and demonstration.
Note: After the IO module is fixed in order, its Modbus address is fixed.
For example, the address table of the I/O modules is as follows:
The address area corresponding to CT-121F is:10000~10015,
The address area corresponding to CT-222F is:00000~00015,
The address area corresponding to CT-3168 is:30000~30007,
The address area corresponding to CT-4154 is:40000~40003,
1. Open the TIA software and create a new project 1200_MB_CLIENT.Click Add New Device - Select 6ES7 214-1AG4040-0XB0 - Click OK.
2. Select the PLC network port in the pop-up interface, set the Ethernet address parameters, add a new subnet PN/IE_1, and set the IP address 192.168.1.10 in the project.
3. Add a new block in the block drop-down menu, and add data blocks DB1 and DB2. DB1 is used to store read and write data, and DB2 is used to establish a connection between S7-1200 and CN-8031 (IP address of CN-8031: 192.168.1.100, configure software configuration).
Note: right-click DB1 and DB2 to select the properties, remove the √ before optimized block access.
4. In the program block drop-down menu, double-click Mian [OB1], find the http: // www.odotautomation.com 38 / 159 TEL: +86-0816-2538289 command on the right MB_CLIENT drag it to program section 1. Modify the parameters as shown in the figure.
- 5. After the setting is completed, save, compile and download.
6. Online monitoring of DB1 value. The first input channel of the CT-121F, DI0, is connected to a 24V power supply through an external wiring and the corresponding value can be monitored on DB1.
The second input channel of the CT-121F, DI1, is connected to a 24V power supply through an external wiring, and the corresponding value can be monitored on DB1.