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
en:sw:01-mervis:multiple-unipi-through-sscp-hidden [2020/06/05 14:14]
jan_kozak
en:sw:01-mervis:multiple-unipi-through-sscp-hidden [2021/08/20 09:38] (current)
avsetula [1 Basic project settings in Mervis IDE]
Line 1: Line 1:
 ====== Controlling a PLC through SSCP protocol from another PLC  ====== ====== Controlling a PLC through SSCP protocol from another PLC  ======
-The SSCP protocol (Shark Slave Communication Protocol) is a proprietary communication protocol of Mervis systems. When compared to Modbus, SSCP holds the advantage of higher data transmission speed and support of secured communication. It serves for configuration,​ programming or data transfers. Data transfers are then the main focus of this tutorial - specifically,​ it demonstrates how to set up two PLC to allow one controller to control the other. ​ +<WRAP group> 
 +<WRAP half column 81%> 
 +The SSCP protocol (Shark Slave Communication Protocol) is a proprietary communication protocol of Mervis systems. When compared to Modbus, SSCP holds the advantage of higher data transmission speed and support of secured communication. It serves for configuration,​ programming or data transfers. Data transfers are then the main focus of this tutorial - specifically,​ it demonstrates how to set up two PLC to allow one controller to control the other. 
 +</​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>​
  
-==== Prerequisites ​====+<WRAP center round box> 
 +<​html><​span class="​kbBlue-H4alt">​Prerequisites:</​span></​html>​
   * Two [[https://​www.unipi.technology/​axon-c20|Unipi]] controllers running [[en:​files:​software:​os-images:​00-start|Mervis OS]]   * Two [[https://​www.unipi.technology/​axon-c20|Unipi]] controllers running [[en:​files:​software:​os-images:​00-start|Mervis OS]]
-  * [[https://​www.unipi.technology/​accessories-c4|24V DC power supply]]+  * [[https://​www.unipi.technology/​accessories-c4|24 V⎓ power supply]]
   * Local network connectivity (any switch or router))   * Local network connectivity (any switch or router))
   * 3× network cable (RJ45)   * 3× network cable (RJ45)
 +</​WRAP>​
  
 ===== 1 Basic project settings in Mervis IDE ===== ===== 1 Basic project settings in Mervis IDE =====
Line 15: Line 30:
 </​figure></​html>​ </​figure></​html>​
  
-Create the project in Simple Mode and then [[https://​kb.unipi.technology/​en:​sw:​01-mervis:​creating-new-project-hidden#​switching_from_simple_mode_to_full_mode|switch it to Full Mode]]. Then connect the first PLC to the project by right-clicking on <​html><​span class="​avBlueText">​PLC</​span></​html>​ and selecting <​html><​span class="​avBlueText">​Attach PLC</​span></​html>​.+Create the project in Simple Mode and then [[en:​sw:​01-mervis:​creating-new-project-hidden#​switching_to_full_mode|switch it to Full Mode]]. Then connect the first PLC to the project by right-clicking on <​html><​span class="​avBlueText">​PLC</​span></​html>​ and selecting <​html><​span class="​avBlueText">​Attach PLC</​span></​html>​.
  
 <​html><​figure ondblclick="​redirectImg(this)"​ class="​zoom"​ onclick="​zoom(event)"​ style="​background-image:​ url(https://​kb.unipi.technology/​_media/​cs:​sw:​01-mervis:​002_multiple-unipi-through-sscp-cz.png)">​ <​html><​figure ondblclick="​redirectImg(this)"​ class="​zoom"​ onclick="​zoom(event)"​ style="​background-image:​ url(https://​kb.unipi.technology/​_media/​cs:​sw:​01-mervis:​002_multiple-unipi-through-sscp-cz.png)">​
Line 54: Line 69:
 </​figure></​html>​ </​figure></​html>​
  
 +<​html><​div class="​directTag"​ id="​set-task"></​div></​html>​
 Double-click on <​html><​span class="​avOrangeText">​PLC_Slave</​span></​html>​ to open its properties. Right-click into the blank space to display a context menu, in which select ​ <​html><​span class="​avBlueText">​Add Task</​span></​html>​. Double-click on <​html><​span class="​avOrangeText">​PLC_Slave</​span></​html>​ to open its properties. Right-click into the blank space to display a context menu, in which select ​ <​html><​span class="​avBlueText">​Add Task</​span></​html>​.
  
Line 66: Line 82:
 </​figure></​html>​ </​figure></​html>​
  
-You can now add and configure all needed ​communication channels. You can draw inspiration from the following guides:  +<WRAP center round box> 
- +<​html><​span class="​kbBlueText">​You can now create ​communication channels ​to connect additional devices<​br>​ 
-Návody, návody, návody+Examples are available in the following guides:</​span></​html>​ 
 +  * [[en:​sw:​01-mervis:​attaching-1-wire-devices-hidden|]] 
 +  * [[en:​sw:​01-mervis:​connecting-to-extension-xg18-hidden|]] 
 +  * [[en:​sw:​01-mervis:​weintek-hmi-bacnet-mervis-hidden|]] 
 +  * [[en:​sw:​01-mervis:​communication-mervis-jablotron100-hidden|]] 
 +</​WRAP>​
  
 <​html><​figure ondblclick="​redirectImg(this)"​ class="​zoom"​ onclick="​zoom(event)"​ style="​background-image:​ url(https://​kb.unipi.technology/​_media/​cs:​sw:​01-mervis:​010_multiple-unipi-through-sscp-cz.png)">​ <​html><​figure ondblclick="​redirectImg(this)"​ class="​zoom"​ onclick="​zoom(event)"​ style="​background-image:​ url(https://​kb.unipi.technology/​_media/​cs:​sw:​01-mervis:​010_multiple-unipi-through-sscp-cz.png)">​
Line 86: Line 107:
 </​figure></​html>​ </​figure></​html>​
  
 +<​html><​div class="​directTag"​ id="​custom_endpoint"></​div></​html>​
 Name the device <​html><​span class="​avOrangeText">​slave_PLC</​span></​html>,​ select it and look into the right panel <​html><​span class="​avBlueText">​Properties</​span></​html>​. In <​html><​span class="​avBlueText">​SSCP device parameters</​span></​html>​ you need to select <​html><​span class="​avBlueText">​Source substation</​span></​html>​ and <​html><​span class="​avBlueText">​Custom</​span></​html>​ endpoint. By doing so another configuration will be displayed. All necessary info can be found in PLC properties. For communication with the local network enter the following parameters: ​ Name the device <​html><​span class="​avOrangeText">​slave_PLC</​span></​html>,​ select it and look into the right panel <​html><​span class="​avBlueText">​Properties</​span></​html>​. In <​html><​span class="​avBlueText">​SSCP device parameters</​span></​html>​ you need to select <​html><​span class="​avBlueText">​Source substation</​span></​html>​ and <​html><​span class="​avBlueText">​Custom</​span></​html>​ endpoint. By doing so another configuration will be displayed. All necessary info can be found in PLC properties. For communication with the local network enter the following parameters: ​
  
 <​html><​span class="​kbBlueText">​Parametry TCP:</​span></​html>​ <​html><​span class="​kbBlueText">​Parametry TCP:</​span></​html>​
   * **Device address:** Enter the IP address/​domain   * **Device address:** Enter the IP address/​domain
-  * **Device port:** 12346* +  * **Device port:** 12346 
-*since Mervis IDE/OS 2.3.0 you can use port 12347 for secure SSCP communication+ 
 +/FIXME -> since Mervis IDE/OS 2.3.0 you can use port 12347 for secure SSCP communication ​*/
  
 <​html><​span class="​kbBlueText">​SSCP device parameters:</​span></​html>​ <​html><​span class="​kbBlueText">​SSCP device parameters:</​span></​html>​
Line 104: Line 127:
 It is also possible for two PLCs to communicate through SSCP over vast distances. In this case, you also need to configure <​html><​span class="​avBlueText">​proxy</​span></​html>​ on <​html><​span class="​avOrangeText">​PLC_Slave</​span></​html>​. ​ It is also possible for two PLCs to communicate through SSCP over vast distances. In this case, you also need to configure <​html><​span class="​avBlueText">​proxy</​span></​html>​ on <​html><​span class="​avOrangeText">​PLC_Slave</​span></​html>​. ​
  
-If you want to use the proxy and it is already configured on the said PLC, adjust the following paramaters of the <​html><​span class="​avOrangeText">​SSCP_TCP</​span></​html>​ channel: ​+---- 
 + 
 +<WRAP center round info> 
 +If you want to use the proxy and it is already configured on the said PLC, adjust the following paramaters of the <​html><​span class="​avOrangeText">​SSCP_TCP</​span></​html>​ channel: 
 +</​WRAP>​ 
 + 
  
 <​html><​span class="​kbBlueText">​TCP Parameters:</​span></​html>​ <​html><​span class="​kbBlueText">​TCP Parameters:</​span></​html>​
   * **Device address:** [[urls-hidden|proxy.unipi.technology]]   * **Device address:** [[urls-hidden|proxy.unipi.technology]]
-  * **Port device:** 12348* +  * **Port device:** 12348 
-*since Mervis IDE/OS 2.3.0 you can use port 12349 for secure communication via proxy+ 
 +/FIXME -> since Mervis IDE/OS 2.3.0 you can use port 12349 for secure communication via proxy */
  
 <​html><​span class="​kbBlueText">​SSCP Device Parameters:</​span></​html>​ <​html><​span class="​kbBlueText">​SSCP Device Parameters:</​span></​html>​
Line 146: Line 175:
 </​figure></​html>​ </​figure></​html>​
  
-The next step is to use <​html><​span class="​avBlueText">​Autogen</​span></​html>,​ to create variables for data points. Right-click on each <​html><​span class="​avBlueText">​device</​span></​html>​ for each<​html><​span class="​avBlueText">​channel</​span></​html>​ and select <​html><​span class="​avBlueText">​set Autogen</​span></​html>​. More info about Autogen is availabl [[autogen-hidden|here]].+The next step is to use <​html><​span class="​avBlueText">​Autogen</​span></​html>,​ to create variables for data points. Right-click on each <​html><​span class="​avBlueText">​device</​span></​html>​ for each <​html><​span class="​avBlueText">​channel</​span></​html>​ and select <​html><​span class="​avBlueText">​set Autogen</​span></​html>​. More info about Autogen is availabl [[autogen-hidden|here]].
  
 <​html><​figure ondblclick="​redirectImg(this)"​ class="​zoom"​ onclick="​zoom(event)"​ style="​background-image:​ url(https://​kb.unipi.technology/​_media/​cs:​sw:​01-mervis:​019_multiple-unipi-through-sscp-cz.png)">​ <​html><​figure ondblclick="​redirectImg(this)"​ class="​zoom"​ onclick="​zoom(event)"​ style="​background-image:​ url(https://​kb.unipi.technology/​_media/​cs:​sw:​01-mervis:​019_multiple-unipi-through-sscp-cz.png)">​
Line 198: Line 227:
   * Using this method it is also possible to transfer program variables, ie. for collecting data from temperature sensors. ​   * Using this method it is also possible to transfer program variables, ie. for collecting data from temperature sensors. ​
  
-*/+/*
 ====== Connecting multiple Unipi PLC’s through the SSCP protocol ====== ====== Connecting multiple Unipi PLC’s through the SSCP protocol ======
 Do you need to use one Unipi PLC to read from or write to I/O’s of an another Unipi PLC? The SSCP communication protocol will allow you to do exactly that. In more complex projects the SSCP can be also used to relay variable values or data from various sensors. This tutorial will show you how to set up the SSCP.  Do you need to use one Unipi PLC to read from or write to I/O’s of an another Unipi PLC? The SSCP communication protocol will allow you to do exactly that. In more complex projects the SSCP can be also used to relay variable values or data from various sensors. This tutorial will show you how to set up the SSCP. 
Line 344: Line 373:
  
 ===== 5 Results ===== ===== 5 Results =====
-The project is now complete. If all steps were performed correctly, both PLC’s are now set to write the first PLC‘s <​html><​span class="​avOrangeText">​DI_1.01</​span></​html>​ value to <​html><​span class="​avOrangeText">​D0_1.01</​span></​html>​ output of the second druhého PLC.+The project is now complete. If all steps were performed correctly, both PLC’s are now set to write the first PLC‘s <​html><​span class="​avOrangeText">​DI_1.01</​span></​html>​ value to <​html><​span class="​avOrangeText">​D0_1.01</​span></​html>​ output of the secondPLC.
  
 If you opted for the **advanced user part**, both PLC also mutually Exchange temperature values from the 1-Wire sensors with the communication still controlled by <​html><​span class="​avOrangeText">​PLC_Master</​span></​html>​) If you opted for the **advanced user part**, both PLC also mutually Exchange temperature values from the 1-Wire sensors with the communication still controlled by <​html><​span class="​avOrangeText">​PLC_Master</​span></​html>​)
Line 357: Line 386:
   * PLC_Master can send the variable into PLC_Slave each second – however, this will result in clogging up the communication and slow response of the project. This solution was used for this tutorial simply because the logic in PLC_Slave is in this case irrelevant. ​   * PLC_Master can send the variable into PLC_Slave each second – however, this will result in clogging up the communication and slow response of the project. This solution was used for this tutorial simply because the logic in PLC_Slave is in this case irrelevant. ​
 \\ \\
 +*/