Difference between revisions of "Modbus TCP"

From Larnitech wiki page
Jump to navigation Jump to search
(Created page with "<p>MODBUS TCP allows integration with devices that have this interface. </p> <H2>Adding MODBUS TCP</H2> <ol> <li>Authorize yourself in the Web Toolbar of the Smart Home system...")
 
(Marked this version for translation)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<p>MODBUS TCP allows integration with devices that have this interface. </p>
+
<languages/>
<H2>Adding MODBUS TCP</H2>
+
<translate>
 +
==ModBus TCP Plugin installation & configuration== <!--T:1-->
 
<ol>
 
<ol>
<li>Authorize yourself in the Web Toolbar of the Smart Home system administration ('''LT Setup''') and select the '''Updates''' page in the menu.
+
<li>Make sure you have ModBus TCP licenses
<br>[[File:modbustcp1.png|300px]]<br></li>
+
<br>[[file:newmodbus1.png|700px|link=]]<br>
<li>In the list of updates, find '''Modbus TCP''' and click the '''Update''' button (if the plug-in is not installed, there will be the '''Install''' button – click it).
+
</li>
<br>[[File:modbustcp2.png|800px]]<br></li>
+
 
<li>Read the warning, tick the box next to '''“I agree”''' inscription and click the '''Start update''' button.
+
<!--T:2-->
<br>[[File:modbustcp3.png|500px]]<br></li>
+
<li>Make sure you have the latest versions of LT Setup, LT Server, ModBus TCP plugin installed
<li>When the update is complete, select the '''Plugins''' page in the left menu.
+
<br>[[file:newmodbus2.png|700px|link=]]<br>
<br>[[File:modbustcp4.png|300px]]<br></li>
+
</li>
<li>Find the '''Modbus TCP''' item in the list and look whether the '''Enable''' inscription is located next to this item in the '''License''' column. If yes, then click on the '''Enable''' button, and then click OK in the window that appears.
+
 
<br>[[File:modbustcp5.png|500px]]<br>  
+
<!--T:3-->
<br>[[File:modbustcp6.png|500px]]<br>  
+
<li>Configure plugin before enabling.
<br>[[File:modbustcp7.png|300px]]<br></li>
+
<br>[[file:newmodbus3.png|700px|link=]]<br>
<li>To configure the plug-in, click the '''Configure''' button.
+
<br>[[file:newmodbus4.png|700px|link=]]<br>
<br>[[File:modbustcp8.png|800px]]<br></li>
+
<br>[[file:newmodbus5.png|700px|link=]]<br>
<li>In the window that appears, click the '''Add''' button.
+
'''IP''' - IP address of a ModBus TCP device, make sure that you can ping this device<br>
<br>[[File:modbustcp9.png|300px]]<br> </li>
+
'''Port''' - 502 it is default port in most cases, but check documentation of your ModBus TCP device<br>
<li>The window will appear with settings of the device with Modbus TCP. Enter the IP address and port of the device in the appropriate fields, and also select the''' Master/Slave '''type of the connected device (most often the connected device is '''Slave'''). After that, click '''Save''' and confirm your selection by clicking on '''OK''' in the next window.
+
'''Master/Slave''' - this option means that you add a Master device or Slave device<br>
<br>[[File:modbustcp10.png|800px]]<br>  
+
</li>
<br>[[File:modbustcp11.png|300px]]<br></li>
+
 
<li>After adding a device, it will appear in the list on the '''Plugins/MODBUS TCP''' page. To edit it, click on '''Edit''' (button 1 in the screenshot); to delete it, click on '''Delete''' (button 2 in the screenshot). You can change the status with the '''Master''' (or '''Slave''' depending on its status, button 3 in the screenshot) button.
+
<!--T:4-->
<br>[[File:modbustcp12.png|800px]]<br> </li></ol>
+
<li>Enable plugin.
After successful addition, '''Com-port''' will appear in the logic. You can check its availability by going to the '''Structure''' menu and clicking on '''Edit logic'''.
+
<br>[[file:newmodbus6.png|700px|link=]]<br>
<br>[[File:modbustcp13.png|800px]]<br>
+
</li>
 +
</ol>
 +
 
 +
==Examples== <!--T:5-->
 +
<ol>
 +
<li>
 +
<li>Go to Scripts page and create Blockly script
 +
<br>[[file:newmodbus7.png|700px|link=]]<br>
 +
</li>
 +
 
 +
<!--T:6-->
 +
<li>Add ModBus block from Other tab
 +
<br>[[file:newmodbus8.png|700px|link=]]<br>
 +
</li>
 +
 
 +
<!--T:7-->
 +
<li>Choose ModBus TCP com-port from dropdown list and fill other fields. Save script and try it.
 +
<br>[[file:newmodbus9.png|700px|link=]]<br>
 +
</li>
 +
</ol>
 +
 
 +
==Logs== <!--T:8-->
 +
Starting Service of MODBUS TCP plugin for Larnitech system...
 +
Started Service of MODBUS TCP plugin for Larnitech system.
 +
Compiled: Jul  7 2021 13:59:57
 +
INF: Settings:
 +
INF: debug yes '''- Debug mode is enabled'''
 +
INF: modbus-devices 192.168.1.110:502:0
 +
INF: Modbus 192.168.1.110:502:0 thread created
 +
INF: Modbus 192.168.1.110:502:0 thread started
 +
DEBUG: Modbus client: connected to 192.168.1.110:502:0''' - Plugin connected to the device'''
 +
DEBUG: Modbus client: waiting for messages for 192.168.1.110:502:0
 +
DEBUG: Add message 01050011FF00 to 192.168.1.110:502:0 queue
 +
DEBUG: Modbus thread unlocked for 192.168.1.110:502:0
 +
DEBUG: Modbus client: send packet to 192.168.1.110:502:0 0x01050011FF00''' - Send ‘ON’ to first coil'''
 +
DEBUG: Modbus client: confirmation from 192.168.1.110:502:0 0x01050011FF00 '''- Right feedback from the device'''
 +
DEBUG: Modbus client: waiting for messages for 192.168.1.110:502:0
 +
DEBUG: Add message 010500110000 to 192.168.1.110:502:0 queue
 +
DEBUG: Modbus thread unlocked for 192.168.1.110:502:0
 +
DEBUG: Modbus client: send packet to 192.168.1.110:502:0 0x010500110000''' - Send ‘OFF’ to first coil'''
 +
DEBUG: Modbus client: confirmation from 192.168.1.110:502:0 0x010500110000''' - Right feedback from the device'''
 +
DEBUG: Modbus client: waiting for messages for 192.168.1.110:502:0
 +
</translate>

Latest revision as of 15:10, 15 January 2022

Other languages:
English • ‎русский

ModBus TCP Plugin installation & configuration

  1. Make sure you have ModBus TCP licenses
    Newmodbus1.png
  2. Make sure you have the latest versions of LT Setup, LT Server, ModBus TCP plugin installed
    Newmodbus2.png
  3. Configure plugin before enabling.
    Newmodbus3.png

    Newmodbus4.png

    Newmodbus5.png
    IP - IP address of a ModBus TCP device, make sure that you can ping this device
    Port - 502 it is default port in most cases, but check documentation of your ModBus TCP device
    Master/Slave - this option means that you add a Master device or Slave device
  4. Enable plugin.
    Newmodbus6.png

Examples

  1. Go to Scripts page and create Blockly script
    Newmodbus7.png
  2. Add ModBus block from Other tab
    Newmodbus8.png
  3. Choose ModBus TCP com-port from dropdown list and fill other fields. Save script and try it.
    Newmodbus9.png

Logs

Starting Service of MODBUS TCP plugin for Larnitech system...
Started Service of MODBUS TCP plugin for Larnitech system.
Compiled: Jul  7 2021 13:59:57
INF: Settings:
INF: debug yes - Debug mode is enabled
INF: modbus-devices 192.168.1.110:502:0
INF: Modbus 192.168.1.110:502:0 thread created
INF: Modbus 192.168.1.110:502:0 thread started
DEBUG: Modbus client: connected to 192.168.1.110:502:0 - Plugin connected to the device
DEBUG: Modbus client: waiting for messages for 192.168.1.110:502:0
DEBUG: Add message 01050011FF00 to 192.168.1.110:502:0 queue
DEBUG: Modbus thread unlocked for 192.168.1.110:502:0
DEBUG: Modbus client: send packet to 192.168.1.110:502:0 0x01050011FF00 - Send ‘ON’ to first coil
DEBUG: Modbus client: confirmation from 192.168.1.110:502:0 0x01050011FF00 - Right feedback from the device
DEBUG: Modbus client: waiting for messages for 192.168.1.110:502:0
DEBUG: Add message 010500110000 to 192.168.1.110:502:0 queue
DEBUG: Modbus thread unlocked for 192.168.1.110:502:0
DEBUG: Modbus client: send packet to 192.168.1.110:502:0 0x010500110000 - Send ‘OFF’ to first coil
DEBUG: Modbus client: confirmation from 192.168.1.110:502:0 0x010500110000 - Right feedback from the device
DEBUG: Modbus client: waiting for messages for 192.168.1.110:502:0