Difference between revisions of "Template:Networking rut manual modbus"
Gytispieze (talk | contribs) m (Text replacement - "\{\{Template: Networking_rutos_manual_fw_disclosure (.*) (.*) (.*) (.*) \}\}" to "{{Template: Networking_device_manual_fw_disclosure | series = {{{series}}} | name = {{{name}}} | fw_version ={{Template: Networking_device_manual_latest_fw | series = {{{series}}} | name = {{{name}}} }} }}") Tags: Mobile edit Mobile web edit |
|||
(49 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Summary== | ==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. | |
− | |||
− | This chapter | ||
==Modbus TCP== | ==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: | 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: | + | [[File:{{{modbus_tcp_file}}}]] |
− | + | {{#ifeq: {{{series}}} | RUT2xx | |
− | + | | {{Template: Networking_rut2xx_manual_modbus_modbus_tcp_table|name={{{name}}}}} | |
− | + | | {{Template: Networking_rut9xx_manual_modbus_modbus_tcp_table}} | |
− | + | }} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Get Parameters=== | ===Get Parameters=== | ||
---- | ---- | ||
− | Modbus parameters are held within | + | 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: |
<br> <br> | <br> <br> | ||
− | {{#ifeq: {{{series}}} | | + | {{#ifeq: {{{series}}} | RUT2xx |
| {{Template: Networking_{{lc:{{{series}}}}}_manual_modbus_modbus_tcp_get_parameters_table}} | | {{Template: Networking_{{lc:{{{series}}}}}_manual_modbus_modbus_tcp_get_parameters_table}} | ||
| {{Template: Networking_{{lc:{{{name}}}}}_manual_modbus_modbus_tcp_get_parameters_table}} | | {{Template: Networking_{{lc:{{{name}}}}}_manual_modbus_modbus_tcp_get_parameters_table}} | ||
}} | }} | ||
− | {{#ifeq: {{{series}}} | | + | {{#ifeq: {{{series}}} | RUT2xx |
| {{Template: Networking_device_manual_modbus_modbus_tcp_get_parameters_table_asterisk}} | | {{Template: Networking_device_manual_modbus_modbus_tcp_get_parameters_table_asterisk}} | ||
| | | | ||
Line 79: | Line 31: | ||
---- | ---- | ||
The Modbus daemon can also set some device parameters. These parameters and explanations on how to use them are described in the table below: | The Modbus daemon can also set some device parameters. These parameters and explanations on how to use them are described in the table below: | ||
− | <br><br> | + | <br> <br> |
− | {{#ifeq: {{{series}}} | | + | {{#ifeq: {{{series}}} | RUT2xx |
| {{Template: Networking_{{lc:{{{series}}}}}_manual_modbus_modbus_tcp_set_parameters_table}} | | {{Template: Networking_{{lc:{{{series}}}}}_manual_modbus_modbus_tcp_set_parameters_table}} | ||
| {{Template: Networking_{{lc:{{{name}}}}}_manual_modbus_modbus_tcp_set_parameters_table}} | | {{Template: Networking_{{lc:{{{name}}}}}_manual_modbus_modbus_tcp_set_parameters_table}} | ||
}} | }} | ||
− | <span class="asterisk">*</span> All ON/OFF commands only accept | + | <span class="asterisk">*</span> All ON/OFF commands only accept '''0''' and '''1''' values, which represent the following: |
<ul> | <ul> | ||
<li>1 - ON</li> | <li>1 - ON</li> | ||
Line 93: | Line 45: | ||
==Modbus TCP Master== | ==Modbus TCP Master== | ||
− | A Modbus <b>master</b> device can request data from Modbus slaves. The Modbus TCP Master section is used to configure Modbus TCP slaves. | + | A Modbus <b>master</b> 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}}}]] | ||
+ | |||
+ | <table class="nd-othertables_2"> | ||
+ | <tr> | ||
+ | <th width=250>Button</th> | ||
+ | <th width=902>Description</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><b>Edit</b></td> | ||
+ | <td>Redirects you to the slave's configuration page (more information in [[{{{name}}} Modbus#Slave_device_configuration|section 3.1]])</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><b>Delete</b></td> | ||
+ | <td>Deletes the slave configuration</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><b>Alarms</b></td> | ||
+ | <td>Redirects you to the slave's alarm configuration page (more information in [[{{{name}}} Modbus#Alarm_configuration|section 3.3]])</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><b>Clone</b></td> | ||
+ | <td>Creates an identical slave configuration</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
You can create a maximum of 10 slave configurations. | You can create a maximum of 10 slave configurations. | ||
Line 100: | Line 77: | ||
The figure below is an example of the <b>Slave device configuration</b> and the table below provides information on the fields contained in that section: | The figure below is an example of the <b>Slave device configuration</b> and the table below provides information on the fields contained in that section: | ||
− | [[File: | + | [[File:{{{file_slave_configuration}}}]] |
<table class="nd-mantable"> | <table class="nd-mantable"> | ||
<tr> | <tr> | ||
− | <th>Field</th> | + | <th>Field name</th> |
<th>Value</th> | <th>Value</th> | ||
<th>Description</th> | <th>Description</th> | ||
Line 110: | Line 87: | ||
<tr> | <tr> | ||
<td>Enabled</td> | <td>Enabled</td> | ||
− | <td>yes | no; | + | <td>yes | no; Default: <b>no</b></td> |
− | <td>Turns communication with the slave device | + | <td>Turns communication with the slave device ON or OFF</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Name</td> | <td>Name</td> | ||
− | <td>string; | + | <td>string; Default: <b>none</b></td> |
− | <td>Slave device | + | <td>Slave device custom name, used for easier management purposes</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Slave ID</td> | <td>Slave ID</td> | ||
− | <td>integer [ | + | <td>integer [1..255]; Default: <b>none</b></td> |
− | <td>Slave ID. Each slave in a network is assigned a unique identifier | + | <td>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</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>IP address</td> | <td>IP address</td> | ||
− | <td>ip; | + | <td>ip; Default: <b>none</b></td> |
− | <td>Slave device | + | <td>Slave device IP address</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Port</td> | <td>Port</td> | ||
− | <td>integer [0..65535]; | + | <td>integer [0..65535]; Default: <b>none</b></td> |
− | <td>Slave device | + | <td>Slave device Modbus TCP port</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Period</td> | <td>Period</td> | ||
− | <td>integer [1..6400]; | + | <td>integer [1..6400]; Default: <b>none</b></td> |
− | <td>Interval at which requests are sent to the slave device | + | <td>Interval at which requests are sent to the slave device</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Timeout</td> | <td>Timeout</td> | ||
− | <td>integer [1..30]; | + | <td>integer [1..30]; Default: <b>none</b></td> |
− | <td>Maximum response wait time | + | <td>Maximum response wait time</td> |
</tr> | </tr> | ||
</table> | </table> | ||
Line 147: | Line 124: | ||
===Requests configuration=== | ===Requests configuration=== | ||
---- | ---- | ||
− | A Modbus <b>request</b> is | + | A Modbus <b>request</b> 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. 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: | 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:{{{file_requests}}}]] |
<table class="nd-mantable"> | <table class="nd-mantable"> | ||
<tr> | <tr> | ||
− | <th>Field</th> | + | <th>Field name</th> |
<th>Value</th> | <th>Value</th> | ||
<th>Description</th> | <th>Description</th> | ||
Line 161: | Line 138: | ||
<tr> | <tr> | ||
<td>Name</td> | <td>Name</td> | ||
− | <td>string; | + | <td>string; Default: <b>Unnamed Parameter</b></td> |
− | <td>Request name. Used for easier management purposes | + | <td>Request name. Used for easier management purposes</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Data type</td> | <td>Data type</td> | ||
− | <td> | + | <td>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: <b>16bit INT, high byte first</b></td> |
− | <td>How read data will be stored | + | <td>How read data will be stored</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Function</td> | <td>Function</td> | ||
− | <td>1 | 2 | 3 | 4 | 5 | 6 | 15 | 16; | + | <td>1 | 2 | 3 | 4 | 5 | 6 | 15 | 16; Default: <b>3</b></td> |
<td>A function code specifies the type of register being addressed by a Modbus request. The codes represent these functions:<br> | <td>A function code specifies the type of register being addressed by a Modbus request. The codes represent these functions:<br> | ||
<ul> | <ul> | ||
Line 187: | Line 164: | ||
<tr> | <tr> | ||
<td>First Register</td> | <td>First Register</td> | ||
− | <td>integer [ | + | <td>integer [0..65535]; Default: <b>1</b></td> |
− | <td>First Modbus register | + | <td>First Modbus register from which data will be read</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Number of Registers</td> | <td>Number of Registers</td> | ||
− | <td>integer [1..2000]; | + | <td>integer [1..2000]; Default: <b>none</b></td> |
− | <td>Number of Modbus registers that will be read during the request | + | <td>Number of Modbus registers that will be read during the request</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Enabled</td> | <td>Enabled</td> | ||
− | <td>yes | no; | + | <td>yes | no; Default: <b>no</b></td> |
− | <td>Turns the request | + | <td>Turns the request ON or OFF</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Test</td> | <td>Test</td> | ||
<td>- (interactive button)</td> | <td>- (interactive button)</td> | ||
− | <td>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 | + | <td>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</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Delete</td> | <td>Delete</td> | ||
<td>- (interactive button)</td> | <td>- (interactive button)</td> | ||
− | <td>Deletes the request | + | <td>Deletes the request</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Add</td> | <td>Add</td> | ||
<td>- (interactive button)</td> | <td>- (interactive button)</td> | ||
− | <td>Adds a new request configuration | + | <td>Adds a new request configuration</td> |
</tr> | </tr> | ||
</table> | </table> | ||
Line 219: | Line 196: | ||
===Alarm configuration=== | ===Alarm configuration=== | ||
---- | ---- | ||
− | <b>Alarms</b> are | + | <b>Alarms</b> are 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: |
− | + | [[File:{{{file_alarms}}}]] | |
− | |||
− | |||
<table class="nd-mantable"> | <table class="nd-mantable"> | ||
<tr> | <tr> | ||
− | <th>Field</th> | + | <th>Field name</th> |
<th>Value</th> | <th>Value</th> | ||
<th>Description</th> | <th>Description</th> | ||
Line 233: | Line 208: | ||
<tr> | <tr> | ||
<td>Enabled</td> | <td>Enabled</td> | ||
− | <td>yes | no; | + | <td>yes | no; Default: <b>no</b></td> |
− | <td>Turns the alarm | + | <td>Turns the alarm ON or OFF</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Function code</td> | <td>Function code</td> | ||
− | <td>Read Coil Status (1) | Read Input Status (2) | Read Holding Registers (3) | Read Input Registers (4); | + | <td>Read Coil Status (1) | Read Input Status (2) | Read Holding Registers (3) | Read Input Registers (4); Default: <b>Read Coil Status (1)</b></td> |
− | <td>Modbus function used in Modbus request | + | <td>Modbus function used in Modbus request</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Register</td> | <td>Register</td> | ||
− | <td>integer [0..65535]; | + | <td>integer [0..65535]; Default: <b>none</b></td> |
− | <td>Number of the | + | <td>Number of the modbus coil/input/holding register/input register that will be read</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Condition</td> | <td>Condition</td> | ||
− | <td>More than | Less than | Equal to | Not Equal to; | + | <td>More than | Less than | Equal to | Not Equal to; Default: <b>Equal to</b></td> |
− | <td>When a value is obtained it will be compared against the value specified in the following field. The | + | <td>When a value is obtained it will be compared against the value specified in the following field. The comparisson will be made in acordance with the condition specified in this field</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Value</td> | <td>Value</td> | ||
− | <td>various; | + | <td>various; Default: <b>none</b></td> |
− | <td>The value against which the read data will be compared | + | <td>The value against which the read data will be compared</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Action</td> | <td>Action</td> | ||
− | <td | + | <td>SMS | Trigger output | Modbus Request; Default: <b>SMS</b></td> |
<td>Action that will be taken if the condition is met. Possible actions: | <td>Action that will be taken if the condition is met. Possible actions: | ||
<ul> | <ul> | ||
− | <li><b>SMS</b> - sends and SMS message to a specified recipient(s) | + | <li><b>SMS</b> - sends and SMS message to a specified recipient(s)</li> |
− | <li><b>Trigger output</b> - changes the state of a specified output(s) | + | <li><b>Trigger output</b> - changes the state of a specified output(s)</li> |
− | <li><b>Modbus Request</b> - sends a Modbus request to a specified slave | + | <li><b>Modbus Request</b> - sends a Modbus request to a specified slave</li> |
</ul> | </ul> | ||
</td> | </td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: # | + | <td><span style="color: #0054a6;">SMS: Message</span></td> |
− | <td>string; | + | <td>string; Default: <b>none</b></td> |
− | <td>SMS message text | + | <td>SMS message text</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: # | + | <td><span style="color: #0054a6;">SMS: Phone number</span></td> |
− | <td>phone number; | + | <td>phone number; Default: <b>none</b></td> |
− | <td>Recipient's phone number | + | <td>Recipient's phone number</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: red;">Trigger output:</span> | + | <td><span style="color: red;">Trigger output: Output</span></td> |
− | <td>Open collector output | + | <td>Open collector output | Relay output | Both; Default: <b>Open collector output</b></td> |
− | + | <td>Which output(s) will be triggered</td> | |
− | <td>Which output(s) will be triggered | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: red;">Trigger output:</span> | + | <td><span style="color: red;">Trigger output: I/O Action</span></td> |
− | <td>Turn On | Turn Off | Invert; | + | <td>Turn On | Turn Off | Invert; Default: <b>Turn On</b></td> |
− | <td>Action that will taken on the specified output | + | <td>Action that will taken on the specified output</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: purple;">Modbus Request:</span> | + | <td><span style="color: purple;">Modbus Request: IP address</span></td> |
− | <td>ip | host; | + | <td>ip | host; Default: <b>none</b></td> |
− | <td>Modbus slave's IP address | + | <td>Modbus slave's IP address</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: purple;">Modbus Request:</span> | + | <td><span style="color: purple;">Modbus Request: Port</span></td> |
− | <td>integer [0..65535]; | + | <td>integer [0..65535]; Default: <b>none</b></td> |
− | <td>Modbus slave's port | + | <td>Modbus slave's port</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: purple;">Modbus Request:</span> | + | <td><span style="color: purple;">Modbus Request: Timeout</span></td> |
− | <td>integer [1..30]; | + | <td>integer [1..30]; Default: <b>5</b></td> |
− | <td>Maximum time to wait for a response | + | <td>Maximum time to wait for a response</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: purple;">Modbus Request:</span> | + | <td><span style="color: purple;">Modbus Request: ID</span></td> |
− | <td>integer [1..255]; | + | <td>integer [1..255]; Default: <b>none</b></td> |
− | <td>Modbus slave ID | + | <td>Modbus slave ID</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: purple;">Modbus Request:</span> | + | <td><span style="color: purple;">Modbus Request: Modbus function</span></td> |
− | <td>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); | + | <td>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: <b>Force Single Coil (5)</b></td> |
− | <td>A function code specifies the type of register being addressed by a Modbus request | + | <td>A function code specifies the type of register being addressed by a Modbus request</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: purple;">Modbus Request:</span> | + | <td><span style="color: purple;">Modbus Request: First register</span></td> |
− | <td>integer [0..65535]; | + | <td>integer [0..65535]; Default: <b>none</b></td> |
− | <td>Begins reading from the register specified in this field | + | <td>Begins reading from the register specified in this field</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: purple;">Modbus Request:</span> | + | <td><span style="color: purple;">Modbus Request: Number of registers</span></td> |
− | <td>integer [0..65535]; | + | <td>integer [0..65535]; Default: <b>none</b></td> |
− | <td>The number of registers that will be read from the first register | + | <td>The number of registers that will be read from the first register</td> |
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Modbus Data to Server== | ==Modbus Data to Server== | ||
The Modbus <b>Data to Server</b> 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: | The Modbus <b>Data to Server</b> 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:{{{file_add_new_sender}}}]] |
===Data sender configuration=== | ===Data sender configuration=== | ||
---- | ---- | ||
− | When you add a new data sender, you will | + | 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: |
− | The figure below is an example of that window and the table below provides information on the fields that it contains: | ||
− | [[File: | + | [[File:{{{file_sender_configuration}}}]] |
<table class="nd-mantable"> | <table class="nd-mantable"> | ||
<tr> | <tr> | ||
− | <th> | + | <th>Enabled</th> |
− | + | <th>yes | no; Default: <b>no</b></th> | |
− | <th | + | <th>Turns the data sender ON or OFF</th> |
− | |||
− | |||
− | |||
− | |||
− | < | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 598: | Line 324: | ||
<tr> | <tr> | ||
<td>Protocol</td> | <td>Protocol</td> | ||
− | <td | + | <td>HTTP(S); Default: <b>HTTP(S)</b></td> |
<td>Data sending protocol</td> | <td>Data sending protocol</td> | ||
</tr> | </tr> | ||
Line 608: | Line 334: | ||
<tr> | <tr> | ||
<td>Segment count</td> | <td>Segment count</td> | ||
− | <td>1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | + | <td>1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; Default: <b>1</b></td> |
− | <td>Max segment count in one JSON string sent to server | + | <td>Max segment count in one JSON string sent to server</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td>URL | + | <td>URL</td> |
<td>host | ip; Default: <b>none</b></td> | <td>host | ip; Default: <b>none</b></td> | ||
− | <td>Address of the server to which the data will be sent.<br><b>Important note</b>: when using HTTPS, remember to add the <b><i>https://</i></b> prefix before the URL | + | <td>Address of the server to which the data will be sent. .<br><b>Important note</b>: when using HTTPS, remember to add the <b><i>https://</i></b> prefix before the URL</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 622: | Line 348: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td | + | <td>Data filtering</td> |
<td>All data | By slave ID | By slave IP; Default: <b>All data</b></td> | <td>All data | By slave ID | By slave IP; Default: <b>All data</b></td> | ||
<td>Which data this sender will transfer to the server</td> | <td>Which data this sender will transfer to the server</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td | + | <td>Retry on fail</td> |
<td>yes | no; Default: <b>no</b></td> | <td>yes | no; Default: <b>no</b></td> | ||
<td>Specifies whether the data sender should retry failed attempts</td> | <td>Specifies whether the data sender should retry failed attempts</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td | + | <td>Custom header</td> |
<td>string; Default: <b>no</b></td> | <td>string; Default: <b>no</b></td> | ||
<td>Adds a custom header(s) to HTTP requests</td> | <td>Adds a custom header(s) to HTTP requests</td> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==See also== | ==See also== | ||
− | + | {{Template: Networking_device_modbus_see_also}} | |
− | |||
− | |||
− | [[Category:{{{name}}} | + | [[Category:{{{name}}} WebUI]] |
Revision as of 16:48, 3 May 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 |
You can create a maximum of 10 slave configurations.
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. 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:
[[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 | How read data will be stored |
Function | 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16; Default: 3 | A function code specifies the type of register being addressed by a Modbus request. The codes represent these functions:
|
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 configuration |
Alarm configuration
Alarms are 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:
[[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) | 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 comparisson will be made in acordance with the condition specified in this field |
Value | various; Default: none | The value against which the read data will be compared |
Action | SMS | Trigger output | Modbus Request; Default: SMS | Action that will be taken if the condition is met. Possible actions:
|
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(s) 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 IP 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) | A function code specifies the type of register being addressed by a Modbus request |
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 | The number of registers that will be read from the first register |
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 | 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. . Important note: when using HTTPS, remember to add the https:// prefix before the URL |
Period | integer [1..6400]; Default: none | 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 | yes | no; Default: no | Specifies whether the data sender should retry failed attempts |
Custom header | string; Default: no | Adds a custom header(s) to HTTP requests |
See also
Template:Networking device modbus see also
[[Category:{{{name}}} WebUI]]