Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:sw:01-mervis:analog-outputs-hidden [2020/03/03 14:12] jan_kozak |
en:sw:01-mervis:analog-outputs-hidden [2024/04/15 13:55] (current) avsetula [Measuring resistance (temperature)] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Analogové výstupy ====== | + | ====== Analog outputs ====== |
- | V tomto tutoriálu si ukážeme, jak použít různé módy analogových výstupů na PLC Unipi. | + | <WRAP group 100%> |
+ | <WRAP half column 81%> | ||
+ | In this tutorial, we are going to demonstrated how to use different modes of analog outputs. | ||
- | Na vybraných modelech jednotek Unipi naleznete i analogové výstupy schopné měřit odpor, předvedeme si proto, jak hodnoty odečtené z odporových teploměrů převést na teplotu. | + | Since some analog outputs are able to measure resistance, we will demonstrate how to directly transform measure values of resistive thermometers into temperature. |
+ | </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-axon">Axon</span></html> \\ | ||
+ | <html><span class="dev-tag dev-extens">Extension</span></html> | ||
+ | ;;# | ||
+ | </WRAP> | ||
- | ===== Co budete potřebovat ===== | + | </WRAP> |
- | * kontrolér Unipi s nahraným Mervis OS | + | <WRAP center round box> |
- | * připravený základní projekt s FBD programem | + | <html><span class="kbBlue-H4alt">Prerequisites:</span></html> |
- | * [[https://www.unipi.technology/cs/power-supplies-c15|24V napěťový zdroj]] | + | * UniPi controller running Mervis OS |
- | * znalosti fungování [[cs:automation:02-glossary:analog-outputs-hidden|analogových výstupů]] na jednotkách Unipi | + | * Basic project with attached controller a program in FBD mode |
+ | * [[https://www.unipi.technology/power-supplies-c15|24 V⎓ power supply]] | ||
+ | * Knowledge of how the [[en:automation:02-glossary:analog-outputs-hidden|analog outputs]] work on UniPi units | ||
- | V tomto tutoritálu budeme používat kontrolér [[https://www.unipi.technology/cs/unipi-neuron-l523-p329|Unipi Neuron L523]]. | + | In this tutorial, we will use [[https://www.unipi.technology/unipi-neuron-l503-p105?categoryId=10|Unipi Neuron L503]]. |
+ | </WRAP> | ||
- | ===== Úvod ===== | + | ===== Introduction ===== |
- | Analogové výstupy na PLC Unipi mohou mít různé funkce - viz [[cs:automation:02-glossary:analog-outputs-hidden|Analogové výstupy]]. Změna módu se provádí v Mervis IDE pomocí konfigurace jednotky, **změny proto nelze provádět přímo v programu** a program je třeba během nastavování zastavit. | + | The different analog outputs have different modes of operation, see [[en:automation:02-glossary:analog-outputs-hidden|Analog outputs]]. Change between modes in Mervis is done by configuring the UniPi module, therefor the **changes in modes cannot be done in the program** and the program has to be stopped during the configuration. |
<WRAP center round info 60%> | <WRAP center round info 60%> | ||
- | Ve výchozím stavu je každý výstup nastaven na "Napětí" a výstupní napětí je nastaveno na 0V. | + | The default mode of each output is "Voltage" and the output value is set to 0 V⎓. |
</WRAP> | </WRAP> | ||
- | ===== Změna módu ===== | + | ===== Changing between modes ===== |
- | Změny módu AO se provádí na prototypu PLC či rozšiřujícího modulu. V **levém panelu** poklepejte na prototyp Vámi užívaného zařízení. V **hlavním panelu** se objeví seznam všech dostupných I/O. Do vyhledávače zadejte "AO_", po čemž se Vám zobrazí všechny dostupné analogové výstupy. | + | The changes are done on the prototype of the PLC or Extension. Double click on the prototype in the **Left panel**. The list of all available inputs and outputs will show up in the **Main Window**. Search for "AO_" and you will be presented with the list of all Analog outputs. |
{{ :en:sw:01-mervis:analog-outputs-01-search-for-ao.png?direct |}} | {{ :en:sw:01-mervis:analog-outputs-01-search-for-ao.png?direct |}} | ||
- | Jak vidíte, každý fyzický analogový výstup má dvě proměnné: AO_X.Y_r a AO_X.Y_w. Přípona _w značí, že daná proměnná je určena pro zapisování hodnoty na výstup - tuto proměnnou budeme používat prakticky po celý zbytek tutoriálu. Proměnná s příponou _r slouží k odečtu aktuálně nastavené hodnoty na výstupu. Pro změnu módu vyberte odpovídající zapisovací proměnnou, pak se přesuňte do panelu **Vlastnosti** a vyberte požadovaný mód v kolonce **Analogový typ**. | + | As you can see, for each physical Analog output you have two properties available: AO_X.Y_r and AO_X.Y_w. The one with suffix _w is for writing the values to the output. You will use this variable almost exclusively. The property with suffix _r is for reading back the current value set on the output. To change the mode, select appropriate "write" variable, head over to the **Properties panel** and select the desired mode in the "Analog Type" property. |
{{ :en:sw:01-mervis:analog-outputs-02-change-type.png?direct |}} | {{ :en:sw:01-mervis:analog-outputs-02-change-type.png?direct |}} | ||
- | Změna, kterou jsme provedli, mění nastavení I/O modulů v PLC, nelze ji proto uložit pouhým nahráním sestavy. Pro uložení konfigurace se řiďte tutoriálem [[cs:sw:01-mervis:unipi-configure-module-hidden|Unipi - konfigurace modulu]]. | + | We just changed the configuration of the PLC modules, which is not applicable by simply uploading the solution. To save the configuration, follow the [[en:sw:01-mervis:unipi-configure-module-hidden|UniPi - Configure Module]] tutorial. |
- | + | ||
- | ===== Nastavení výstupu pro napětí a proud ===== | + | ===== Voltage and Current output ===== |
- | Nastavení výstupních hodnot pro napětí a proud probíhá stejně. Po nastavení příslušného módu můžete do proměnné jednoduše zapsat reálnou hodnotu. Jak jsme si ukázali výše, příslušná proměnná se jmenuje AO_X.Y_w, kdy X značí číslo skupiny a Y pozici uvnitř skupiny. Pro začlenění této proměnné do programu je nutné [[cs:sw:01-mervis:autogen-hidden|nastavit Autogen]]**. Poté se proměnná zobrazí v **Prohlížeči proměnných** a bude jí možné měnit v **Módu ladění**. | + | Setting the output values for both Voltage and Curent modes is the same. Once you set the correct mode, you can just simple write a real value to the variable. As we learned before, the correct variable is called AO_X.Y_w depending on the Group (number X) and the position in the group (number Y). To include this variable into the program, you need to **[[en:sw:01-mervis:autogen-hidden|Set Autogen]]**. After that, you will see the variable in **Variable Browser** and you will be able to change it in the **Debugging** mode. |
<WRAP center round info 60%> | <WRAP center round info 60%> | ||
- | Při nastavování hodnoty AO_X.Y_w pro mód napětí je zadávaná hodnota ve voltech (tj. hodnota 1,234 odpovídá 1,234V). U hodnoty proudu je používanou jednotkou miliampér (tj. hodnota 3,145 = 3,145 mA) | + | When setting the value of AO_X.Y_w in Voltage mode, the value you enter is in volts (value 1.234 = 1.234 V⎓). When setting the value in Current mode, the value you enter is in miliampers (value 3.145 = 3.145 mA) |
</WRAP> | </WRAP> | ||
- | ===== Výchozí hodnoty ===== | + | ===== Default values ===== |
- | Analogové výstupy lze nastavit na výchozí hodnoty, které se nastaví automaticky po spuštění PLC. Děje se tak z toho důvodu, aby řízená technologie mohla fungovat okamžitě po zapnutí PLC a nemusela čekat na spuštění řídicího programu. | + | The analog outputs can have a default value, which will be automatically set after starting the PLC. This functionality is for ensuring, that the connected technology will work right after the start of the PLC and not waiting until the Mervis Solution kicks in. |
- | Výchozí hodnotu lze nastavit ve vlastnostech zapisovací proměnné pro daný výstup. Proces je stejný jako u nastavení módu výstupu - v **levém panelu** dvojitě klikněte na prototyp, vyhledejte danou proměnnou, označte ji a v jejích **Vlastnostech** změňte kolonku "Výchozí hodnota" dle potřeby. Hodnotu zapisujte stejně jako u samotné proměnné - tj. pro napětí se užívá údaj ve voltech, pro proud údaj v miliampérech. | + | The default value is configured in the properties of the "write" variable for given input. The procedure is the same as with setting the mode of the output. Double click on the prototype in the **Left panel**, look for the desired variable, select it and in its **Properties panel** change the "Default value" to the desired one. The value is the same you would write to the variable itself. So for Voltage mode it is a float number in volts, for Current mode it is float number in miliampers. |
{{ :en:sw:01-mervis:analog-outputs-04-change-default-value.png?direct |}} | {{ :en:sw:01-mervis:analog-outputs-04-change-default-value.png?direct |}} | ||
- | Stejně jako u jakékoliv jiné změny nastavení modulů, i nyní je třeba [[cs:sw:01-mervis:unipi-configure-module-hidden|nastavení uložit]]. | + | And as with other changes to the configuration of the modules, you need to [[en:sw:01-mervis:unipi-configure-module-hidden|apply the configuration]] as we did above. |
- | ===== Odečet teploty z odporových teploměrů ===== | + | ===== Measuring resistance (temperature) ===== |
- | Analogové výstupy na skupině 1 jednotek Neuron a Axon (AO1.1) umožňuje kromě napětí a proudu měřit i odpor (FIXME link na mereni odporu do Automation 101 -> How to's). Nastavení AO1.1 probíhá stejně jako u napětí a proudu (viz výše). | + | The analog output on Group 1 of Neuron and Axon (AO_1.1) is able to measure resistance as well /* FIXME (check the documentation na mereni odporu do Automation 101 -> How to's) */. To set the AO_1.1 to the Resistance measurement mode, follow the configuration steps above. |
- | Měření odporu je většinou používán pro odečet údajů z odporových teplotních čidel, jako jsou Pt100, Pt1000, Ni1000 apod. Tyto senzory disponují definovanou křivkou teploty ku odporu a v Mervis IDE lze hodnotu odporu převádět v teplotu ve stupních Celsia. Tuto transformaci nastavíte ve **Vlastnostech** zapisovací proměnné, konkrétně v kolonce "Transformace". Ve výchozím stavu je nastavena "identity", což značí, že proměnná bude vždy obsahovat hodnotu odporu v ohmech. Transformaci můžete změnit na "ResistanceToTemperature", po čemž se objeví menu s dalšími možnostmi. Vše, co je třeba v této chvíli provést, je změnit "Kind" na typ odporového čidla, ze kterého chcete údaje vyčítat. Všechny ostatní parametry můžete ponechat beze změn. A stejně jako u předchozích nastavení, i nyní konfiguraci [[en:sw:01-mervis:unipi-configure-module-hidden|uložte]]. | + | The resistance measurement is mostly used for measuring resistive thermometers such are Pt100, Pt1000, Ni1000,... Those sensors have known temperature vs. resistance curve and Mervis can directly transform the measured values into degrees of Celsius. This transformation is done on the property of the "read" variable, as with all the previous changes. Look for the property "Transform" in the **Properties panel**. The default value is "identity", which means the variable will always contain the measured resistance in Ohms. You can change the transformation to "**ResistanceToTemperature**" and box with other options will appear underneath. All you need to do is to change the "Kind" to the type of the resistive thermometer you are trying to read from. You can leave all the other parameters as is. And as with all the changes to the configuration of the PLC, [[en:sw:01-mervis:unipi-configure-module-hidden|apply it]] as we did above. |
- | <WRAP center round tip 60%> | + | <WRAP center round important 90%> |
- | **Poznámka:** transformaci používejte pouze u __datového bodu analogového výstupu pro čtení__ (AO_x.xx_r), nikoliv pro zápis (AO_x.xx_w). | + | **Note:** apply the transformation only to the __analog output read__ data point (AO_x.xx_r), not to write (AO_x.xx_w). |
</WRAP> | </WRAP> | ||
- | {{ :en:sw:01-mervis:analog-outputs-05-tranform-kind.png?direct |}} | + | {{ :en:sw:01-mervis:analog-outputs-read-resistivity_transform.png?direct |}} |