Template:Networking rut manual modbus: Difference between revisions

From Teltonika Networks Wiki
No edit summary
No edit summary
Line 56: Line 56:
     <tr>
     <tr>
         <td><b>Edit</b></td>
         <td><b>Edit</b></td>
         <td>Redirects you to the slave's configuration page (more information in [[{{{name}}} Modbus#Alarm_configuration|section 3.1]])</td>
         <td>Redirects you to the slave's configuration page (more information in [[{{{name}}} Modbus#Slave_device_configuration|section 3.1]])</td>
     </tr>
     </tr>
     <tr>
     <tr>

Revision as of 08:55, 2 April 2019

Summary

Modbus is a serial communications protocol. Simple and robust, it has since 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.

Modbus TCP

Modbus TCP provides users with the possibility to set or get system parameters. The Modbus daemon acts as slave device. That means it accepts connections from a master (client) and sends out a response or sets some system related parameter in accordance with the given query.

The figure below is an example of the Modbus TCP window section and the table below provides information on the fields contained in that window:

[[File:{{{modbus_tcp_file}}}]]

Template:Networking rut9xx manual modbus modbus tcp table

Get Parameters


Modbus parameters are held within registers. Each register contains 2 bytes of information. For simplification, the number of registers for storing numbers is 2 (4 bytes), while the number of registers for storing text information is 16 (32 bytes). The register numbers and corresponding system values are described in the table below:

{{Template: Networking_{{{name}}}_manual_modbus_modbus_tcp_get_parameters_table}}

Set Parameters


The Modbus daemon can also set some device parameters. These parameters and explanations on how to use them are described in the table below:

{{Template: Networking_{{{name}}}_manual_modbus_modbus_tcp_set_parameters_table}}

* All ON/OFF commands only accept 0 and 1 values, which represent the following:

  • 1 - ON
  • 0 - OFF

Modbus TCP Master

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:

[[File:{{{file_add_new_slave}}}]]

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

Slave device configuration


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

[[File:{{{file_slave_configuration}}}]]

Field name Value Description
Enabled yes | no; Default: no Turns communication with the slave device ON or OFF
Name string; Default: none Slave device custom name, used for easier management purposes
Slave ID integer [1..255]; Default: none Slave ID. Each slave in a network is assigned a unique identifier randging from 1 to 255. When the master requests data from a slave, the first byte it sends is the Slave ID
IP address ip; Default: none Slave device IP address
Port integer [0..65535]; Default: none Slave device Modbus TCP port
Period integer [1..6400]; Default: none Interval at which requests are sent to the slave device
Timeout integer [1..30]; Default: none Maximum response wait time

Requests configuration


A Modbus request is way of obtaining data from Modbus slaves. The master a sends a request to a slave specifying which Modbus registers should be read. The slave then sends the requested data back to the Modbus master.

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

[[File:{{{file_requests}}}]]

Field name Value Description
Name string; Default: Unnamed Parameter 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 Type of data contained in Modbus registers
Function 1 | 2 | 3 | 4 | 5 | 15 | 16; Default: 3
First Register integer [0..65535]; Default: 1 First Modbus register from which data will be read
Number of Registers integer [1..2000]; Default: none Number of Modbus registers that will be read during the request
Enabled yes | no; Default: no 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 - (interactive button) Deletes the request
Add - (interactive button) Adds a new request request

Alarm configuration


Alarms are way of

[[File:{{{file_alarms}}}]]

Field name Value Description
Enabled yes | no; Default: no 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)
Register integer [0..65535]; Default: none
Condition More than | Less than | Equal to | Not Equal to; Default: Equal to
Value various; Default: none
Action SMS | Trigger output | Modbus Request; Default: SMS
SMS: Message string; Default: none SMS message text
SMS: Phone number phone number; Default: none recipient's phone number
Trigger output: Output Open collector output | Relay output | Both; Default: Open collector output Which output will be triggered
Trigger output: I/O Action Turn On | Turn Off | Invert; Default: Turn On Action that will taken on the specified output
Modbus Request: IP address ip | host; Default: none Modbus slave's address
Modbus Request: Port integer [0..65535]; Default: none Modbus slave's port
Modbus Request: Timeout integer [1..30]; Default: 5 Maximum time to wait for a response
Modbus Request: ID integer [1..255]; Default: none Modbus slave ID
Modbus Request: Modbus function Read Coil Status (1) | Read Input Status (2) | Read Holding Registers (3) | Read Input Registers (4) | Force Single Coil (5) | Preset Single Register (6) | Force Multiple Coils (15) | Force Multiple Registers (16); Default: Force Single Coil (5)
Modbus Request: First register integer [0..65535]; Default: none Begins reading from the register specified in this field
Modbus Request: Number of registers integer [0..65535]; Default: none

Modbus Data to Server

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:

[[File:{{{file_add_new_sender}}}]]

Data sender configuration


When you add a new data sender, you will 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:

[[File:{{{file_sender_configuration}}}]]

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

See also

Template:Networking device modbus see also

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