How Can We Help?
< All Topics
Print

SJ-Ether Modbus/TCP communication(master)

Question

Question

I want to use modbus/TCP communication with the SJ-Ether series as the master station.
What should I do?

Answer

Answer

For details, see Chapter 4-4-4 Modbus/TCP Communication in the SJ-Ether User’s Manual.
(For slave station settings, see the product manual of each company you are using.)

The outline of the procedure for using SJ-Ether is as follows.
1.Set the IP address and subnet mask of SJ-Ether in Port3 of “PLC”-> “PLC Setup”-> “COM Port Setup” of KPP (Kostac PLC Programming software).
2.Check “Modbus/TCP Client and Server” for protocol settings.
3.Click “Modbus/TCP Client-Server”.
4.Set the “Timeout” / “Retrie” / “Timeout time” in the client (master) settings.
5.The server (slave) setting may be the factory default value, but if it overlaps with the TCP port number you want to use at the master station, change it.
6.If you want to write data from SJ-Ether to the slave station, use the EWX instruction.
7.If you want to read the data of the slave station into SJ-Ether, use the ERX instruction.
The details of the ERX / EWX instruction are explained in detail in the help of KPP.

How to use ERX instructions

plc-38-1

No Setting items explanation
1 Protocol MODBUS
2 CPU Port Number SJ-Ether:COM Port3 fixed.
3 Slave Address Check the manuals of each slave product company.
(Slave ID and unit ID may be written)
(If you don’t know, try zero)
4 Function Code Specify the function to be used when reading.
5 Start Slave Memory Address Specify the start address of the device you want to read.
6 Start Master Memory Address Where to bring the read data to SJ-Ether.
Specify the start address.
7 Number of Elements Specify the size of the data you want to read.
8 Modbus Data type Specify the Modbus data format.
9 Slave IP address Specify the IP address of the other device you want to read.
10 Slave TCP Port Number Specify the TCP port number to be used when reading.
11 Receiving Specify the SJ-Ether device to be used as the receiving flag.
12 Success Specify the SJ-Ether device to be used as the reception success flag.
13 Error Specify the SJ-Ether device to be used as the reception error flag.
14 Exception Response(Error Code) When a reception error occurs, specify the SJ-Ether device that stores the error details.

How to use the EWX instruction

plc-38-2

No Setting items explanation
1 Protocol Modbus
2 CPU Port Number SJ-Ether : COM Port3 fixed.
3 Salve Address Check the manuals of each slave product company.
(Slave ID and unit ID may be written)
(If you don’t know, try zero)
4 Function Code Specify the function to be used when writing.
5 Start Slave Memory Address Specify the start address of the device you want to write to.
6 Start Master Memory Address Which data of SJ-Ether is written to the other party.
Specify the start address.
7 Number of Elements Specify the size of the data you want to write.
8 Modbus Data Type Specify the Modbus data format.
9 Slave IP Address Specify the IP address of the other device you want to write to.
10 Slve TCP Port Number Specify the TCP port number to use when writing.
11 Sending Specify the SJ-Ether device to be used as the sending flag.
12 Success Specify the SJ-Ether device to be used as the transmission success flag.
13 Error Specify the SJ-Ether device to be used as the transmission error flag.
14 Exception Response(Error Code) When a transmission error occurs, specify the SJ-Ether device that stores the error details.

Inquiry

Table of Contents