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:creating-new-project-hidden [2021/05/11 15:22]
lpolcerova
en:sw:01-mervis:creating-new-project-hidden [2024/01/24 09:30] (current)
avsetula [Uploading a blank configuration]
Line 1: Line 1:
 <​html><​div class="​version-switch">​ <​html><​div class="​version-switch">​
-  <a href="#​first_project_with_a_unipi_controller"><​div class="​actual-version">​IDE v2.4.0</​div></​a>​ +  <a href="#​first_project_with_a_unipi_unit"><​div class="​actual-version">​IDE v2.3.0 ​and later</​div></​a>​
-  <a href="#​first_project_with_a_unipi_controller"><​div class="​actual-version">​IDE v2.3.0</​div></​a>​+
 </​div></​html>​ </​div></​html>​
-====== First project with a Unipi controller ​======+====== First project with a Unipi unit ======
 <WRAP group 100%> <WRAP group 100%>
 <WRAP half column 81%> <WRAP half column 81%>
Line 18: Line 17:
 </​WRAP>​ </​WRAP>​
  
-/* FIXME - prosím ověřit překlad poslední věty, případně upravit - LP: liší se CZ a EN verze ve významu; resp. EN má dodatečně:​ "and its indication by a diode" <- smazat?  +The following tutorial includes all basic configurations needed to create the core of a Mervis IDE project and to deploy it to Patron, Neuron, Gate, or Axon controller. All following tutorials use this one as their cornerstone. The last chapter of this manual is a well-known flashing diode, i.e. the program in FUPLA blocks switching the digital output. ​
-Následující návod obsahuje veškeré základní nastavení, které je potřebné pro vytvoření projektu v Mervis IDE a spuštění na kontrolérech Patron, Neuron, Gate, či Axon. Veškeré další návody se aplikují na tento první projekt. Poslední kapitola tohoto návodu je právě ono bliknutí diodou digitálního výstupu, tedy program ve FUPLA blocích spínající digitální výstup.  +
-*/ +
-The following tutorial includes all basic configurations needed to create the core of a Mervis IDE project and to deploy it to Patron, Neuron, Gate, or Axon controller. All following tutorials use this one as their cornerstone. The last chapter of this manual is a well-known flashing diode, i.e. the program in FUPLA blocks switching the digital output ​and its indication by a diode+
  
 <WRAP center round box> <WRAP center round box>
 <​html><​span class="​kbBlue-H4alt">​Prerequisites:</​span></​html>​ <​html><​span class="​kbBlue-H4alt">​Prerequisites:</​span></​html>​
   - PLC Unipi [[https://​www.unipi.technology/​patron-c44|Patron]] / [[https://​www.unipi.technology/​neuron-c2|Neuron]] / [[https://​www.unipi.technology/​gate-c50|Gate]] / Axon   - PLC Unipi [[https://​www.unipi.technology/​patron-c44|Patron]] / [[https://​www.unipi.technology/​neuron-c2|Neuron]] / [[https://​www.unipi.technology/​gate-c50|Gate]] / Axon
-  - [[https://​www.unipi.technology/​power-supply-for-din-rail-24v-dc-0-63a-p18|24 ​VDC / 0.5 A power supply]]+  - [[https://​www.unipi.technology/​power-supply-for-din-rail-24v-dc-0-63a-p18|24 ​V⎓ power supply]]
   - Downloaded Mervis OS archive for [[en:​files:​software:​os-images:​00-start#​patron_mervis_os|Patron]],​ [[en:​files:​software:​os-images:​00-start#​neuron_mervis_os|Neuron]],​ [[en:​files:​software:​os-images:​00-start#​gate|Gate]],​ or [[en:​files:​software:​os-images:​00-start#​axon_mervis_os|Axon]]   - Downloaded Mervis OS archive for [[en:​files:​software:​os-images:​00-start#​patron_mervis_os|Patron]],​ [[en:​files:​software:​os-images:​00-start#​neuron_mervis_os|Neuron]],​ [[en:​files:​software:​os-images:​00-start#​gate|Gate]],​ or [[en:​files:​software:​os-images:​00-start#​axon_mervis_os|Axon]]
   - a computer with [[en:​files:​software:​mervis:​00-start#​get_the_latest_stable_version|Mervis IDE]] installed ​   - a computer with [[en:​files:​software:​mervis:​00-start#​get_the_latest_stable_version|Mervis IDE]] installed ​
Line 102: Line 98:
  
 ===== Connecting the inputs/​outputs ===== ===== Connecting the inputs/​outputs =====
-/* FIXME - přeložit odstavec (nahradí celou tuto kapitolu) - Přeloženo (v CZ verzi chybí čárka []) 
-V Mervis IDE nyní máte přiřazen váš kontrolér. Z konstrukčního hlediska jsou kontroléry Unipi složeny z výpočetního modulu a desek plošných spojů se vstupy a výstupy[,] se kterými Mervis RT primárně komunikuje skrze protokol **Modbus TCP**. Vyjímkou je řada Unipi Gate, kde vstupy a výstupy nejsou, ale je možné pomocí Modbus TCP číst stav interního úložiště. ​ 
- 
-Zmiňovaný Modbus TCP komunikační kanál se přidal automaticky s přiřazením kontroléru. Pod tímto komunikačním kanálem dále naleznete automaticky vloženou modbus tabulku nazvanou podle konkrétního modelu PLC. 
- 
-EN: 
 You now have assigned controller in the Mervis IDE. From a structural point of view, Unipi controllers consist of a computer module and printed circuit boards with inputs and outputs. Those are used by Mervis RT for primary communication via the **Modbus TCP** protocol. An exception is the Unipi Gate series, without inputs and outputs, but it is possible to read the status of the internal storage using Modbus TCP. You now have assigned controller in the Mervis IDE. From a structural point of view, Unipi controllers consist of a computer module and printed circuit boards with inputs and outputs. Those are used by Mervis RT for primary communication via the **Modbus TCP** protocol. An exception is the Unipi Gate series, without inputs and outputs, but it is possible to read the status of the internal storage using Modbus TCP.
  
Line 113: Line 103:
  
 {{ :​en:​sw:​01-mervis:​11_creating-new-project_en.png?​direct |}} {{ :​en:​sw:​01-mervis:​11_creating-new-project_en.png?​direct |}}
-*/ 
- 
-<WRAP center round tip 60%> 
-This step is done automatically since Mervis IDE 2.2.0 for Patron, Neuron and Axon controllers and adds only the default Modbus TCP channel. Additional channels (1Wire, Modbus RTU) has do be done manually. 
-</​WRAP>​ 
- 
-Now that we attached to the running controller, we can configure the inputs and outputs. The Unipi is internally consisting of the CPU unit (running Mervis OS), and input/​output backplane, which communicates with the CPU unit via ModbusTCP.  ​ 
- 
-To connect to the backplane, we need to add **Channel**. The **Channel** is a communication point with hardware which happens in the defined protocol. To add **Channel**,​ right-click on the **PLC** name and then click on the **Add Channel**. ​ 
- 
-{{ :​en:​sw:​01-mervis:​creating_new_project_17_add_channel.png?​direct |}} 
- 
-New communication channel will appear under the **PLC**. Click on it. In the **Properties** panel, you will see information about the channel. It is a good thing to rename the channel to something more descriptive,​ e.g. "​ModbusTCP"​ since this channel is for ModbusTCP communication. 
- 
-{{ :​en:​sw:​01-mervis:​creating_new_project_18_set_channel_name.png?​direct |}} 
- 
-Next thing we need to change is the protocol to **Modbus** 
- 
-{{ :​en:​sw:​01-mervis:​creating_new_project_19_set_channel_protocol.png?​direct |}} 
- 
-With **Modbus** protocol, we need to select correct **Link Protocol**. The default is **Serial**, but as we stated above, the UniPi backplane is connected via **TCP**. 
- 
-{{ :​en:​sw:​01-mervis:​creating_new_project_20_set_link_protocol.png?​direct |}}  
- 
-The **Channel** is configured, now we can add the device. Right-click on the new channel name in the **Left panel**. It is under the **PLC** option tree. In the context menu, select the **Add Library Device**. 
- 
-{{ :​en:​sw:​01-mervis:​creating_new_project_21_add_library_device.png?​direct |}} 
- 
-In the dialogue **Add Library Device**, there is a large list of the supported devices. For quick searching, type the model name of your controller into **Device Name**. In this tutorial, we use [[https://​www.unipi.technology/​unipi-neuron-l503-p105?​categoryId=10|UniPi Neuron L503]], and by typing **L503**, the unit was found. Select it by left click, and click on the {{:​en:​sw:​01-mervis:​creating_new_project_23_right_arrow.png?​direct&​25}} icon to add it into the list of selected devices and then hit **OK**. 
- 
-{{ :​en:​sw:​01-mervis:​creating_new_project_22_adding_library_device.png?​direct |}} 
- 
-The new device appears under the ModbusTCP channel we created a few moments ago. Double click on the name and new tab will appear in the **Main window** containing the list of all inputs and outputs provided by the unit. 
  
-{{ :​en:​sw:​01-mervis:​creating_new_project_24_inputs_outputs.png?​direct |}} 
  
 ===== Uploading a blank configuration ===== ===== Uploading a blank configuration =====
-/* FIXME - přeložit celý odstavec (nahradí původní) - přeloženo (odmazána CZ verze <- mám ponechávat?​) 
-Dotaz: čistý projekt = clean project? 
 Now we move to the configuration. This part is especially important if you are just starting a new project with a controller or expansion modules that have been used in the past. That's because these devices may have a previous configuration that is independent of the uploaded solution, even the operating system, and may unexpectedly affect the operation of the entire solution. Now we move to the configuration. This part is especially important if you are just starting a new project with a controller or expansion modules that have been used in the past. That's because these devices may have a previous configuration that is independent of the uploaded solution, even the operating system, and may unexpectedly affect the operation of the entire solution.
  
-There is no need to worry, just right-click on the modbus table named after the assigned controller in the current clean project and select **Configure Unipi module**. This will load the default configuration. Detailed description of this procedure is in the article: [[cs:​sw:​01-mervis:​unipi-configure-module-hidden|Konfigurace modulu Unipi]].+There is no need to worry, just right-click on the modbus table named after the assigned controller in the current clean project and select **Configure Unipi module**. This will load the default configuration. Detailed description of this procedure is in the article: [[en:​sw:​01-mervis:​unipi-configure-module-hidden|]].
  
 {{ :​en:​sw:​01-mervis:​12_creating-new-project_en.png?​direct |}} {{ :​en:​sw:​01-mervis:​12_creating-new-project_en.png?​direct |}}
-*/ 
  
-Now it's time to talk about the configuration of modules. This applies greatly if you are starting to work with PLC or Extension, which has been previously used. The units can have stored configuration,​ which is independent on the uploaded solution and therefor the PLC can act differently than expected. But no need to worry, all you need to do is to apply blank configuration by following this [[en:​sw:​01-mervis:​unipi-configure-module-hidden|tutorial]]. That's all you need to do right now and we will get back to this later in more details. 
  
 ===== Switching to Full Mode ===== ===== Switching to Full Mode =====
Line 174: Line 126:
 {{ :​en:​sw:​01-mervis:​14_creating-new-project_en.png?​direct |}} {{ :​en:​sw:​01-mervis:​14_creating-new-project_en.png?​direct |}}
  
-The result is you now have access to other functions. The most visible change occurred in the left panel - at its bottom, the **History log** item appeared. **Executable Projects** now also displays **generated.Mixed.st** file. This file contains variable definitions,​ in our case automatically generated by the Simple Mode. Don't delete, move or edit this file, its editing and creation are performed ​automatically. Autogen serves for automatic generation of variables from data points and can be applied to an entire device containing multiple data points, groups etc. +The result is you now have access to other functions. The most visible change occurred in the left panel - at its bottom, the **History log** item appeared. **Executable Projects** now also displays **generated.Mixed.st** file. This file contains variable definitions,​ in our case automatically generated by the Simple Mode. Don't delete, move or edit this file, its editing and creation are done automatically ​by Autogen 
 + 
 +Autogen serves for automatic generation of variables from data points and can be applied to an entire device containing multiple data points, groups etc. 
  
 <WRAP center round info 90%> <WRAP center round info 90%>
Line 215: Line 169:
  
 ===== Switching a digital output ===== ===== Switching a digital output =====
-With the project good to go, we will now move to create your first control program. Its purpose will be to periodically switch the **DO_1.01** output. ​/* FIXME - přeložit - Přeloženo: ​If this default project is created on a controller without digital outputs, you can also use a relay output, or create your own variable and simulate the output (e.g. for Unipi Gate).*/ /* FIXME - opravit překlad - Opraveno ​“Switch output” means that the output must be set to change values ''​True''​ and ''​False''​ repeatedly.*/ To switch the output will require setting output to alternate between ''​True''​ and ''​False''​ states. The basic executable project was generated automatically in Simple Mode, thanks to which we now have the **main** program available for creating the logic. In the **left panel** double-click on **main.Program.fbd**. ​+With the project good to go, we will now move to create your first control program. Its purpose will be to periodically switch the **DO_1.01** output. If this default project is created on a controller without digital outputs, you can also use a relay output, or create your own variable and simulate the output (e.g. for Unipi Gate). “Switch output” means that the output must be set to change values ''​True''​ and ''​False''​ repeatedly. The basic executable project was generated automatically in Simple Mode, thanks to which we now have the **main** program available for creating the logic. In the **left panel** double-click on **main.Program.fbd**. ​
  
 {{ :​en:​sw:​01-mervis:​22_creating-new-project_en.png?​direct |}} {{ :​en:​sw:​01-mervis:​22_creating-new-project_en.png?​direct |}}
Line 233: Line 187:
 {{ :​en:​sw:​01-mervis:​25_creating-new-project_en.png?​direct |}} {{ :​en:​sw:​01-mervis:​25_creating-new-project_en.png?​direct |}}
  
-/* FIXME -> je to v závorce na konci první věty ok? Níže se závorka opakuje... +For the demonstration and testing purposes you can create a simple logic for switching the above-mentioned **DO_1.01** (or the alternatives). The entire logic will consist of predefined **function blocks (FB)** available in Mervis libraries. Each FB is designed for one specific function and consists of inputs, internal logic and outputs. The values on the inputs are processed by the internal logic and it then projects the result on the outputs, which can be connected to the inputs of other FBs or to the hardware outputs. ​
-LP: záleží co se závorka snaží říct, významově možná spíše: (or the alternatives) +
-*/ +
-For the demonstration and testing purposes you can create a simple logic for switching the above-mentioned **DO_1.01** (or its alternative). The entire logic will consist of predefined **function blocks (FB)** available in Mervis libraries. Each FB is designed for one specific function and consists of inputs, internal logic and outputs. The values on the inputs are processed by the internal logic and it then projects the result on the outputs, which can be connected to the inputs of other FBs or to the hardware outputs. ​+
  
 Click on **FUPLA Box Explorer** - you can find it among tabs at the left panel'​s bottom edge.  Click on **FUPLA Box Explorer** - you can find it among tabs at the left panel'​s bottom edge. 
Line 256: Line 207:
 {{ :​en:​sw:​01-mervis:​29_creating-new-project_en.png?​direct |}} {{ :​en:​sw:​01-mervis:​29_creating-new-project_en.png?​direct |}}
  
-/* FIXME: závorka (or the alternatives) - viz výše */ +You now need to connect the pulse generator'​s output to **DO_1.01** input (or the alternatives). Right-click on **input section** to display a context menu, move the cursor over **Global Variables** and from the submenu choose **Insert existing variable**. ​
-You now need to connect the pulse generator'​s output to **DO_1.01** input (or its alternative). Right-click on **input section** to display a context menu, move the cursor over **Global Variables** and from the submenu choose **Insert existing variable**. ​+
  
 {{ :​en:​sw:​01-mervis:​30_creating-new-project_en.png?​direct |}} {{ :​en:​sw:​01-mervis:​30_creating-new-project_en.png?​direct |}}
  
-/* FIXME - upravit následující text dle CZ verze - upraveno: 
-LP: označení v názvu řetězce x y r w psát malým nebo velkým? V řetězcích jsou malým a v textu jsou zvýrazněny tučně... 
 In the **Insert Existing Variable** dialog window, you will see a list of all available variables, inputs and outputs of the controller. If the list is almost empty (this does not apply to Unipi Gate), you do not have Autogen-defined variables available for your PLC. In this case, right-click on the device (modbus table) next to the Modbus TCP channel and select **Set autogen** in the context menu. In the **Insert Existing Variable** dialog window, you will see a list of all available variables, inputs and outputs of the controller. If the list is almost empty (this does not apply to Unipi Gate), you do not have Autogen-defined variables available for your PLC. In this case, right-click on the device (modbus table) next to the Modbus TCP channel and select **Set autogen** in the context menu.
  
Line 274: Line 222:
 </​WRAP>​ </​WRAP>​
  
-The **Insert Existing Variable** dialog window displays a long list of available variables. You can search for the required variable manually, or try to search for it by its name. In this manual, we will enter **DO_** in the search bar, as this is how all digital outputs on the Unipi controller are named. Almost every Unipi controller has 4 digital outputs. Digital outputs are always marked with the key string **DO_y.x**, where **y** represents the number of the controller section and **x** the number of the specific output. Some output variables, including digital outputs, are marked at the end with the letter **r** or **w**, which indicates whether they are used to read the actual value or to entry. Select **DO_1.01_w** by a click and confirm with **OK**. +The **Insert Existing Variable** dialog window displays a long list of available variables. You can search for the required variable manually, or try to search for it by its name. In this manual, we will enter **DO_** in the search bar, as this is how all digital outputs on the Unipi controller are named. Almost every Unipi controller has 4 digital outputs. Digital outputs are always marked with the key string **DO_y.x**, where **Y** represents the number of the controller section and **X** the number of the specific output. Some output variables, including digital outputs, are marked at the end with the letter **R** or **W**, which indicates whether they are used to read the actual value or to entry. Select **DO_1.01_w** by a click and confirm with **OK**.
-*/ +
-In the **Insert existing variable**, a list of all available variables, inputs and outputs of your controller will be displayed. If the list is nearly empty, you probably did not use Autogen to define variables available for your PLC. In that case, right-click on devices in both I2C and Modbus TCP channels and click on **Set autogen** in the context menu.  +
- +
-If you followed the guide closely, Simple Mode already generated all variables for the program. +
- +
-<WRAP center round info 95%> +
-**Autogen** generates variables based on all available or selected data points of inputs and outputs. That means we need to generate this list to use the PLC's inputs/​outputs in the program. +
- +
-Alternatively,​ you can double-click on **Unipi1_Relays** / **Unipi1Lite_Relays** and set the Autogen manually by right-clicking on the **Relay1** data point and selecting **Set Autogen** in the context menu. You can use this method for other devices as well.  +
-</​WRAP>​ +
- +
-In the **Insert existing variable** dialogue window a long list of available variables will appear. You can search for variables manually, or you can try to find it by its name. For this tutorial, we will enter **Relay**, as all relays on Unipi 1.1/1.1 Lite are named as such. On Unipi 1.1 you have 8 changeover relays available, with Unipi 1.1 Lite having only 6 of them. A relay is always named **RelayN** with N representing a specific relay number (1-8). Click on **Relay1** and confirm by clicking on **OK**. ​+
  
 {{ :​en:​sw:​01-mervis:​31_creating-new-project_en.png?​direct |}} {{ :​en:​sw:​01-mervis:​31_creating-new-project_en.png?​direct |}}