Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
en:sw:01-mervis:connecting-to-modbus-slave-device-hidden [2018/06/19 08:11]
martin_kudlacek [Connecting to ModbusRTU slave]
en:sw:01-mervis:connecting-to-modbus-slave-device-hidden [2021/08/05 12:23]
avsetula
Line 1: Line 1:
 ====== Connecting to Modbus slave ====== ====== Connecting to Modbus slave ======
 +<WRAP group>
 +<WRAP half column 81%>
 One of the most common thing todo in industrial automation, is setting up the communication via Modbus. One of the most common thing todo in industrial automation, is setting up the communication via Modbus.
 +</​WRAP>​ 
 +<WRAP half column 15%> 
 +;;# 
 +<​html><​span class="​dev-tag dev-patron">​Patron</​span></​html>​ \\ 
 +<​html><​span class="​dev-tag dev-neuron">​Neuron</​span></​html>​ \\ 
 +<​html><​span class="​dev-tag dev-gate">​Gate</​span></​html>​ \\ 
 +<​html><​span class="​dev-tag dev-unipi11">​Unipi&​nbsp1.1</​span></​html>​ \\ 
 +<​html><​span class="​dev-tag dev-axon">​Axon</​span></​html>​ 
 +;;# 
 +</​WRAP>​ 
 +</​WRAP>​
 ===== Connecting to ModbusRTU slave ===== ===== Connecting to ModbusRTU slave =====
 Let's assume you have a basic project in **Full mode**. You are attached to the controller, you have created **Executable project** with one **FBD** program and this program is set in PLC's **Tasks**. You also did a **Set Autogen** on the UniPi controller, and the **Build** and **Deploy** works without any problem. Let's assume you have a basic project in **Full mode**. You are attached to the controller, you have created **Executable project** with one **FBD** program and this program is set in PLC's **Tasks**. You also did a **Set Autogen** on the UniPi controller, and the **Build** and **Deploy** works without any problem.
Line 41: Line 53:
 </​WRAP>​ </​WRAP>​
  
 +===== Configuration of datapoints =====
 The basic configuration of the ModbusRTU device is done, now we can dive into much more complicated stuff - the register map. Double click on the name of the newly added device. In the **Main window** an empty list of Modbus registers will appear. The basic configuration of the ModbusRTU device is done, now we can dive into much more complicated stuff - the register map. Double click on the name of the newly added device. In the **Main window** an empty list of Modbus registers will appear.
  
Line 59: Line 72:
 Unfortunately,​ this is where it starts to be really complicated,​ mostly due to the various ways of how the Modbus protocol is implemented by different vendors. Unfortunately,​ this is where it starts to be really complicated,​ mostly due to the various ways of how the Modbus protocol is implemented by different vendors.
  
-As you can see, the register'​s addresses are in hexadecimal format. You can't tell from the **Voltage** register, because the address of 5000 could be both in hexadecimal and decimal format. But if you take a look on the **Current** register, the value 500A clearly shows it is in hexadecimal format.+As you can see, the register'​s addresses are in hexadecimal format. You can't tell from the **Voltage** register, because the address of 5000 could be both in hexadecimal and decimal format. But if you take a look on the **Current** register, the value 500 A clearly shows it is in hexadecimal format.
  
 The Mervis IDE accepts only decimal values for Modbus registers, so you need to manually convert the ones from the manual, e.g. with calculator application in Windows or in MS Excel. The Mervis IDE accepts only decimal values for Modbus registers, so you need to manually convert the ones from the manual, e.g. with calculator application in Windows or in MS Excel.
Line 136: Line 149:
   * The **MultiByte Length (Parser)** is 4 (4 bytes = 2 16bit registers)   * The **MultiByte Length (Parser)** is 4 (4 bytes = 2 16bit registers)
  
-**Deploy** the solution, turn on the **Debugging** mode+Because we added new datapoint, you need to run the **Set Autogen** on the device. Then **Deploy** the solution, turn on the **Debugging** mode and switch to **Variable Browser** tab in **Main window**. In the browser, search for the **energyMeterL1**. You should see this: 
 + 
 +{{ :​en:​sw:​01-mervis:​connecting-to-modbus-slave-23-variable-browser.png?​direct |}}