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 11:54] – avsetula | en:sw:01-mervis:creating-new-project-on-unipi11-hidden [2024/07/22 12:58] (current) – kcerny | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| ;;# | ;;# | ||
| </ | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP center round alert 60%> | ||
| + | Mervis 2.6.5 and newer do not use this way anymore, please refer [[en: | ||
| </ | </ | ||
| Line 22: | 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 31: | 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 45: | Line 49: | ||
| {{ : | {{ : | ||
| - | + | 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 | |
| - | + | ||
| - | /* FIXME - project skeleton */ | + | |
| - | 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 60: | 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 >**. |
| {{ : | {{ : | ||
| - | 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 > | + | 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 > |
| {{ : | {{ : | ||
| Line 72: | 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 102: | 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 112: | 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 128: | 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 148: | Line 149: | ||
| {{ : | {{ : | ||
| - | The new device will appear below the corresponding | + | The new device will appear below the corresponding |
| {{ : | {{ : | ||
| Line 154: | Line 155: | ||
| ===== Switching to Full Mode ===== | ===== Switching to Full Mode ===== | ||
| - | /* FIXME - project skeleton */ | + | 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 |
| - | 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 167: | 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 190: | Line 194: | ||
| ==== Deploying the solution ==== | ==== Deploying the solution ==== | ||
| - | 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. | + | **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 241: | 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 267: | 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 |
| ---- | ---- | ||