Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:sw:01-mervis:creating-new-project-on-unipi11-hidden [2021/05/11 07:10] – lpolcerova | en:sw:01-mervis:creating-new-project-on-unipi11-hidden [2024/07/22 12:58] (current) – kcerny | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| < | < | ||
| <a href="# | <a href="# | ||
| + | <a href="# | ||
| </ | </ | ||
| ====== First project with Unipi 1.1/Lite ====== | ====== First project with Unipi 1.1/Lite ====== | ||
| Line 12: | Line 13: | ||
| ;;# | ;;# | ||
| </ | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP center round alert 60%> | ||
| + | Mervis 2.6.5 and newer do not use this way anymore, please refer [[en: | ||
| </ | </ | ||
| Line 21: | Line 26: | ||
| - [[https:// | - [[https:// | ||
| - MicroSD-> | - MicroSD-> | ||
| - | - [[https:// | + | - [[https:// |
| - | - Downloaded archive with [[en:files:software:os-images:00-start# | + | - Downloaded archive with [[en:hw:03-unipi11:download-image:01-mervis|Mervis OS for Unipi 1.1/ |
| - | - Computer with [[cs: | + | - Computer with [[en: |
| {{ : | {{ : | ||
| Line 30: | Line 35: | ||
| - [[en: | - [[en: | ||
| - [[en: | - [[en: | ||
| - | - [[en: | + | - [[en: |
| - Plug in the power supply and wait for at least a minute until the PLC's OS boots up. | - Plug in the power supply and wait for at least a minute until the PLC's OS boots up. | ||
| </ | </ | ||
| Line 44: | Line 49: | ||
| {{ : | {{ : | ||
| - | /* FIXME - přeloženo; | + | The second thing you need to specify when creating a solution is **Mode selection**. The mode determines the behaviour of the Mervis IDE during its use; **Simple Mode** pre-defines the whole core of the solution, i.e. defines basic programs, generates mapping of variables, etc. At the same time, however, this option will limit the selection of the programming method only to **Function Block Diagram (FBD)**. Simple mode is therefore especially suitable for beginners. For more experienced users, there is a **Full mode** from which you can switch to the Simple mode, but this step is irreversible. Full Mode does not create the initial project |
| - | sestava = setup (podle drivejsich prekladu KB), ale v celem textu pouzivano solution | + | |
| - | zjednodušený - může být i simplified, ale pokud se jedná o dualitu simple vs. full nechala bych simple | + | |
| - | pre-defines - předpokládám, | + | |
| - | CZ má: ...**Plný mód** ze kteréhou... ' | + | |
| - | + | ||
| - | Druhou věcí, kterou je třeba při vytváření sestavy specifikovat, | + | |
| - | */ | + | |
| - | The second thing you need to specify when creating a solution is **mode selection**. The mode determines the behaviour of the Mervis IDE during its use; **Simple Mode** pre-defines the whole core of the solution, i.e. defines basic programs, generates mapping of variables, etc. At the same time, however, this option will limit the selection of the programming method only to **Function Block Diagram (FBD)**. Simple mode is therefore especially suitable for beginners. For more experienced users, there is a **Full mode** from which you can switch to the Simple mode, but this step is irreversible. Full Mode does not create the initial project | + | |
| That said, it might be convenient (with the exception of some special cases) to create the solution' | That said, it might be convenient (with the exception of some special cases) to create the solution' | ||
| Line 64: | Line 61: | ||
| {{ : | {{ : | ||
| - | The **Attach Controller** dialogue will appear, in which we can specify, how the Mervis IDE should connect to the controller. If the PLC is in the same LAN network, you can use the **UDP Broadcast** and then click on **Next >**. | + | The **Attach Controller** dialogue will appear, in which we can specify, how the Mervis IDE should connect to the controller. If the PLC is in the same LAN network, you can use the **UDP Broadcast** and then click on **Next >**. |
| {{ : | {{ : | ||
| - | /* FIXME - přeložit (tlačítko jsem přeložil) - přeloženo | + | You will now be prompted to enter a username and password (SSCP access) to connect to the controller. The default setting is: **admin / rw**. Now leave and click **Next > |
| - | Nyní se zobrazí výzva k vyplnění jména a hesla (SSCP přístup) pro připojení k jednotce. Výchozí údaje jsou: **admin / rw**. Nyní ponechcejte a klikněte na **Next >**. | + | |
| - | + | ||
| - | You will now be prompted to enter a username and password (SSCP access) to connect to the unit. The default setting is: **admin / rw**. Now leave and click **Next > | + | |
| {{ : | {{ : | ||
| - | */ | ||
| Next window will show a progress bar as the Mervis IDE is looking for controllers on all network cards your computer has. | Next window will show a progress bar as the Mervis IDE is looking for controllers on all network cards your computer has. | ||
| Line 80: | Line 73: | ||
| {{ : | {{ : | ||
| - | After the searching is finished, you will be presented with the list of all detected controllers. The target controller has its name displayed in the **Platform** tab. This tutorial used Unipi 1.1 device - in your case, choose whatever controller you are using and click on **Next**. | + | After the searching is finished, you will be presented with the list of all detected controllers. The target controller has its name displayed in the **Platform** tab. This tutorial used Unipi 1.1 device - in your case, choose whatever controller you are using and click on **Next >**. |
| {{ : | {{ : | ||
| Line 92: | Line 85: | ||
| The last dialogue of the controller attaching process asks you about configuration download. The configuration holds basic settings of the Unipi controller, such as IP address, usernames and passwords, connections to Mervis DB and Mervis Proxy and so on. | The last dialogue of the controller attaching process asks you about configuration download. The configuration holds basic settings of the Unipi controller, such as IP address, usernames and passwords, connections to Mervis DB and Mervis Proxy and so on. | ||
| - | /* FIXME - přeloženo | ||
| - | V případě prvního přiřazení nového kontroléru doporučujeme konfiguraci vždy stáhnout. | ||
| - | */ | ||
| When assigning a new controller for the first time, we recommend that you always download the configuration. | When assigning a new controller for the first time, we recommend that you always download the configuration. | ||
| Line 101: | Line 91: | ||
| The controller has now connected. | The controller has now connected. | ||
| - | /* FIXME - přeloženo - dotaz: nastavení síťových karet = network card settings? | + | Select the item **PLC** in the left panel, after selecting it the properties of the connected controller will be displayed in the right panel **Properties**. This property panel is crucial, since you are setting up the controller |
| - | Označte v levém panelu položku **PLC**, po označení se v pravém panelu **Vlastnosti** zobrazí vlastnosti připojeného kontroléru. Tento panel vlastností je velice důležitý, | + | |
| - | + | ||
| - | Po dvojtém poklepání na **PLC** se zase v **hlavním panelu** objeví záložka **PLC**, kde je dále možné nastavit např. definici uživatelů pro webové rozhraní (HMI), mapování programů a další nastavení. | + | |
| - | */ | + | |
| - | Select the item **PLC** in the left panel, after selecting it the properties of the connected controller will be displayed in the right panel **Properties**. This property panel is crucial, since you are setting up the unit configuration there. The properties include, for example, network | + | |
| After double-clicking on **PLC**, the **PLC** tab will appear in the **main panel** again, where it is also possible to set e.g. user definitions for the web interface (HMI), program mapping and other settings. | After double-clicking on **PLC**, the **PLC** tab will appear in the **main panel** again, where it is also possible to set e.g. user definitions for the web interface (HMI), program mapping and other settings. | ||
| + | |||
| {{ : | {{ : | ||
| Line 117: | Line 103: | ||
| ===== Connecting inputs/ | ===== Connecting inputs/ | ||
| - | In Mervis IDE you now have Unipi 1.1/Lite attached. Construction-wise, | + | In Mervis IDE you now have Unipi 1.1/Lite attached. Construction-wise, |
| Add two **communication channels** to the PLC. TO add a channel right-click on the **PLC** name and then click on **Add Channel**. Repeat for the second channel. | Add two **communication channels** to the PLC. TO add a channel right-click on the **PLC** name and then click on **Add Channel**. Repeat for the second channel. | ||
| Line 127: | Line 113: | ||
| {{ : | {{ : | ||
| - | If you click on the first channel, its properties will appear in the right panel. The first item determines the channel' | + | If you click on the first channel, its properties will appear in the right panel. The first item determines the channel' |
| - | Click on **no protocol** and select **PlatformIO** from the list. By doing so more options will appear - all you need to do here is to make sure the **link protocol** is set to **I2C**. | + | Click on **no protocol** and select **PlatformIO** from the list. By doing so more options will appear - all you need to do here is to make sure the **link protocol** is set to **I²C**. |
| The first channel for relay outputs is already set. | The first channel for relay outputs is already set. | ||
| Line 143: | Line 129: | ||
| With both channels configured we can now move to add individual devices. These device definitions **are different between Unipi 1.1 and Unipi 1.1 Lite**, making the correct selection of definition necessary. | With both channels configured we can now move to add individual devices. These device definitions **are different between Unipi 1.1 and Unipi 1.1 Lite**, making the correct selection of definition necessary. | ||
| - | ==== I2C ==== | + | ==== I²C ==== |
| - | In the **left panel** right-click on the I2C channel. Select **Add Library Device** from the context menu. | + | In the **left panel** right-click on the I²C channel. Select **Add Library Device** from the context menu. |
| {{ : | {{ : | ||
| - | In the **Add Library Device** dialogue window you will see a list of devices. Find and expand the **Unipi (v1.1)** folder and move to the **I2C** subfolder. Select the suitable device definition accordingly (eg. **Analog-Inputs + Unipi1_Relays** for Unipi 1.1 and **Unipi1Lite_Relay** for Unipi 1.1 Lite). If you have the definition selected, click on the arrow icon {{: | + | In the **Add Library Device** dialogue window you will see a list of devices. Find and expand the **Unipi (v1.1)** folder and move to the **I²C** subfolder. Select the suitable device definition accordingly (eg. **Analog-Inputs + Unipi1_Relays** for Unipi 1.1 and **Unipi1Lite_Relay** for Unipi 1.1 Lite). If you have the definition selected, click on the arrow icon {{: |
| {{ : | {{ : | ||
| Line 163: | Line 149: | ||
| {{ : | {{ : | ||
| - | The new device will appear below the corresponding | + | The new device will appear below the corresponding |
| {{ : | {{ : | ||
| Line 169: | Line 155: | ||
| ===== Switching to Full Mode ===== | ===== Switching to Full Mode ===== | ||
| - | /* FIXME - opravit překlad dle CZ textu od " | + | As you created the solution in **Simple Mode**, you do not have access to some Mervis IDE functions such as history logs. The advantage of creating a project in Simple mode is that you create the basic structure |
| - | Zjednodušený - Simple/ | + | |
| - | + | ||
| - | Jelikož jste projekt vytvořili ve **Zjednodušeném módu**, nemáte nyní přístup ke všem funkcím v Mervis IDE, například k ukládání záznamů historie proměnných. Výhodou vytváření projektu ve Zjednodušeném módu však je, že se vytvoří základní kostra projektu, včetně vytvoření hlavního programu **main.program.fbd** a přiřazení tohoto programu do tasku PLC, není tedy nutné vše nastavovat manuálně. Další výhodou je, že veškeré datové body v definicích zařízení (např. v modbus tabulkách) mají automaticky generovány globální proměnné. To je užitečné hlavně při seznamování s Mervis IDE, aby vše bylo o něco jednodušší. | + | |
| - | */ | + | |
| - | As you created the solution in **Simple Mode**, you do not have access to some Mervis IDE functions such as history logs. The advantage of creating a project in Simple mode is that you create the basic skeleton | + | |
| With everything required configured, you can switch the solution to **Full Mode**. | With everything required configured, you can switch the solution to **Full Mode**. | ||
| Line 186: | Line 167: | ||
| {{ : | {{ : | ||
| - | 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 | + | 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, |
| + | |||
| + | <WRAP center round info 90%> | ||
| + | [[autogen-hidden|More about Autogen here]]. | ||
| + | </ | ||
| {{ : | {{ : | ||
| - | ===== Building and uploading | + | ===== Building and Deploying |
| ==== Solution building ==== | ==== Solution building ==== | ||
| Line 209: | Line 194: | ||
| ==== Deploying the solution ==== | ==== Deploying the solution ==== | ||
| - | /* FIXME - upravit překlad dle nové CZ verze textu - přeloženo | + | **Deploying a solution means:** compiling and then uploading the created binary file to the controller and running it in **Full run**. Click **Deploy Solution** on **upper ribbon** to deploy the solution. |
| - | Dotaz: nahrát - deploy vs. upload (?) | + | |
| - | + | ||
| - | Nahrání sestavy znamená kompilaci a následné nahrání vytvořeného binárního souboru do kontroléru a spuštění v **Full run**. Pro nahrání sestavy klikněte na **Deploy Solution** na **upper ribbon**. | + | |
| - | */ | + | |
| - | Deploying a solution means compiling and then uploading the created binary file to the controller and running it in **Full run**. Click **Deploy Solution** on **upper ribbon** to deploy the solution. | + | |
| {{ : | {{ : | ||
| Line 222: | Line 202: | ||
| {{ : | {{ : | ||
| - | /* FIXME - upravit překlad dle nové CZ verze textu - přeloženo | ||
| - | Dotaz: deploy vs. upload viz výše | ||
| - | Posledním krokem nahrání sestavy je nastavit nový stav kontroléru. Máte zde několik možností, pro účely tohoto návodu ale ponechte výchozí nastavené možnosti a klikněte na **OK**. | ||
| - | */ | ||
| The last step in deploying a solution is to set a new controller status. There are multiple options, but for the purposes of this tutorial, leave the default options and click **OK**. | The last step in deploying a solution is to set a new controller status. There are multiple options, but for the purposes of this tutorial, leave the default options and click **OK**. | ||
| Line 249: | Line 225: | ||
| {{ : | {{ : | ||
| - | /* FIXME - zkontrolovat následující EN text dle CZ verze, liší se hlavně konec - přeloženo - prosím o kontrolu hlavně poslední věty | ||
| - | |||
| - | Nyní pro ukázku a otestování můžete vytvořit jednoduchou logiku spínající právě výstup **Relay1**. Celá logika bude vytvářena z již předpřipravených **funkčních bloků (FB)**, které jsou obsaženy v knihovnách Mervis. Každý FB je navržen pro určitou specifickou funkci a je tvořen vstupy, vnitřní logiku a výstupy. Hodnoty na vstupech zpracovává vnitřní logika a ta následně promítá výsledek na výstupech, které dále můžete připojit na vstupy jiných FB, či k hardwarovým výstupům. | ||
| - | */ | ||
| For the demonstration and testing purposes you can create a simple logic for switching the above-mentioned **Relay1**. 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. | For the demonstration and testing purposes you can create a simple logic for switching the above-mentioned **Relay1**. 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. | ||
| Line 267: | Line 239: | ||
| {{ : | {{ : | ||
| - | /* FIXME - opravit první větu odstavce dle CZ textu - přeloženo/ | ||
| - | Blok **BD2 Pulse Generator** obsahuje jednoduchou logiku - ve výchozím nastavení výstup **Out** každou vteřinu periodicky přepíná | ||
| - | */ | ||
| The **BD2 Pulse Generator** block contains simple logic - by default, the **Out** output periodically switches between '' | The **BD2 Pulse Generator** block contains simple logic - by default, the **Out** output periodically switches between '' | ||
| Line 276: | Line 245: | ||
| {{ : | {{ : | ||
| - | You now need to connect the pulse generator' | + | You now need to connect the pulse generator' |
| {{ : | {{ : | ||
| - | In the Insert existing | + | In the **Insert existing |
| If you followed the guide closely, Simple Mode already generated all variables for the program. | If you followed the guide closely, Simple Mode already generated all variables for the program. | ||
| Line 294: | Line 263: | ||
| {{ : | {{ : | ||
| - | /* FIXME - opravit následující text podle CZ varianty - přeloženo | ||
| - | Výstupní proměnná se objeví v **sekci výstupů** na označené místo. Nyní je třeba propojit výstup funkčního bloku generátoru pulzů s proměnnou **Relay1**. Přemistěte kurzor na černou tečku vedle jména výstupu **Out** bloku generátoru pulzů. Objeví se malý box obsahující údaje o typu výstupu. | ||
| - | */ | ||
| The output variable appears in the **output section** at the marked location. Now it is necessary to connect the output of the function block of the pulse generator with the variable **Relay1**. Move the cursor to the black dot next to the **Out** output name of the pulse generator block. A small box will appear containing information about the type of output. | The output variable appears in the **output section** at the marked location. Now it is necessary to connect the output of the function block of the pulse generator with the variable **Relay1**. Move the cursor to the black dot next to the **Out** output name of the pulse generator block. A small box will appear containing information about the type of output. | ||
| Line 305: | Line 271: | ||
| {{ : | {{ : | ||
| - | You can now try to **build the solution** - see [[# | + | Now you can **Build Solution** - see [[# |
| If the build succeeded and you followed the instructions above correctly, you can **upload** the solution into the controller - see [[# | If the build succeeded and you followed the instructions above correctly, you can **upload** the solution into the controller - see [[# | ||
| - | Upon uploading | + | Upon deploying |
| ---- | ---- | ||