Modbus Protocol
Modbus protocol is an industry-wide serial communications standard supported by many PLC and industrial controls manufacturers. There are two serial Modbus protocols: Modbus RTU and Modbus ASCII. Both protocols can be recognized by most SIXNET stations and I/O modules over their serial port(s).
There are two Open Modbus protocols for Ethernet communication: Modbus/UDP and Modbus/TCP. Both protocols can be recognized by SIXNET stations and I/O modules that have Ethernet port(s).
For more information on Modbus protocol refer to the Modicon Modbus Protocol Reference Guide, available from Modicon.
Modbus Support in SIXNET I/O
Most SIXNET stations and I/O modules can be configured to send and/or receive Modbus RTU or Modbus ASCII messages. The "Modbus ASCII Slave" and "Modbus RTU Slave" modes for serial ports allow the station to respond to Modbus commands from a Modbus master device such as a PLC or touchscreen display. Here are some of the Modbus capabilities of SIXNET I/O:
- Most SIXNET stations and I/O modules can receive Modbus RTU or ASCII messages through their serial port(s) and/or Ethernet port. Each serial port can be individually configured to recognize Modbus ASCII or Modbus RTU protocol. A SIXNET Ethernet port will recognize either protocol automatically. No protocol configuration is necessary.
- IPm stations, VersaTRAK RTUs, SixTRAK programmable gateways and the ET-GT-ST-# Ethernet I/O Concentrators can be configured to send Modbus ASCII or Modbus protocol over their serial port(s). The "Modbus ASCII Master" and "Modbus RTU Master" modes allow the station to send Modbus commands to Modbus compatible devices such as loop controllers and motor drives.
- IPm stations with version 1.5 or newer firmware can be configured to send Modbus/UDP or Modbus/TCP protocol over their Ethernet port(s) to Modbus compatible devices.
- SIXNET stations will respond to Modbus commands sent to their own station number.
The Modbus master and slave modes for serial ports are selected from within the configuration windows for the station.
Modbus Passthru Communication
EtherTRAK modules and Ethernet gateways can act as media converters, passing Modbus ASCII or Modbus RTU protocol from their Ethernet port to their RS485 or RS232 port. Note that the incoming and outgoing protocols must match each other for the passthru mode to work properly.
Modbus/TCP (Open Modbus) over Ethernet
Most SIXNET stations can receive Modbus protocol over Ethernet TCP/IP. This support is based on the Modicon Open Modbus/TCP Specification.
SIXNET stations with Modbus/TCP capability include:
- EtherTRAK modules and Ethernet gateways manufactured after November 1999
- All IPm stations
- SixTRAK programmable Ethernet gateways and VersaTRAK RTUs with gateway / RTU firmware version 2.16 and newer
- The ET-GT-ST-# Ethernet I/O Concentrators
IPm stations with version 1.5 or newer firmware can be configured to send Modbus/UDP or Modbus/TCP protocol over their Ethernet port(s) to Modbus compatible devices. This capability requires the optional SCS Feature Set of the SIXNET I/O Tool Kit.
Modbus Commands Supported by SIXNET
SIXNET stations support the following Modbus commands as described in the AEG Modicon document, Modicon Modbus Protocol Reference Guide PI-MBUS-300 Rev. E. RemoteTRAK and EtherTRAK modules support only the command(s) that apply to their I/O type(s).
Modbus commands that a SIXNET station may reply to:
01 - Read multiple discrete outputs
02 - Read multiple discrete inputs
03 - Read multiple analog outputs
04 - Read multiple analog inputs
05 - Write a single discrete output
06 - Write a single analog output
15 - Write multiple discrete outputs
16 - Write multiple analog outputs
Modbus commands that a SIXNET station may send in Modbus I/O Transfer messages:
01 - Read multiple discrete outputs
02 - Read multiple discrete inputs
03 - Read multiple analog outputs
04 - Read multiple analog inputs
06 - Write a single analog output
15 - Write multiple discrete outputs
16 - Write multiple analog outputs
Modbus Addressing Versus SIXNET Addressing
Many SIXNET products can be configured to send and/or receive Modbus protocol. When configuring a hardware device or HMI software to send Modbus commands to SIXNET hardware, specify the appropriate "SIXNET as Modbus" data type number and starting Modbus address. Refer to the "SIXNET as Modbus" columns in the chart below. When configuring a SIXNET programmable station to send Modbus commands (using I/O Transfers) to a non-SIXNET device, you can specify a Modbus data type number and an appropriate starting Modbus address that is anywhere within the "Maximum Modbus Address Range". If a SIXNET programmable station will be sending Modbus commands to another SIXNET station configured to respond to Modbus protocol, specify the appropriate "SIXNET as Modbus" data type number and starting Modbus address. Refer to the "SIXNET as Modbus" columns in the chart below.
Notes:
- A colon separator has been placed between the type number and the address for visual purposes only. Do not include a colon when entering Modbus addresses.
- Each "Generic Modbus" address range shown is the maximum range of registers supported by the protocol conversion software in the SIXNET station. SIXNET Ethernet and RS485 I/O modules typically report only the I/O that they have.
- "SIXNET as Modbus" address ranges for Short Integer Ins / Outs, Long Integer Ins / Outs (register pairs) and Floating Point Ins / Outs (register pairs) do not start at 0. This was done intentionally so the address blocks wouldn’t collide with one another or with the Analog In and Analog Out blocks.
- The "SIXNET as Modbus" address ranges can be changed in IPm-based controllers to allocate more or fewer addresses as needed. The address ranges can be changed from within the "Advanced" page of the IPm configuration windows in the SIXNET I/O Tool Kit. Refer to the help for the SIXNET I/O Tool Kit for more information. These settings affect how an IPm controller will respond to Modbus commands. The settings do not affect Modbus I/O Transfer commands sent to Modbus-compatible devices.
When Using Register Pairs (two 16 bit registers):
When Using Daniel Extensions (one 32 bit register):
Examples:
- Modbus data address 1:0001 equates to SIXNET discrete input 0.
- Modbus data address 1:0006 equates to SIXNET discrete input 5.
- Modbus data address 3:0001 equates to SIXNET analog input 0.
- Modbus data address 3:0003 equates to SIXNET analog input 2.
- Modbus data address 0:0001 equates to SIXNET discrete output 1.
- Modbus data address 0:0006 equates to SIXNET discrete output 5.
Examples for floating point and long integer I/O are shown in the help topics for those I/O types.
Reading and Writing Long Integer and Floating Point Values
Two transfer formats are supported for reading and writing long integer and floating point values: standard Modicon Protocol and Daniel extensions.
- The standard Modicon protocol supports the transfer of each floating point or long integer value as a pair of consecutive 16-bit analog registers.
- Daniel extensions to Modbus commands 3, 4 and 16 allow the transfer of each floating point or long integer value as a single 32-bit register.
SIXNET Modbus Slave Operation:
IPm, SixTRAK and VersaTRAK stations can be configured to use Daniel extensions or the standard Modicon protocol when responding to Modbus commands for long integer or floating point registers.
SIXNET Modbus Master Operation:
IPm, SixTRAK and VersaTRAK stations can be configured to use Daniel extensions or the standard Modicon protocol when sending Modbus commands to read or write long integer or floating point registers. Daniel extension support can be enabled or disabled on a per-I/O transfer basis. When Daniel extension support is disabled, floating point and long integer registers are transferred as a pair of analog registers.
When configuring your SIXNET station, do not check the "Use Daniel Extension" checkbox if your Modbus master or slave device uses the Modicon (two 16-bit registers) method.
Note: EtherTRAK high-speed counter modules (ET-8CNT) do not support Daniel extensions. The 32 bit registers in this module are each read as a pair of 16 bit registers only.
Refer to the following topics for more information on the two transfer modes.
Transferring Longs and Floats as a Pair of Analog Registers
Note: The information in this help topic applies when exchanging longs and/or floats among SIXNET stations configured to respond to Modbus protocol. Other Modbus compatible equipment may be addressed differently.
The standard Modicon protocol supports the transfer of each floating point or long integer value as a pair of consecutive 16-bit analog registers. Some SIXNET stations can be configured with I/O transfers to read / write longs and floats.
In the station’s I/O transfer definition, specify the "First Register Number" of the remote station as an odd-numbered Modbus address or as an even-numbered SIXNET equivalent address. (Each even-numbered Modbus register contains the second half of the 32-bit value.) Refer to the Modbus Addressing Versus SIXNET Addressing topic for Modbus addressing information.
Here are some Modbus address examples. The first digit is the type number. The last 4 digits are the address. Note that a colon separator has been placed between the type number and the address for visual purposes only. Do not include the colon when entering a Modbus address.
3:5001 = Long input 0 of the station 4:5001 = Long output 0 of the station
3:5003 = Long input 1 of the station 4:5003 = Long output 1 of the station
3:5007 = Long input 3 of the station 4:5007 = Long output 3 of the station
3:7001 = Floating input 0 of the station 4:7001 = Floating output 0 of the station
3:7003 = Floating input 1 of the station 4:7003 = Floating output 1 of the station
3:7007 = Floating input 3 of the station 4:7007 = Floating output 3 of the station
Transferring Longs and Floats as 32 Bit Registers
Note: The information in this help topic applies when exchanging longs and/or floats among SIXNET stations configured to respond to Modbus protocol. Other Modbus compatible equipment may be addressed differently.
Daniel extension support is provided by some Modbus master and slave devices as a means of transferring floating point and long integer values as 32-bit registers. These extensions are detailed in the Daniel Industries document, Modbus Communications 2500 Host-Slave Communications Part Number 3-9000-545 Rev. C.
Some SIXNET stations can be configured with I/O Transfers to read / write longs and floats.
In the station’s I/O transfer definition, specify the "First Register Number" of the remote station as a Modbus address or as a SIXNET equivalent address. You can specify an odd or even first register address, as opposed to specifying only an odd-numbered Modbus address when transferring floats and longs as a pair of registers.
Here are some Modbus address examples. The first digit is the type number. The last 4 digits are the address. Note that a colon separator has been placed between the type number and the address for visual purposes only. Do not include a colon when entering a Modbus address.
DLI:0001 = Long input 0 of the station DLO:0001 = Long output 0 of the station
DLI:0002 = Long input 1 of the station DLO:0002 = Long output 1 of the station
DLI:0004 = Long input 3 of the station DLO:0004 = Long output 3 of the station
DFI:0001 = Floating input 0 of the station DFO:0001 = Floating output 0 of the station
DFI:0002 = Floating input 1 of the station DFO:0002 = Floating output 1 of the station
DFI:0004 = Floating input 3 of the station DFO:0004 = Floating output 3 of the station
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking here or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement