Home | Contact form | Sitemap | Imprint

Modbus TCP and RTU on the securityProbe

Introduction to Modbus

MODBUS RTU is a non-proprietary serial communications protocol that is widely
control industry actuation. The hardware over which MODBUS RTU communications
not defined by the protocol.
MODBUS RTU is supported on RS-232, RS-422, RS- other electrical standards.
The securityProbe supports RS-232, RS-485 and Ethernet. Modbus/RTU protocol defines how a "master" device polls one or more "slave" devices write data in real time over RS-232, RS-422, or RS-485 serial data communication.
Modbus/TCP, an extension of Modbus/RTU, defines how Modbus/RTU and Modbus/ASCII messages are encoded within and transported over TCP/IP-based networks.

Modbus/TCP is just as simple to implement and flexible to apply as the original Modbus/RTU.

The securityProbe can represent both "master" and "slave" devices and supports both Modbus RTU and Modbus TCP protocols.

Transactions on Modbus Networks

Functions

Controllers communicate using a master-slave technique, in which only one device (the master) can initiate transactions (called "queries"). The other devices (the slaves) respond by supplying the requested data to the master, or by taking the action requested in the query.

Typical master devices include host processors and programming panels.
Typical slaves include programmable controllers.
The master can address individual slaves, or can initiate a broadcast message to all slaves. Slaves return a message (called a "response") to queries that are addressed to them individually. Responses are not returned to broadcast queries from the master.
The Modbus protocol establishes the format for the masters query by placing into it the device (or broadcast) address, a function code defining the requested action, any data to be sent, and an error-checking field. The slaves response message is also constructed using 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.
AKCP and Modbus Integration diagram

Setting up MODBUS on the securityProbe

Settings in the securityProbes web interface

Setting up MODBUS on the securityProbe   From the "Settings" tab in the securityProbes web interface, expand Connectivity, then click on "Modbus" in the left hand column. Set the Modbus TCP and Modbus RTU to off for the Master device (this is the Reading unit). See screen shot above.
Now set the Modbus TCP or Modbus RTU (this depends on your connection type) setting to ?on? for your Client device   Now set the Modbus TCP or Modbus RTU (this depends on your connection type) setting to "on" for your Client device
For setting up the Modbus TCP, first set the TCP port and TCP timeout (default TCP port is 502 and TCP timeout is 10 seconds). See screen shot above.  
For setting up the Modbus TCP, first set the TCP port and TCP timeout (default TCP port is 502 and TCP timeout is 10 seconds). See screen shot .
- First set the Modbus Address
- Serial Port, Serial Port Speed
- Serial Port Parity
- Serial Port Stop bits
(The default Modbus Address is 1, Serial Port is RS485, Serial Port Speed is 9660, Serial Port Parity is none and Serial Port Stop bit is 1)
The Modbus Sensors Addressing is now showing the Modbus INPUT Register Address of each sensor that is online on client device. Example; The Modbus INPUT Register Address of the Temperature on port 3 is 258 (0x0102). From the ?Sensors? tab (on Master device) select virtual sensors, then set the ?Source? to Modbus and then click ?Next?. See screen shot above   The Modbus Sensors Addressing is now showing the Modbus INPUT Register Address of each sensor that is online on client device. Example; The Modbus INPUT Register Address of the Temperature on port 3 is 258 (0x0102). From the "Sensors" tab (on Master device) select virtual sensors, then set the "Source" to Modbus and then click "Next". See screen shot.
For the Modbus TCP:  
For the Modbus TCP:

- Set the "Modbus Protocol" to Modbus TCP
- Enter the Client device IP address in "Modbus IP Address"
- Enter the TCP port in "Modbus TCP Port"
- Set the Modbus command: to get the sensor value or get the sensor status, (0x03 Read Holding Register for getting the sensor status and 0x04 Read Input Register for getting the sensor value).
- Now set the Modbus INPUT Register Address value to Modbus Register Address (see #3 above for the Modbus INPUT Register Address Value) Example; Set 258 for the read value of the Temperature on port 3 is 258). See screen shot.

For Modbus RTU  
For Modbus RTU:

- Set "Modbus Protocol" to Modbus RTU
- Set "Serial Port" to RS485 or other (this setting depends on the connection you are using)
- Set "Serial Port Speed" (this setting should be the same as shown in number 2.2 above)
- Set "Serial Port Parity" (this setting should be the same as shown in number 2.2 above)
- Set "Serial Port Stop Bits" (this setting should be the same as shown in number 2.2 above)
- Input the same "Modbus Address" value from step number 2.2 into "Modbus Slave ID"
- Select the Modbus command for getting the sensor value or the sensor status (0x03 Read Holding Register for getting the sensor status and 0x04 Read Input Register for getting the sensor value).
- Input the Modbus INPUT Register Address value into "Modbus Register Address". An example of the Modbus INPUT Register Address Value can be found in step number 3 (Example input of 258 for the read value of the Temperature on port 3 is 258)

Sensor Style - Set the Sensor Style to Analog

Settings in the securityProbes web interface

Analog Style "Value Factor", Set "Value Factor" for multiple with normal value (Example; if raw value is 1234 and needs to show a value to 12.34, then this should be set to x0.01. Default is x1). Input the Unit of sensor value into the "Unit Text" field, or click to input a special character   Analog Style "Value Factor", Set "Value Factor" for multiple with normal value (Example; if raw value is 1234 and needs to show a value to 12.34, then this should be set to x0.01. Default is x1). Input the Unit of sensor value into the "Unit Text" field, or click to input a special character
Analog Style "Value Factor", Set "Value Factor" for multiple with normal value (Example; if raw value is 1234 and needs to show a value to 12.34, then this should be set to x0.01. Default is x1). Input the Unit of sensor value into the "Unit Text" field, or click to input a special character   Input the Minimum and Maximum of the sensor values into the "Value Range for Slider Bar" field then click "Next" Set the Low Critical, Low Warning, High Warning and High Critical thresholds as shown in the screen shot above, then click "Next" again

Sensor Style - Set the Sensor Style to Analog

Switch Style

Analog Style "Value Factor", Set "Value Factor" for multiple with normal value (Example; if raw value is 1234 and needs to show a value to 12.34, then this should be set to x0.01. Default is x1). Input the Unit of sensor value into the "Unit Text" field, or click to input a special character   - Set the "Sensor Style" to Switch
- Input the Normal value of the sensor into "Normal State Value".
- Input the Description of Normal and Critical status into "Description of Status When Normal" and "Description of Status When Critical" (See screen shot)

Set Time to Polling

Set Time to Polling   - Input the time to polling into "Polling Interval" (Default is 15 secs)
- Input "Execute Time Out" (Default is 10 secs) and "Retry" (Default is 3 times)
- Click the "Finish" button

Return value from Holding Register

The following is a list of what each of the return values from the Holding Register represent:

1 No Status (Sensor has not been initialized)
2 Normal
3 High Warning
4 High Critical
5 Low Warning
6 Log Critical
7 Sensor Error
8 Switch Low (Output)
9 Switch High (Output)

For the INPUT Register

If the sensor is OFFLINE, the INPUT register will return 32767

If the sensor is No Status or Sensor Error, the INPUT register is -32768