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 setting”-> “general-purpose communication port setting” of KPP (Koyo PLC Programming software).

(2) Check “Modbus / TCP Client and Server” for protocol settings.

(3) Click “Modbus / TCP Clients and Servers”.

(4) Set the timeout / retry count / 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

ERX

Setting items explanation
protocol MODBUS
CPU communication port number SJ-Ether communication port number. 3 fixed.
Communication partner station code Check the manuals of each slave product company.
(Slave ID and unit ID may be written)
(If you don’t know, try zero)
Function code Specify the function to be used when reading.
Memory device of the other party Specify the start address of the device you want to read.
Data storage destination device Where to bring the read data to SJ-Ether.
Specify the start address.
Data size Specify the size of the data you want to read.
data type Specify the MODBUS data format.
Slave IP address Specify the IP address of the other device you want to read.
TCP port number Specify the TCP port number to be used when reading.
Receiving Specify the SJ-Ether device to be used as the receiving flag.
success Specify the SJ-Ether device to be used as the reception success flag.
error Specify the SJ-Ether device to be used as the reception error flag.
Error response storage location When a reception error occurs, specify the SJ-Ether device that stores the error details.

How to use the EWX instruction

EWX

Setting items explanation
protocol MODBUS
CPU communication port number SJ-Ether communication port number. 3 fixed.
Communication partner station code Check the manuals of each slave product company.
(Slave ID and unit ID may be written)
(If you don’t know, try zero)
Function code Specify the function to be used when writing.
Memory device of the other party Specify the start address of the device you want to write to.
Data storage destination device SJ-Which data of Ether is written to the other party.
Specify the start address.
Data size Specify the size of the data you want to write.
data type Specify the MODBUS data format.
Slave IP address Specify the IP address of the other device you want to write to.
TCP port number Specify the TCP port number to use when writing.
sending Specify the SJ-Ether device to be used as the sending flag.
success Specify the SJ-Ether device to be used as the transmission success flag.
error Specify the SJ-Ether device to be used as the transmission error flag.
Error response storage location When a transmission error occurs, specify the SJ-Ether device that stores the error details.

Product

Related manual

Related keywords

Inquiry

Previous SJ-Ether EtherNet/IP communication
Next SJ-Ether Modbus/TCP communication(slave)
Table of Contents