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:connecting-to-unipi-via-mervis-proxy-hidden [2020/06/22 16:04]
avsetula [Connecting to the PLC via Proxy]
en:sw:01-mervis:connecting-to-unipi-via-mervis-proxy-hidden [2022/09/06 08:19] (current)
avsetula
Line 6: Line 6:
 <WRAP half column 15%> <WRAP half column 15%>
 ;;# ;;#
-<​html><​span class="​dev-tag dev-axon">Axon</​span></​html>​ \\+<​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-neuron">​Neuron</​span></​html>​ \\
-<​html><​span class="​dev-tag dev-unipi11">​Unipi&​nbsp1.1</​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>​
 </​WRAP>​ </​WRAP>​
-===== Prerequisites ===== 
  
 +<WRAP center round box>
 +<​html><​span class="​kbBlue-H4alt">​Prerequisites:</​span></​html>​
   * Unipi controller running [[en:​files:​software:​os-images:​00-start|Mervis OS]]   * Unipi controller running [[en:​files:​software:​os-images:​00-start|Mervis OS]]
   * Temperature regulator project from the [[en:​sw:​01-mervis:​attaching-1-wire-devices-hidden#​download|Attaching 1-Wire devices]] tutorial.   * Temperature regulator project from the [[en:​sw:​01-mervis:​attaching-1-wire-devices-hidden#​download|Attaching 1-Wire devices]] tutorial.
-  * 24V power supply+  * 24 V⎓ power supply
   * 1-Wire temperature sensor   * 1-Wire temperature sensor
   * [[en:​sw:​01-mervis:​04-mervis-proxy|Mervis Proxy]] credentials ([[en:​sw:​01-mervis:​getting-mervis-licence-hidden|tutorial]] how to obtain it)   * [[en:​sw:​01-mervis:​04-mervis-proxy|Mervis Proxy]] credentials ([[en:​sw:​01-mervis:​getting-mervis-licence-hidden|tutorial]] how to obtain it)
  
 In this tutorial, we will use [[https://​www.unipi.technology/​unipi-neuron-l503-p105|Unipi Neuron L503]]. In this tutorial, we will use [[https://​www.unipi.technology/​unipi-neuron-l503-p105|Unipi Neuron L503]].
 +</​WRAP>​
  
-===== Setting the Proxy =====+===== 1. Setting the Proxy =====
 If you followed the **Prerequisites**,​ your workspace should look like this: If you followed the **Prerequisites**,​ your workspace should look like this:
  
Line 39: Line 43:
   * **Keep-alive Period**: leave this option unchanged   * **Keep-alive Period**: leave this option unchanged
  
-Since we changed the configuration of PLC, we need to upload it in order to take affect. Right click on the PLC in the **Left Panel** and in the context menu select the <​html><​span class="​avBlueText">​PLC Operation</​span></​html>​ -> <​html><​span class="​avBlueText">​PLC Setup</​span></​html>​ -> <​html><​span class="​avBlueText">​Upload configuration</​span></​html>​. If you are not sure, check out the [[en:​sw:​01-mervis:​updating-a-runtime-configuration-hidden|Uploading a RunTime configuration]] tutorial.+Since we changed the configuration of PLC, we need to upload it in order to take affect. Right click on the PLC in the **Left Panel** and in the context menu select the <​html><​span class="​avBlueText">​PLC Operation</​span></​html>​ -> <​html><​span class="​avBlueText">​PLC Setup</​span></​html>​ -> <​html><​span class="​avBlueText">​Upload configuration</​span></​html>​. ​ 
 + 
 +If you are not sure, check out the [[en:​sw:​01-mervis:​updating-a-runtime-configuration-hidden|Uploading a RunTime configuration]] tutorial.
  
 {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-03-upload-configuration.png?​direct |}} {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-03-upload-configuration.png?​direct |}}
Line 51: Line 57:
 {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-05-debug-session-1.png?​direct |}} {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-05-debug-session-1.png?​direct |}}
  
-===== Connecting to the PLC via Proxy ===== +===== 2. Connecting to the PLC via Proxy ===== 
-To use the power of proxy connections,​ it is time to learn about **Profiles**. **Profile** are used in situations, where you need to switch between different settings of the **Solution**. In this tutorial, we need to switch between two connection parameters settings: first, when we are connecting to UniPi via local LAN and secondwhen we are connecting ​via proxy.+To use the power of proxy connections,​ it is time to learn about **Profiles**. **Profile** are used in situations, where you need to switch between different settings of the **Solution**. In this tutorial, we need to switch between two connection parameters settings ​- the settings for connecting to the PLC on the local networkand the settings for remote access ​via proxy server.
  
-Every solution ​is automatically ​created with default profile, which you can see in the **Left panel** under the **System** ​option. To create new profile, right click on the default **Profile** and select **Add Child Profile**+Each newly created ​solution automatically ​includes a main (defaultprofile ​called "​**Profile**"​, which you can see in the **Left panel** under the **System** ​item. The main profile name cannot be changed. 
 + 
 +To create new profile, right-click on the default **Profile** and select **Add Child Profile**
  
 {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-06-add-child-profile.png?​direct |}} {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-06-add-child-profile.png?​direct |}}
  
-A new profile ​called Profile ​will appear ​under the default oneSelect it by clicking on it and move over to the **Properties panel**Change ​to name of the profile to **proxy**.+A new sub-profile will appear ​below the main profileEach sub-profile is offset ​to the right of the parent profile, indicating a hierarchy 
 + 
 +Click to select ​the newly created ​profile ​and change its name to **proxy** in the **Properties panel**.
  
 {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-07-profile-name.png?​direct |}} {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-07-profile-name.png?​direct |}}
  
-And repeat the process for another profile and let's call it **lan**. ​You should have this workspace ​afterwards:+You should have this workspace ​afterward:
  
 {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-08-both-profiles.png?​direct |}} {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-08-both-profiles.png?​direct |}}
  
-As you can see, the default Profile has colorized icon and the text is bold. This indicates the active profile. Any changes in the solution parameters will be stored into the active profile. To set another profile as active, double click on the profile name+As you can see, the default Profile has colorized icon and the text is bold. This indicates the active profile. Any changes in the solution parameters will be stored into the active profile. ​
  
-So double click on the **proxy** profile ​and it will become activeAs you can see, the default ​profile is still active ​as wellThis is due to the fact the **proxy** profile is a child profile of the default ​profile and therefor are active both.+To select another profile, ​double-click on its name to set it as active and all changes to the solution parameters will now be saved to this profile. 
 + 
 +Do this for the **proxy** profile. ​However, the main profile remains active because the **proxy** ​profile is based on the main profile. Therefore, both will be active. 
 + 
 +---- 
 + 
 +As we have not yet made any changes ​to the **proxy** ​sub-profile, it is now taking over all data from the parent ​profile. If we now change any parameter ​of the solution, it will be set only in the **proxy** sub-profile and the parent (main) profile will not be affected
  
 Now we can change the connection parameters to use the proxy. Select the PLC in the **Left panel** and move over to the **Properties panel**. In the section **PLC Connection Parameters** change the **Connection Type** to **Proxy**. Now we can change the connection parameters to use the proxy. Select the PLC in the **Left panel** and move over to the **Properties panel**. In the section **PLC Connection Parameters** change the **Connection Type** to **Proxy**.
Line 76: Line 92:
 In the section **Connection parameters** change the values accordingly:​ In the section **Connection parameters** change the values accordingly:​
   * **URI**: for PLCs using Mervis OS and Mervis IDE 2.3.0 or newer, set the URI to ''<​nowiki>​tcps://​proxy.unipi.technology:​12349</​nowiki>''​. For the rest, use ''<​nowiki>​tcp://​proxy.unipi.technology:​12348</​nowiki>''​   * **URI**: for PLCs using Mervis OS and Mervis IDE 2.3.0 or newer, set the URI to ''<​nowiki>​tcps://​proxy.unipi.technology:​12349</​nowiki>''​. For the rest, use ''<​nowiki>​tcp://​proxy.unipi.technology:​12348</​nowiki>''​
-  * **Proxy ID**: fill the proxy ID which you obtained in your account on [[http://​unipi.technology|unipi.technology]]+  * **Proxy ID**: fill in the proxy ID which you obtained in your account on [[http://​unipi.technology|unipi.technology]]
  
 {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-10-connection-parameters.png?​direct |}} {{ :​en:​sw:​01-mervis:​connecting-to-unipi-via-mervis-proxy-10-connection-parameters.png?​direct |}}
  
-Simply ​start the debugging session and the Mervis IDE will connect to the UniPi controller over the Mervis Proxy. +Now all that remains is to start the **debugging session** and the Mervis IDE will connect to the PLC through a proxy server. To switch ​back to the LAN connection, all you have to do is turn off debugging, ​set the main **Profile** as active, and start **debugging session** again.
- +
-To change the connection parameters ​back to LAN settings simply ​set the **lan** profile ​active.+
  
-/* 
 <WRAP center round important>​ <WRAP center round important>​
-**Pozor:** Při práci s profily je nutné dbát na to, aby veškeré změny v projektu byly aplikovány pouze v nadřazeném profilu (Profile)Změny v nadřazeném profilu se propisují do podřadných (zde Proxy), avšak změna provedená v podřadném profilu způsobí trvalou ztrátu dědičnosti vlastností nadřazeného profilu, a to u všech položek, které v podřadném profilu změníte.+__**Caution:**__ If you changed the wrong value in the sub-profile,​ or you wanted ​to make the change in the parent profileit is possible to reset the value in the sub-profile using the {{:​files:​dialog-reset2_button.png?​nolink|}} button next to the value. Clicking this button deletes the value and retrieves it from the parent profile.
 </​WRAP>​ </​WRAP>​
-*/