Difference between revisions of "Modbus Master"

From ESS-WIKI
Jump to: navigation, search
Line 51: Line 51:
 
== Configuration ==
 
== Configuration ==
  
<span style="font-size:medium;">EdgeSense Modbus Master can manage multiple Modbus Slave setting and individual sensor's parameters, below settings are default after Modbus Master installation.</span>
+
=== Configuration ===
  
 +
==== How to config Model ====
  
 +
Step 1. Go to "Plug-ins" / Plugin Config to select Modbus-Master Plug-in
  
<span style="font-size:medium;">1. Device Configuration: &lt;Install_folder&gt;\config\industry\device-industry.yaml</span>
+
[[File:Modbus config bQUoHri.png|800x480px|Modbus config bQUoHri.png]]
<pre>metadata:&nbsp;
 
&nbsp; name: "Modbus devices"
 
&nbsp; labels: ["Modbus"]&nbsp;
 
&nbsp; Description: "Modbus TCP/RTU devices with 3 sensors in holding register area 40001~40003"
 
&nbsp; UpdateData: 2020-01-08-14:25:30
 
  
# LinkInfo: You can add a new link with unique name
+
Setp 2. From Modbus-Master Configuration, open Model Management tab, click "+" to add new Model.
&nbsp; # <LinkName>: Unique Link Name
 
&nbsp; &nbsp; # Params: Serial Port or Network parameters
 
&nbsp; &nbsp; # Info: Time interval of polling data & check link&nbsp;
 
&nbsp; &nbsp; # DevList: Device list which defined in DeviceInfo section
 
  
LinkInfo:&nbsp;
+
[[File:Modbus config qpMUDCj.png|800x480px|modbus_config_qpMUDCj.png]]
&nbsp; TCP-IP-1:
 
&nbsp; &nbsp; Params:&nbsp;
 
&nbsp; &nbsp; &nbsp; Driver: Modbus-TCP
 
&nbsp; &nbsp; &nbsp; ConnectType: Net
 
&nbsp; &nbsp; &nbsp; IP: 127.0.0.1
 
&nbsp; &nbsp; &nbsp; Port: 502
 
&nbsp; &nbsp; &nbsp; Timeout: 1000 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# A request timeout in milliseconds
 
&nbsp; &nbsp;
 
&nbsp; &nbsp; Info:&nbsp;
 
&nbsp; &nbsp; &nbsp; PollingInterval: 3000 &nbsp;# Polling interval in milliseconds
 
&nbsp; &nbsp; &nbsp; Retry: 3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Count of retry min:0 max:3
 
&nbsp; &nbsp; &nbsp; AliveTime: 10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Link Timeout in second: SDK will release this link if there are any request over this AliveTime ( second )
 
&nbsp; &nbsp; &nbsp; CheckLinkInterval: 2 &nbsp; # Check link status interval (second)
 
  
&nbsp; &nbsp; DevList:
+
Setp 3. Input Model name and Description for new Model.
&nbsp; &nbsp; &nbsp; - Device-1
 
  
&nbsp; COM1:
+
[[File:Modbus config XLSJYyn.png|800x480px|modbus_config_XLSJYyn.png]]
&nbsp; &nbsp; Params:
 
&nbsp; &nbsp; &nbsp; Driver: Modbus-RTU
 
&nbsp; &nbsp; &nbsp; ConnectType: Serial
 
&nbsp; &nbsp; &nbsp; PortName: COM1
 
&nbsp; &nbsp; &nbsp; BaudRate: 9600
 
&nbsp; &nbsp; &nbsp; DataBits: 8
 
&nbsp; &nbsp; &nbsp; StopBits: 1
 
&nbsp; &nbsp; &nbsp; Parity: None
 
&nbsp; &nbsp; &nbsp; Timeout: 1000 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# A request timeout in milliseconds
 
&nbsp; &nbsp;&nbsp;
 
&nbsp; &nbsp; Info:&nbsp;
 
&nbsp; &nbsp; &nbsp; PollingInterval: 3000 &nbsp;# Polling interval in milliseconds&nbsp;
 
&nbsp; &nbsp; &nbsp; Retry: 3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Count of retry min:0 max:3
 
&nbsp; &nbsp; &nbsp; AliveTime: 10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Link Timeout in second: SDK will release this link if there are any request over this AliveTime ( second )
 
&nbsp; &nbsp; &nbsp; CheckLinkInterval: 2 &nbsp; # Check link status interval (second)
 
  
&nbsp; &nbsp; DevList:&nbsp;
+
Step 4. Click "+" to add Sensor - Input Sensor Name - Select Address Space, Access mode, Data Type, Data Format and input Address, Data Length, Minimal/Maximal Value for new sensor's attributes. - Input below timing attributes. . Period (second) . Delay (ms, range: 0~1000ms) . Retry
&nbsp; &nbsp; &nbsp; - Device-2
 
  
 +
*Click "Save" button to save the new sensor.
  
# DeviceInfo: You can add a new device with unique name
+
[[File:Modbus config qsox6hM.png|800x480px|modbus_config_qsox6hM.png]]
&nbsp; # <DeviceName>: Unique Device Name
 
&nbsp; &nbsp; # Params: Station number
 
&nbsp; &nbsp; # Profile: Profile file name
 
  
DeviceInfo:
+
Step 5. Repeat Step 4 to add another sensor.
&nbsp; Device-1:
 
&nbsp; &nbsp; Params:&nbsp;
 
&nbsp; &nbsp; &nbsp; Station: 1
 
  
&nbsp; &nbsp; Profile: MODBUS_DEVICE_01.yaml
+
[[File:Modbus config DPdBICk.png|modbus_config_DPdBICk.png]]
  
&nbsp; Device-2:
+
Step 6. Click "Save" button to save the new sensors.
&nbsp; &nbsp; Params:
 
&nbsp; &nbsp; &nbsp; Station: 2
 
  
&nbsp; &nbsp; Profile: MODBUS_DEVICE_02.yaml
+
[[File:Modbus config oXbCCsc.png|800x480px|modbus_config_oXbCCsc.png]]
  
</pre>
+
Step 5. Click "Save" button to save the new model.
  
 +
[[File:Modbus config kXoLU5M.png|800x480px|modbus_config_kXoLU5M.png]]
  
 +
<br/> &nbsp;
  
<span style="font-size:medium;">2. Sensor&nbsp;Configuration for Device-1: &lt;Install_folder&gt;\config\industry\Profile\MODBUS_DEVICE_01.yaml</span>
+
==== How to config Link ====
<pre>
 
metadata:&nbsp;
 
&nbsp; name: MODBUS_DEVICE_01.yaml
 
&nbsp; labels: ["MODBUS"]&nbsp;
 
&nbsp; Description: This profile is for Modbus device 01
 
&nbsp; version: 1.0.1
 
&nbsp; UpdateData: 2020-01-08-14:25:30
 
  
Sensor:
+
Step 1. From Modbus-Master Configuration, open Link Management tab, click "+" to add a new Link.
&nbsp; Temperature:
 
&nbsp; &nbsp; Params:
 
&nbsp; &nbsp; &nbsp; Address: 0 &nbsp; &nbsp;# Address
 
&nbsp; &nbsp; &nbsp; Length: 1 &nbsp;
 
&nbsp; &nbsp; &nbsp; DataType: int16
 
&nbsp; &nbsp; &nbsp; DataFormat: ABCD
 
  
&nbsp; &nbsp; Info:
+
[[File:Modbus config Sz3fL8f.png|800x480px|modbus_config_Sz3fL8f.png]]
&nbsp; &nbsp; &nbsp; v: -1
 
&nbsp; &nbsp; &nbsp; asm: rw &nbsp; &nbsp; &nbsp; # Access Right: r, w, rw
 
&nbsp; &nbsp; &nbsp; min: -10 &nbsp; &nbsp; &nbsp;# Minimum Value&nbsp;
 
&nbsp; &nbsp; &nbsp; max: 100 &nbsp; &nbsp; &nbsp;# Maximum Value
 
&nbsp; &nbsp; &nbsp; u: "celsius" &nbsp;# Unit
 
  
&nbsp; Humidity:
+
Step 2. Input Link Name, Link Type for the new Link.
&nbsp; &nbsp; Params:
 
&nbsp; &nbsp; &nbsp; Address: 1
 
&nbsp; &nbsp; &nbsp; Length: 1 &nbsp;
 
&nbsp; &nbsp; &nbsp; DataType: int16&nbsp;
 
&nbsp; &nbsp; &nbsp; DataFormat: ABCD
 
  
&nbsp; &nbsp; Info:
+
for Modbus-TCP link, set parameters: - IP - Port
&nbsp; &nbsp; &nbsp; v: -1
 
&nbsp; &nbsp; &nbsp; asm: rw &nbsp; &nbsp; &nbsp; # Access Right: r, w, rw
 
&nbsp; &nbsp; &nbsp; min: 0 &nbsp; &nbsp; &nbsp; &nbsp;# Minimum Value&nbsp;
 
&nbsp; &nbsp; &nbsp; max: 100 &nbsp; &nbsp; &nbsp;# Maximum Value
 
&nbsp; &nbsp; &nbsp; u: "percent" &nbsp;# Unit
 
  
</pre>
+
for Modbus-RTU link, set parameters: - COM port - Baudrate - Data bits - Stop bits - Parity mode
  
 +
Click "+" icon to add a new device.
  
 +
[[File:Modbus config Dvkgjc2.png|800x480px|modbus_config_Dvkgjc2.png]]
  
<span style="font-size:medium;">2. Sensor&nbsp;Configuration for Device-2: &lt;Install_folder&gt;\config\industry\Profile\MODBUS_DEVICE_02.yaml</span>
+
Step 3. Input Device Name, Station Id and select Model Profile for the new device. Model Profile should be added by upper Model Management steps.
<pre>metadata:&nbsp;
 
&nbsp; name: MODBUS_DEVICE_02.yaml
 
&nbsp; labels: ["MODBUS"]&nbsp;
 
&nbsp; Description: This profile is for Modbus device 02
 
&nbsp; version: 1.0.1
 
&nbsp; UpdateData: 2020-01-08-14:25:30
 
  
Sensor:
+
Click "Save" button to save the new device.
&nbsp; X-Axis:
 
&nbsp; &nbsp; Params:
 
&nbsp; &nbsp; &nbsp; Address: 0 &nbsp; # Address
 
&nbsp; &nbsp; &nbsp; Length: 1 &nbsp;
 
&nbsp; &nbsp; &nbsp; DataType: int16
 
&nbsp; &nbsp; &nbsp; DataFormat: ABCD
 
  
&nbsp; &nbsp; Info:
+
[[File:Modbus config CkZoH3H.png|800x480px|modbus_config_CkZoH3H.png]]
&nbsp; &nbsp; &nbsp; v: -1
 
&nbsp; &nbsp; &nbsp; asm: rw &nbsp; &nbsp; &nbsp;# Access Right: r, w, rw
 
&nbsp; &nbsp; &nbsp; min: -10 &nbsp; &nbsp; # Minimum Value&nbsp;
 
&nbsp; &nbsp; &nbsp; max: 100 &nbsp; &nbsp; # Maximum Value
 
&nbsp; &nbsp; &nbsp; u: "mm/sec" &nbsp;# Unit
 
  
&nbsp; Y-Axis:
+
Step 4. Click "Save" button to save the new link.
&nbsp; &nbsp; Params:
 
&nbsp; &nbsp; &nbsp; Address: 1
 
&nbsp; &nbsp; &nbsp; Length: 1 &nbsp;
 
&nbsp; &nbsp; &nbsp; DataType: int16&nbsp;
 
&nbsp; &nbsp; &nbsp; DataFormat: ABCD
 
  
&nbsp; &nbsp; Info:
+
[[File:Modbus config jGIBhIa.png|800x480px|modbus_config_jGIBhIa.png]]
&nbsp; &nbsp; &nbsp; v: -1
 
&nbsp; &nbsp; &nbsp; asm: rw &nbsp; &nbsp; &nbsp;# Access Right: r, w, rw
 
&nbsp; &nbsp; &nbsp; min: -100 &nbsp; &nbsp;# Minimum Value&nbsp;
 
&nbsp; &nbsp; &nbsp; max: 100 &nbsp; &nbsp; # Maximum Value
 
&nbsp; &nbsp; &nbsp; u: "mm/sec" &nbsp;# Unit&nbsp;
 
  
</pre>
+
Step 5. Click "Apply" button to apply the new link.
  
= Demonstration =
+
[[File:Modbus config YudsLa4.png|800x480px|modbus_config_YudsLa4.png]]
  
<span style="font-size:medium;">1. Open Modbus Simulator: Launch&nbsp;[https://www.win-tech.com/html/modsim32.htm ModSim32]&nbsp;and click "New" in program&nbsp;menu to create a new simulator page.</span>
+
Apply new settings Successfully
  
[[File:Modbus-Slave Modsim32 04.png|border|700x400px|Modbus-Slave Modsim32 04.png]]
+
[[File:Modbus config 7rvJoo5.png|800x480px|modbus_config_7rvJoo5.png]]
  
 +
Step 6. Go to Plugin List and select Modbus-Master plugin, the new sensor will be shown in this page
  
 +
[[File:Modbus config Sys1ZZH.png|800x480px|modbus_config_Sys1ZZH.png]]
  
<span style="font-size:medium;">2. Set parameter as below:</span>
+
<br/> &nbsp;
  
*<span style="font-size:medium;">Device Id: 1</span>
+
==== How to import plugin settings ====
*<span style="font-size:medium;">Address: 0001</span>
 
*<span style="font-size:medium;">Length: 2</span>
 
*<span style="font-size:medium;">Modbus Point Type: INPUT&nbsp;REGISTER</span>
 
  
<span style="font-size:medium;">[[File:Modsim-ir-01.png|520x400px|Modbus-Slave Modsim32 01.png]]</span>
+
Step 1. Click Import button from Modbus-Master Configuration
  
 +
[[File:Modbus config T6zjSoj.png|800x480px|modbus_config_T6zjSoj.png]]
  
 +
Step 2. Select target file you like to import
  
<span style="font-size:medium;">3. Enable Auto Simulation:</span>
+
[[File:Modbus config ZYeZTw5.png|800x480px|modbus_config_ZYeZTw5.png]]
  
*<span style="font-size:medium;">Double click on the sensor address 30001</span>
+
Import successful
*<span style="font-size:medium;">Click&nbsp;"Auto Simulation"</span>
 
  
 +
[[File:Modbus config k3N8BQO.png|800x480px|modbus_config_k3N8BQO.png]]
  
 +
Step 3. Click APPLY to use imported configuration
  
[[File:Modbus-Slave Modsim32 02.png|300x200px|Modbus-Slave Modsim32 02.png]]
+
[[File:Modbus config JTgo9CB.png|800x480px|modbus_config_JTgo9CB.png]]
  
 +
Apply new settings Successfully
  
 +
[[File:Modbus config WZGsmXR.png|800x480px|modbus_config_WZGsmXR.png]]
  
 +
<br/> &nbsp;
  
 +
==== How to export plugin settings ====
  
<span style="font-size: medium;">4. Set simulation parameters:</span>
+
Step 1. Click Export button from Modbus-Master Configuration
  
*<span style="font-size:medium;">Check&nbsp;"Enable"</span>
+
[[File:Modbus config tH3zFyI.png|800x480px|modbus_config_tH3zFyI.png]]
*<span style="font-size:medium;">Simulation Type: Increment</span>
 
*<span style="font-size:medium;">Change Interval (secs): 5</span>
 
*<span style="font-size:medium;">Step VAlue: 1</span>
 
*<span style="font-size:medium;">Low Limit: 10</span>
 
*<span style="font-size:medium;">High Limit: 20</span>
 
  
[[File:Modbus-Slave Modsim32 03.png|360x280px|Modbus-Slave Modsim32 03.png]]
+
Step 2. Explore the exported file
  
 +
[[File:Modbus config IU83MxX.png|800x480px|modbus_config_IU83MxX.png]]
  
 +
<br/> &nbsp;
  
<span style="font-size:medium;">5. Do the same step for the address 30002 and set simulation parameter as below:</span>
+
== Use case ==
  
*<span style="font-size:medium;">Simulation Type: Increment</span>
+
=== Connect and upload data for Modbus Temperature and Humidity sensor ===
*<span style="font-size:medium;">Low Limit: 60</span>
 
*<span style="font-size:medium;">High Limit: 80</span>
 
  
<span style="font-size:medium;">[[File:Modbus-Slave Modsim32 05.png|360x280px|Modbus-Slave Modsim32 05.png]]</span>
+
Use Modsim32 to simulate a modbus TCP device with a temperature sensor and a humidity sensor, config Modbus-Master to read these two sensors and upload iEdge cloud.
  
 +
&nbsp;
  
 +
==== Config Modbus simulator ====
  
 +
#Open Modbus Simulator: Launch ModSim32 and click "New" in program menu to create a new simulator page.
  
 +
[[File:Modbus config GskBtAL.png|800x480px|Modbus config GskBtAL.png]]
 +
<ol start="2" style="list-style-type: decimal;">
 +
<li>Set parameter as below:</li>
 +
</ol>
  
<span style="font-size:medium;">6. Set Connection to Modbus/TCP Svr:</span>
+
*Device Id: '''1'''
 +
*Address: '''0001'''
 +
*Length: '''2'''
 +
*Modbus Point Type: '''INPUT REGISTER'''
  
<span style="font-size:medium;">[[File:Modsim-ir-02.png|520x400px|Modbus-Slave Modsim32 06.png]]</span>
+
[[File:Modbus config wVMbXWs.png|800x480px|Modbus config wVMbXWs.png]]
 +
<ol start="3" style="list-style-type: decimal;">
 +
<li>Enable Auto Simulation:</li>
 +
</ol>
  
 +
*Double click on the sensor address 30001
 +
*Click "Auto Simulation"
  
 +
[[File:Modbus config PaxcEE3.png|800x480px|Modbus config PaxcEE3.png]]
 +
<ol start="4" style="list-style-type: decimal;">
 +
<li>Set simulation parameters:</li>
 +
</ol>
  
 +
*Check "Enable"
 +
*Simulation Type: Increment
 +
*Change Interval (secs): 5
 +
*Step VAlue: 1
 +
*Low Limit: 10
 +
*High Limit: 20
  
 +
[[File:Modbus config maLqhtS.png|800x480px|Modbus config maLqhtS.png]]
 +
<ol start="5" style="list-style-type: decimal;">
 +
<li>Do the same step for the address 30002 and set simulation parameter as below:</li>
 +
</ol>
  
 +
*Simulation Type: Decrement
 +
*Change Interval (secs): 5
 +
*Step VAlue: 1
 +
*Low Limit: 60
 +
*High Limit: 80
  
 +
[[File:Modbus config K98RWgN.png|800x480px|Modbus config K98RWgN.png]]
 +
<ol start="6" style="list-style-type: decimal;">
 +
<li>Set Connection to Modbus/TCP Svr:</li>
 +
</ol>
  
<span style="font-size:medium;">7. Edit Device Configuration for the demo: &lt;Install_folder&gt;\config\industry\device-industry.yaml</span>
+
*Click Connection
<pre>metadata:&nbsp;
+
*Click Modbus/TCP Svr to simulate Modbus TCP connection
&nbsp; name: "Modbus devices"
 
&nbsp; labels: ["Modbus"]&nbsp;
 
&nbsp; Description: "Modbus TCP/RTU devices with 3 sensors in holding register area 40001~40003"
 
&nbsp; UpdateData: 2020-01-08-14:25:30
 
  
# LinkInfo: You can add a new link with unique name
+
[[File:Modbus config ZhpooZd.png|800x480px|Modbus config ZhpooZd.png]]
&nbsp; # <LinkName>: Unique Link Name
+
<ol start="7" style="list-style-type: decimal;">
&nbsp; &nbsp; # Params: Serial Port or Network parameters
+
<li>Config Modbus-Master</li>
&nbsp; &nbsp; # Info: Time interval of polling data & check link&nbsp;
+
</ol>
&nbsp; &nbsp; # DevList: Device list which defined in DeviceInfo section
 
  
LinkInfo:&nbsp;
+
*Config Modbus-Master plugin as upper steps to complete the settings.  
&nbsp; TCP-IP-1:
 
&nbsp; &nbsp; Params:&nbsp;
 
&nbsp; &nbsp; &nbsp; Driver: Modbus-TCP
 
&nbsp; &nbsp; &nbsp; ConnectType: Net
 
&nbsp; &nbsp; &nbsp; IP: 127.0.0.1
 
&nbsp; &nbsp; &nbsp; Port: 502
 
&nbsp; &nbsp; &nbsp; Timeout: 1000 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# A request timeout in milliseconds
 
&nbsp; &nbsp;
 
&nbsp; &nbsp; Info:&nbsp;
 
&nbsp; &nbsp; &nbsp; PollingInterval: 3000 &nbsp;# Polling interval in milliseconds
 
&nbsp; &nbsp; &nbsp; Retry: 3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Count of retry min:0 max:3
 
&nbsp; &nbsp; &nbsp; AliveTime: 10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Link Timeout in second: SDK will release this link if there are any request over this AliveTime ( second )
 
&nbsp; &nbsp; &nbsp; CheckLinkInterval: 2 &nbsp; # Check link status interval (second)
 
 
 
&nbsp; &nbsp; DevList:
 
&nbsp; &nbsp; &nbsp; - Device-1
 
 
 
</pre>
 
 
 
 
 
 
 
<span style="font-size:medium;">8. Edit Sensor Configuration for the demo: &lt;Install_folder&gt;\config\industry\Profile\MODBUS_DEVICE_01.yaml</span>
 
<pre>metadata:&nbsp;
 
&nbsp; name: MODBUS_DEVICE_01.yaml
 
&nbsp; labels: ["MODBUS"]&nbsp;
 
&nbsp; Description: This profile is for Modbus device 01
 
&nbsp; version: 1.0.1
 
&nbsp; UpdateData: 2020-01-08-14:25:30
 
 
 
Sensor:
 
&nbsp; Temperature:
 
&nbsp; &nbsp; Params:
 
&nbsp; &nbsp; &nbsp; Address: 0 &nbsp; &nbsp;# Address
 
&nbsp; &nbsp; &nbsp; Length: 1 &nbsp;
 
&nbsp; &nbsp; &nbsp; DataType: int16
 
&nbsp; &nbsp; &nbsp; DataFormat: ABCD
 
 
 
&nbsp; &nbsp; Info:
 
&nbsp; &nbsp; &nbsp; v: -1
 
&nbsp; &nbsp; &nbsp; asm: r &nbsp; &nbsp; &nbsp; # Access Right: r, w, rw
 
&nbsp; &nbsp; &nbsp; min: -10 &nbsp; &nbsp; &nbsp;# Minimum Value&nbsp;
 
&nbsp; &nbsp; &nbsp; max: 100 &nbsp; &nbsp; &nbsp;# Maximum Value
 
&nbsp; &nbsp; &nbsp; u: "celsius" &nbsp;# Unit
 
 
 
&nbsp; Humidity:
 
&nbsp; &nbsp; Params:
 
&nbsp; &nbsp; &nbsp; Address: 1
 
&nbsp; &nbsp; &nbsp; Length: 1 &nbsp;
 
&nbsp; &nbsp; &nbsp; DataType: int16&nbsp;
 
&nbsp; &nbsp; &nbsp; DataFormat: ABCD
 
 
 
&nbsp; &nbsp; Info:
 
&nbsp; &nbsp; &nbsp; v: -1
 
&nbsp; &nbsp; &nbsp; asm: r &nbsp; &nbsp; &nbsp; # Access Right: r, w, rw
 
&nbsp; &nbsp; &nbsp; min: 0 &nbsp; &nbsp; &nbsp; &nbsp;# Minimum Value&nbsp;
 
&nbsp; &nbsp; &nbsp; max: 100 &nbsp; &nbsp; &nbsp;# Maximum Value
 
&nbsp; &nbsp; &nbsp; u: "percent" &nbsp;# Unit
 
 
 
<span style="font-size:medium;">9. Restart Modbus Master services</span></pre>
 
 
 
 
 
 
 
*<span style="font-size:medium;">Open Windows Task Manager</span>
 
*<span style="font-size:medium;">Restart service: device-modbus-protocol</span>
 
*<span style="font-size:medium;">Restart service: device-modbus-master</span>
 
 
 
 
 
 
 
 
 
 
 
<span style="font-size:medium;">10. Verify sensor data at DeviceOn Monitor Sensor Data page</span>
 
 
 
[[File:Modbus-Slave Modsim32 07.png|border|800x400px|Modbus-Slave Modsim32 07.png]]
 
  
 
= Release =
 
= Release =

Revision as of 10:57, 15 December 2022

Introduction

Modbus enables communication among many devices connected to the same network, for example, a system that measures temperature and humidity and communicates the results to a computer. Modbus is often used to connect a supervisory computer with a remote terminal unit (RTU) in supervisory control and data acquisition (SCADA) systems.

Many of the data types are named from its use in driving relays: a single-bit physical output is called a coil, and a single-bit physical input is called a discrete input or a contact.

Modbus Service is a Windows/Linux system service for WISE Agent to read sensor data from Modbus device or write data into Modbus device. After sensor data are acquired, WISE Agent will upload the data to the WISE-PaaS Cloud.



Features

EdgeSense Modbus-Master aims to collect data from Modbus Slave.

Feature:

  • Support connection with multiple Modbus slave.
  • Support access both Modbus TCP and RTU in one service.
  • Support individual read interval by connection.
  • Configurable sensor alias.
  • Support byte swap.
  • Support Modbus Coil, Descrete input, Input register & Holding register data.
  • Support maximal 10 links, 5 devices for each link, and 10 sensors for each device.
  • Default data report interval: 100ms, configable sensor R/W interval, default is 1000ms. 

How to

Software Requirements

  • MQTT broker (download link)
  • WISE Agent and enabled its connection with DeviceOn server 

Installation

Windows:

1. Download Modbus-Master for Windows from Release Table.

2. Double click the installer to launch the installer to install it to the machine.

Debian:

1. Download Modbus-Master for Debian from Release Table.

2. Launch the installer to install it to the machine.

sudo ./device-modbus-master-3.0.1-Debian_9.9-rk3399.run

Configuration

Configuration

How to config Model

Step 1. Go to "Plug-ins" / Plugin Config to select Modbus-Master Plug-in

Modbus config bQUoHri.png

Setp 2. From Modbus-Master Configuration, open Model Management tab, click "+" to add new Model.

modbus_config_qpMUDCj.png

Setp 3. Input Model name and Description for new Model.

modbus_config_XLSJYyn.png

Step 4. Click "+" to add Sensor - Input Sensor Name - Select Address Space, Access mode, Data Type, Data Format and input Address, Data Length, Minimal/Maximal Value for new sensor's attributes. - Input below timing attributes. . Period (second) . Delay (ms, range: 0~1000ms) . Retry

  • Click "Save" button to save the new sensor.

modbus_config_qsox6hM.png

Step 5. Repeat Step 4 to add another sensor.

modbus_config_DPdBICk.png

Step 6. Click "Save" button to save the new sensors.

modbus_config_oXbCCsc.png

Step 5. Click "Save" button to save the new model.

modbus_config_kXoLU5M.png


 

How to config Link

Step 1. From Modbus-Master Configuration, open Link Management tab, click "+" to add a new Link.

modbus_config_Sz3fL8f.png

Step 2. Input Link Name, Link Type for the new Link.

for Modbus-TCP link, set parameters: - IP - Port

for Modbus-RTU link, set parameters: - COM port - Baudrate - Data bits - Stop bits - Parity mode

Click "+" icon to add a new device.

modbus_config_Dvkgjc2.png

Step 3. Input Device Name, Station Id and select Model Profile for the new device. Model Profile should be added by upper Model Management steps.

Click "Save" button to save the new device.

modbus_config_CkZoH3H.png

Step 4. Click "Save" button to save the new link.

modbus_config_jGIBhIa.png

Step 5. Click "Apply" button to apply the new link.

modbus_config_YudsLa4.png

Apply new settings Successfully

modbus_config_7rvJoo5.png

Step 6. Go to Plugin List and select Modbus-Master plugin, the new sensor will be shown in this page

modbus_config_Sys1ZZH.png


 

How to import plugin settings

Step 1. Click Import button from Modbus-Master Configuration

modbus_config_T6zjSoj.png

Step 2. Select target file you like to import

modbus_config_ZYeZTw5.png

Import successful

modbus_config_k3N8BQO.png

Step 3. Click APPLY to use imported configuration

modbus_config_JTgo9CB.png

Apply new settings Successfully

modbus_config_WZGsmXR.png


 

How to export plugin settings

Step 1. Click Export button from Modbus-Master Configuration

modbus_config_tH3zFyI.png

Step 2. Explore the exported file

modbus_config_IU83MxX.png


 

Use case

Connect and upload data for Modbus Temperature and Humidity sensor

Use Modsim32 to simulate a modbus TCP device with a temperature sensor and a humidity sensor, config Modbus-Master to read these two sensors and upload iEdge cloud.

 

Config Modbus simulator

  1. Open Modbus Simulator: Launch ModSim32 and click "New" in program menu to create a new simulator page.

Modbus config GskBtAL.png

  1. Set parameter as below:
  • Device Id: 1
  • Address: 0001
  • Length: 2
  • Modbus Point Type: INPUT REGISTER

Modbus config wVMbXWs.png

  1. Enable Auto Simulation:
  • Double click on the sensor address 30001
  • Click "Auto Simulation"

Modbus config PaxcEE3.png

  1. Set simulation parameters:
  • Check "Enable"
  • Simulation Type: Increment
  • Change Interval (secs): 5
  • Step VAlue: 1
  • Low Limit: 10
  • High Limit: 20

Modbus config maLqhtS.png

  1. Do the same step for the address 30002 and set simulation parameter as below:
  • Simulation Type: Decrement
  • Change Interval (secs): 5
  • Step VAlue: 1
  • Low Limit: 60
  • High Limit: 80

Modbus config K98RWgN.png

  1. Set Connection to Modbus/TCP Svr:
  • Click Connection
  • Click Modbus/TCP Svr to simulate Modbus TCP connection

Modbus config ZhpooZd.png

  1. Config Modbus-Master
  • Config Modbus-Master plugin as upper steps to complete the settings.

Release

This is an overview that displays Modbus Service versions and some stats and numbers for each release.

Index Version Date Platform OS Release Note Installer
1 v3.0.1

2020/01/21

x86_64 CPU
Windows 10
  • Support connection for multiple Modbus slave.
  • Support Modbus TCP and RTU in one configuration.
  • Support individual read interval by connection.
  • Support only get Modbus data.
device-modbus-master-3.0.1.exe
2 v3.0.1

Coming soon

ARM CPU
Debian
  • Support connection for multiple Modbus slave.
  • Support Modbus TCP and RTU in one configuration.
  • Support individual read interval by connection.
  • Support only get Modbus data.
device-modbus-master-3.0.1-Debian_9.9-rk3399.run
3 v3.0.2

2020/02/17

x86_64 CPU
Windows 10
  • Support network link lost-reconnect feature.
  • Support serial port link lost-reconnect feature.
  • Support modbus slave lost-reconnect feature.
  • Support resume from S3/S4 feature.
device-modbus-master-3.0.2.exe
4 v3.0.2

2020/02/17

ARM CPU
Debian
  • Support network link lost-reconnect feature.
  • Support serial port link lost-reconnect feature.
  • Support modbus slave lost-reconnect feature.
  • Support resume from S3/S4 feature.
device-modbus-master-3.0.2-Debian_9.9-rk3399.run

Above files are available at local server, please paste file's url in File Explorer to copy file. (How to access to EOSSFS file server )