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: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ážemejak použít různé módy analogových výstupů na PLC Unipi+<WRAP group 100%> 
 +<WRAP half column 81%> 
 +In this tutorialwe 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 odporpř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 resistancewe 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** 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 moduletherefor 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**levém panelu** poklepejte na prototyp Vámi užívaného zařízení**hlavním panelu** se objeví seznam všech dostupných I/ODo 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 ExtensionDouble 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ítekaždý fyzický analogový výstup má dvě proměnné: AO_X.Y_r ​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áluProměnná s příponou ​_r slouží k odečtu aktuálně nastavené hodnoty na výstupuPro změnu módu vyberte odpovídající zapisovací proměnnoupak se přesuňte do panelu **Vlastnosti** a vyberte požadovaný mód v kolonce ​**Analogový typ**. +As you can seefor 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 outputYou will use this variable almost exclusively. The property with suffix ​_r is for reading back the current value set on the outputTo change the modeselect 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 sestavyPro 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 moduleswhich is not applicable by simply uploading the solutionTo 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í ​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ýšepříslušná proměnná se jmenuje ​AO_X.Y_w, kdy značí číslo skupiny a pozici uvnitř skupinyPro 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 real value to the variableAs we learned beforethe 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í hodnotykteré se nastaví automaticky po spuštění ​PLC. Děje se tak z toho důvoduaby ří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 valuewhich will be automatically set after starting the PLC. This functionality is for ensuringthat 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ýstupProces je stejný jako u nastavení módu výstupu - v **levém panelu** dvojitě klikněte na prototypvyhledejte danou proměnnouoznačte ji a v jejích ​**Vlastnostech** změňte kolonku ​"Výchozí hodnota" ​dle potřebyHodnotu zapisujte stejně jako u samotné proměnné - tjpro napětí se užívá údaj ve voltechpro 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 outputDouble click on the prototype in the **Left panel**, look for the desired variableselect it and in its **Properties panel** change the "Default value" ​to the desired oneThe value is the same you would write to the variable itselfSo for Voltage mode it is a float number in voltsfor 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 modulesyou 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ě ​jednotek ​Neuron ​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 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 ​apodTyto senzory disponují definovanou křivkou teploty ku odporu a v Mervis ​IDE lze hodnotu odporu převádět v teplotu ve stupních CelsiaTuto 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 ohmechTransformaci můžete změnit na "​ResistanceToTemperature"​, po čemž se objeví menu s dalšími možnostmiVš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čítatVšechny ostatní parametry můžete ponechat beze změnA 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 vsresistance curve and Mervis ​can directly transform the measured values into degrees of CelsiusThis 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 OhmsYou can change the transformation to "**ResistanceToTemperature**" ​and box with other options will appear underneathAll you need to do is to change the "​Kind" ​to the type of the resistive thermometer you are trying to read fromYou can leave all the other parameters as isAnd 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 |}}