
MODBUS is a commonly used industrial communications protocol which enables the exchange of data between process control equipment and computers or HMIs (Human Machine Interface). It was originally designed for Modicon PLCs (Programmable Logic Controllers) and has become widely used by many process control vendors.
MODBUS is widely used and is a simple protocol, which allows a common means of gathering data to a central location. Typically a PC running a SCADA (Supervisory Control And Data Acquisition) software in one location to gather data from various processes around the factory and setting values in the process control instruments.
Devices using MODBUS communicate using a master-slave arrangement, where only one device (the master) can initiate requests to ether read a value, or write (set) a value. The values are ether analogue (numeric) or digital (on/off). The Master would normally be the PC / HMI running SCADA software which communicates with each of the slave devices.
The slaves respond by supplying the requested data to the master, or by taking the action requested. A request to an individual slave will prompt a reply from that slave back to the master. A broadcast message can be sent to all slaves but no acknowledgement (reply) is received, as all the slaves would transmit at the same time, causing errors.
The Modbus protocol establishes the format for the master's query address, a function code defining the requested action, any data to be sent, and an error-checking field. If the master request is not a broadcast message, the slave's response message is also constructed using the Modbus protocol. It contains fields confirming the action taken, any data to be returned, and an error-checking field. If an error occurred in receipt of the message, or if the slave is unable to perform the requested action, the slave will construct an error message and send it as its response.
No, they are different protocols and not compatible.
No, they are different protocols and not compatible. A converter from MODBUS serial to MODBUS TCP/IP Ethernet can be used.
See the MODBUS Protocol Guide at: http://www.modbus.org/tech.php
A master-slave technique is one in which only one device (the master) can initiate queries. The other devices (the slaves) respond by supplying the requested data to the master, or by taking the action requested in the query. There can only be one Master on the network. The slave devices all have unique communications addresses in the range 1-247. Broadcast messages are sent to address 0, which all slaves respond to (hopefully) but do not reply to
To create a network, the devices must use a muti-drop network and each of the slaves must have a unique communication address. Data Track's instruments use a electrically isolated 2-wire RS485 interface. Some of the older instruments can also be used in 4-wire (RS422 / RS485) mode.
These are standards for serial communications that define the wiring, signal levels, transmission baud rates and parity checking.
There is no advantage to 4-wire (full duplex) mode when using Modbus as the protocol defines that only one device can transmit at a time.
Do not confuse the electrical standard (e.g. RS485) with the protocol (e.g. Modbus). Protocols define how the data is organised while the electrical standards determine how the data is physically transmitted. There are many different protocols that can be used on serial RS-232, RS-422 and RS-485 wired systems.
There are RS485 repeaters commercially available. A repeater replaces the 32nd device and then another 32 devices can be connected bringing the total to 61 slaves. Further repeater/slaves can be connected however the communication speed should be considered. If the master software allows two serial ports to be used simultaneously then this may be a better method of expanding the network.
The factory default address is set to 1. On our panel meters, the first parameter in the COM menu is the address number. For the Tracker 300 the communication address is set in the communications menu. See the product manuals for details. Two slaves with the same address will cause errors.
The manuals show connection details. Manuals are available from the download section on this web site. Use 2-wire mode if possible.
The RS-485 interface can withstand swapped wires. All Tracker RS485 interfaces are electrically isolated.
Yes. There may be high voltages present on the other terminals.
On RS485 connections, the maximum distance is 1200 meters without repeaters.
A shielded #22AWG cable with twisted pairs and foil screen is recommended. The screen should be connected to earth (ground) at the PC/HMI end only.
Our default for Modbus RTU is 9600 baud, 1 stop bit, no Parity (None). Often only the communications address needs to be changed. On our older products you will need to manually change Parity to None and turn the RTU parameter to ON.
ASCII was the original Modbus method of transmitting data by the network. Although reliable it is also quite slow compared with RTU mode. RTU is now the most commonly used by far. Use RTU unless you are extending an existing Modbus ASCII system. All Data Track's instruments support Modbus ASCII and Modbus RTU.
Standard Modbus uses 16 bit integer values to be transmitted, which need to be scaled to engineering units by both the Master device and by the slave(s). Floating Point uses two 16-bit values to produce a 32-bit floating-point (real) value, which needs no scaling. This method, although not a standard, is gaining popularity and is available from an ever-increasing number of vendors. All Tracker products that have a RS485 interface support floating point Modbus.
Modbus refers to analogue data as inputs and holding registers. Logic variables are referred to as coils for inputs and outputs and discretes for memory On/Off values. Trackers treat both the two analogue types (A0 to Annn) as the same and the two logic types as the same (L0 to Lnnn).
This is a single bit of information indicating either an ON (1) or OFF (0) state. They can be real time (e.g. a logic input state or an alarm state) or a configuration parameter (e.g. Alarm latching function On/Off)
This is a 16-bit data field, including temperatures, pressures, times and PID variables. They can be real time (e.g. a temperature) or a configuration parameter (e.g. Alarm setpoint value).
The manuals list all the available data for analogue and logic locations. Also a communications help document is available in our download section.
The following Modbus functions are supported by Tracker instrumentation.
Function - Description
1 - Read Coils
2 - Read Discretes
3 - Read Holding Registers
4 - Read Input Registers
5 - Write Single Coil
6 - Write Single Register
15 - Write Multiple Coil
16 - Write Multiple Registers
There are both read and write functions but some locations may be read only (e.g. a measured value) or the instrument can be set to write protected mode by the user during configuration.
The master device can control the display, analogue and logic outputs and many other functions if the instrument is configured to allow this.
Get In Touch |
Application Notes |