How-To Modbus-Tcp Communication Between Celciux and NJ
How-To Modbus-Tcp Communication Between Celciux and NJ
How-To
Modbus-TCP communication between CelciuX and NJ
History
Table of contents
1 General ............................................................................................................................................................... 3
1.1 Validity ....................................................................................................................................................... 3
1.2 Motivation................................................................................................................................................... 3
2 CelciuX ............................................................................................................................................................... 4
2.1 Hardware requirements ............................................................................................................................. 4
2.1.1 Ethernet Module .................................................................................................................................... 4
2.1.2 End Unit ................................................................................................................................................. 4
2.1.3 Basic Unit ............................................................................................................................................... 4
2.2 Wiring ......................................................................................................................................................... 5
2.2.1 Power supply ......................................................................................................................................... 5
2.2.2 MX2 (Modbus RTU) ............................................................................................................................... 5
2.3 Setting up the system ................................................................................................................................ 6
2.3.1 MX2 parameters .................................................................................................................................... 6
2.3.2 Basic unit ............................................................................................................................................... 7
2.3.3 Ethernet Module .................................................................................................................................... 8
2.4 Read / Write to Modbus-RTU devices from NJ PLC ............................................................................... 10
2.4.1 Modbus functions (Function Codes) .................................................................................................... 10
2.4.2 Modbus-TCP Client for NJ ................................................................................................................... 11
2.4.3 Modbus registers for CelciuX modules ................................................................................................ 11
2.4.4 Modbus registers for MX2.................................................................................................................... 11
A. EJ1N-HFU-ETN Modbus Address ............................................................................................................... 12
1 General
1.1 Validity
This document describes the Modbus-TCP communication between Omron Sysmac PLC NJ and the Omron
CelciuX Ethernet gateway module.
1.2 Motivation
Sysmac NJ offers an onboard standard multifunctional Ethernet interface. The lower onboard Ethernet port on
Sysmac NJ offers real-time fieldbus EtherCAT. With the two interfaces any other fieldbus master on the PLC
should be avoided as far as possible.
The temperature controller CelciuX offers an interesting module (EJ1N-HFU-ETN) to communicate to host
controllers via Ethernet. The module is supposed to communicate with PROFINET protocol but can also be used
as a Modbus-TCP gateway without using PROFINET protocols at all.
The CelciuX Ethernet-TCP gateway (EJ1N-HFU-ETN) can be used either with CelciuX temperature units or as a
gateway for Modbus-RTU devices or even for both.
EJ1N-HFU-ETN can also be used as PROFINET IO communication. Host controller then will be PNT21 for Omron
PLCs. It also allows communication to CelciuX temperature units as well as to MX2-inverters or other Modbus-
RTU devices. For detailed instructions please refer to www.myomron.com.
2 CelciuX
2.1 Hardware requirements
2.1.1 Ethernet Module
An Ethernet module EJ1N-HFU-ETN is required for Ethernet communication. It must be placed at the very left
side.
2.2 Wiring
2.2.1 Power supply
DC 24V must be supplied to the End Unit.
On EJ1C-EDUA-NFLK: On EJ1C-EDUC-NFLK:
Pin 6 / B(+) to terminal SP of MX2 Pin 7 / B(+) to terminal SP of MX2
Pin 7 / A(-) to terminal SN of MX2 Pin 8 / A(-) to terminal SN of MX2
Terminate the RS-485 wiring only on the last MX2 in the network. The built-in resistor can be activated by the dip
switch.
3) Power on DC 24V
2.3.2.2 Communication
1) The USB-Serial conversion cable E58-CIFQ1 must be plugged in to the END UNIT (on very top plug)
Please also refer to CX-Thermo file 120621pk.cth. In the example two TC (basic units) are used
2) Open CX-ConfiguratorFDT
5) Click “Configure” to select the available Network Devices for Scanning and choose the appropriate Ethernet
Controller on your PC.
6) Click “Start Scan” and right click the EJ1N-HFU-ETN to set the IP-address.
Do deselect “Temporary Setting” to make sure, the IP-address is still valid after rebooting
7) The EJ1N-HFU-ETN can now be reached at this IP-address. CX-ConfiguratorFDT can be closed.
Following registers in the gateway EJ1N-HFU-ETN have to be set using Sysmac NJ-Controller:
2) Write Value 4 to register address 0200h. << RTU Baud Rate: 115’200 >>
Node address of EJ1N-HFU-ETN is FFh.
Important Notes:
Values will be written to the EEPROM. Means after restart, new value is still available. Therefore avoid cyclic writing
registers in EJ1N-HFU-ETN to save lifetime of EEPROM.
Important Notes:
Values will be written to the EEPROM. Means after restart, new value is still available. Therefore avoid cyclic writing
registers in EJ1N-HFU-ETN to save lifetime of EEPROM.
Important Notes:
Values will NOT be written to the EEPROM. Means after restart, previous values will be available.
To write values to EEPROM refer to chapter B-3-5 Store New Register Data (ENTER command) in the user manual.
MX2 Register address value (transmitted on Modbus line) is 1 less than the Register Number.
E.g. Register Number in the manual for frequency source is 0001h. When reading or writing to MX2 use Register
address 0000h!
The Register address can also be checked in CX-Drive and they are not shifted by 1.
E.g. Frequency source address is 0000h.
MX2 supports broadcast messages. This can be helpful for stopping, starting or resetting inverters at the same time.
But be aware of other slaves than MX2 in the network!
With node 0 all inverters are addressed simultaneously. With node address 250 to 254 blocks are addressed
simultaneously. E.g. Node address 250 means: broadcast to slave address 01 to 09.
For further details please refer to B-3-2 Message Configuration: Query in the user manual.
EJ1N-HFU-ETN does not support Modbus function codes to read or write into coils. Fortunately the
MX2 coils are mapped to the registers so coils can indirectly be accessed with supported function codes!
E.g. Register address 1F00h shows coil number 0001h to 000Fh
0003h Restore Indication R/W The amount of seconds that the product shall indicate the restore status
0004h Backup/Restore Error Indication R/W Switches on/off the indication that indicates backup or restore failure
0010h Assigned Nodes 1 R[1] Bit field indicating which nodes in the range of 1-15 are assigned using the PROFINET connection. The node number corresponds to
the bit number.
0011h Assigned Nodes 2 R[1] Bit field indicating which nodes in the range of 16-31 are assigned using the PROFINET connection. The node number corresponds to
the bit number + 16.
0: 9600
1: 19200
2: 38400
0: None
1: Even
2: Odd
0202h RTU Default Time-out R/W The default Modbus/RTU timeout
Range 100 - 25000 [ms]
1001h Node 1 Timeout R[1] The response time-out in 0.1s units for a Modbus request sent to Modbus RTU node 1
1002h Node 2 Timeout R[1] The response time-out in 0.1s units for a Modbus request sent to Modbus RTU node 2
1021h Node 1 Func 17h R[1] The property of Modbus node 1 whether it supports Modbus function 17h
1022h Node 2 Func 17h R[1] The property of Modbus node 2 whether it supports Modbus function 17h
1041h Node 1 Backup Total R[1] Amount of registers in the backup range for node 1
1042h Node 2 Backup Total R[1] Amount of registers in the backup range for node 2
... ... R[1] ...
105Fh Node 31 Backup Total R[1] Amount of registers in the backup range for node 31
1061h Node 1 Backup Start R[1] Backup range start address of node 1
1062h Node 2 Backup Start R[1] Backup range start address of node 2
... ... R[1] ...
107Fh Node 31 Backup Start R[1] Backup range start address of node 31
1081h Node 1 Retries R[1] Amount of retries for node 1 before reporting errors
1082h Node 2 Retries R[1] Amount of retries for node 2 before reporting errors
... ... R[1] ...
109Fh Node 31 Retries R[1] Amount of retries for node 31 before reporting errors
R = Read Only
W = Write Only
R/W = Read and Write