Template:Networking RUTXxx manual modbus

From Wiki Knowledge Base | Teltonika Networks

Summary[edit | edit source]

Modbus is a serial communications protocol. Simple and robust, it has become a de facto standard communication protocol and is now a commonly available means of connecting industrial electronic devices. This chapter is an overview of the Modbus TCP functionality for {{{name}}} devices.

Modbus TCP Master[edit | edit source]

A Modbus master device can request data from Modbus slaves. The Modbus TCP Master section is used to configure Modbus TCP slaves. To add a new slave, enter a custom name, slave's ID, IP address and port and click the "Add" button: Networking rutx manual modbus add new slave v1.png

Button Description
Edit Redirects you to the slave's configuration page (more information in [[{{{name}}} Modbus#Slave_device_configuration|section 2.1]])
Delete Deletes the slave configuration
Alarms Redirects you to the slave's alarm configuration page (more information in [[{{{name}}} Modbus#Alarm_configuration|section 2.3]])

You can create a maximum of 10 slave configurations.

Slave device configuration[edit | edit source]


The figure below is an example of the Slave device configuration and the table below provides information on the fields contained in that section:

Networking rutx manual modbus slave configuration v1.png

Field Value Description
Enabled off | on; default: off Turns communication with the slave device on or off.
Name string; default: none Slave device's name, used for easier management purposes.
Slave ID integer [0..255]; default: none Slave ID. Each slave in a network is assigned a unique identifier ranging from 1 to 255. When the master requests data from a slave, the first byte it sends is the Slave ID. When set to 0, the slave will respond to requests addressed to any ID.
IP address ip; default: none Slave device's IP address.
Port integer [0..65535]; default: none Slave device's Modbus TCP port.
Period integer [1..6400]; default: 60 Interval at which requests are sent to the slave device.
Timeout integer [1..30]; default: 5 Maximum response wait time.

Requests configuration[edit | edit source]


A Modbus request is a way of obtaining data from Modbus slaves. The master sends a request to a slave specifying the function code to be performed. The slave then sends the requested data back to the Modbus master. You can create a maximum of 64 request configurations for each slave device.

The figure below is an example of the Requests configuration section and the table below provides information contained in the fields of that section:

Networking rutx manual modbus request configuration v1.png

Field Value Description
Name string; default: Unnamed Request name. Used for easier management purposes.
Data type 8bit INT | 8bit UINT | 16bit INT, high byte first | 16bit INT, low byte first | 16bit UINT, high byte first | 16bit UINT, low byte first | 32bit float, Byte order 1,2,3,4 | 32bit float, Byte order 4,3,2,1 | 32bit float, Byte order 2,1,4,3 | 32bit float, Byte order 3,4,1,2; default: 16bit INT, high byte first How read data will be stored.
Function Read coils (1) | Read input coils (2) | Read holding registers (3) | Read input registers (4) | Set single coil (5) | Set single coil register (6) | Set multiple coils (15) | Set multiple holding registers (16); default: Read holding registers (3) Specifies the type of register being addressed by a Modbus request.
First Register integer [0..65535]; default: 1 First Modbus register from which data will be read.
Register Count / Values integer [1..2000]; default: 1 Number of Modbus registers that will be read during the request.
Enabled off | on; default: off Turns the request on or off.
Test - (interactive button) Generates a Modbus request according to given parameters in order to test the request configuration. You must first save the configuration before you can use the Test button.
Delete [ X ] - (interactive button) Deletes the request.
Add - (interactive button) Adds a new request configuration.

Alarm configuration[edit | edit source]


Alarms are a way of setting up automated actions when some Modbus values meet user specified conditions. The figure below is an example of the Alarm configuration page and the table below provides information on fields that it contains:

Networking rutx manual modbus alarm configuration v1.png

Field Value Description
Enabled off | on; default: off Turns the alarm on or off
Function code Read Coil Status (1) | Read Input Status (2) | Read Holding Registers (3) | Read Input Registers (4); default: Read Coil Status (1) Modbus function used in Modbus request.
Register integer [0..65535]; default: none Number of the Modbus coil/input/holding register/input register that will be read.
Condition More than | Less than | Equal to | Not Equal to; default: Equal to When a value is obtained it will be compared against the value specified in the following field. The comparison will be made in accordance with the condition specified in this field.
Value various; default: none The value against which the read data will be compared.
Action SMS | MODBUS Write Request; default: MODBUS Write Request Action that will be taken if the condition is met. Possible actions:
  • SMS - sends and SMS message to a specified recipient(s).
  • Modbus Request - sends a Modbus Write request to a specified slave.
SMS: Message string; default: none SMS message text.
SMS: Phone number phone number; default: none Recipient's phone number.
MODBUS Write Request: IP address ip | host; default: none Modbus slave's IP address.
MODBUS Write Request: Port integer [0..65535]; default: none Modbus slave's port.
MODBUS Write Request: Timeout integer [1..30]; default: 5 Maximum time to wait for a response.
MODBUS Write Request: ID integer [1..255]; default: none Modbus slave ID.
MODBUS Write Request: Modbus function Read Force Single Coil (5) | Preset Single Register (6) | Force Multiple Coils (15) | Force Multiple Registers (16); default: Force Single Coil (5) A function code specifies the type of register being addressed by a Modbus request.
MODBUS Write Request: First register integer [0..65535]; default: none Begins reading from the register specified in this field.
MODBUS Write Request: Values integer [0..65535]; default: none Register/Coil values to be written (multiple values must be separated by space character).

Modbus Data to Server[edit | edit source]

The Modbus Data to Server function provides you with the possibility to set up senders that transfer data collected from Modbus slaves to remote servers. To add a new data sender, enter the server's address, specify the data sending period and click the "Add" button:

Networking rutx manual modbus add new data sender v1.png

Data sender configuration[edit | edit source]


When you add a new data sender, you will be redirected to its configuration window. The figure below is an example of that window and the table below provides information on the fields that it contains:

Networking rutx manual modbus data sender configuration v1.png

Enabled off | on; Default: off Turns the data sender ON or OFF
Name string; Default: none Data sender's name. used for easier management purposes
Protocol HTTP; Default: HTTP Data sending protocol
JSON format json string; Default: {"ID":"%i", "TS":"%t","ST":"%s","VR":"%a"} Provides the possibility to fully customize the JSON segment
Segment count 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; Default: 1 Max segment count in one JSON string sent to server
URL host | ip; Default: none Address of the server to which the data will be sent.
Period integer [1..6400]; Default: 60 Data sending frequency (in seconds)
Data filtering All data | By slave ID | By slave IP; Default: All data Which data this sender will transfer to the server
Retry on fail off | on; Default: no Specifies whether the data sender should retry failed attempts (Retry until successful)
Custom header string; Default: no Adds a custom header(s) to HTTP requests

See also[edit | edit source]

[[Category:{{{name}}} WebUI]]