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:storing-data-to-history-log-hidden [2020/05/21 07:32]
avsetula
en:sw:01-mervis:storing-data-to-history-log-hidden [2021/08/05 14:50] (current)
avsetula
Line 1: Line 1:
-====== ​Ukládání dat do záznamu historie ​====== +====== ​Storing data into a history log ====== 
-V tomto návodu se naučíte používat záznam historie pro krátkodobé (pamětí omezené) ukládání dat z kontrolérů ​Unipi používajících ​Mervis IDE.+<WRAP group> 
 +<WRAP half column 81%> 
 +This guide will demonstrate how to use history logs for short-term, memory-constrained data storage from Unipi controllers using the Mervis IDE. 
 +</​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-gate">​Gate</​span></​html>​ \\ 
 +<​html><​span class="​dev-tag dev-unipi11">​Unipi&​nbsp1.1</​span></​html>​ \\ 
 +<​html><​span class="​dev-tag dev-axon">​Axon</​span></​html>​ 
 +;;# 
 +</​WRAP>​ 
 +</​WRAP>​
  
 <WRAP center round box> <WRAP center round box>
-<​html><​span class="​kbBlue-H4alt">​Co budete potřebovat:</​span></​html>​ +<​html><​span class="​kbBlue-H4alt">​Prerequisites:</​span></​html>​ 
-  - kontrolér ​Unipi s nahraným ​Mervis OS. +  - Unipi controller running the Mervis OS 
-  - napájecí zdroj 24V+  - 24 V⎓ power supply
  
 {{ :​files:​img_breakline_2.png?​nolink |}} {{ :​files:​img_breakline_2.png?​nolink |}}
  
-<​html><​span class="​kbBlue-H4alt">​Pro účely tohoto návodu jsme:</​span></​html>​ +<​html><​span class="​kbBlue-H4alt">​For this tutorial, we have:</​span></​html>​ 
-  - [[cs:​sw:​01-mervis:​creating-new-project-hidden|vytvořili projekt ​přiřadili ​PLC]] +  - [[en:​sw:​01-mervis:​creating-new-project-hidden|created a project and attached ​a PLC to it]] 
-  - [[cs:​sw:​01-mervis:​creating-new-project-hidden#​zabezpeceni_kontroleru|zabezpečili ​PLC]] +  - [[en:​sw:​01-mervis:​creating-new-project-hidden#​securing_the_controller|secured the PLC]] 
-  - převedli jsme projekt ​Mervis IDE do [[cs:​sw:​01-mervis:​creating-new-project-hidden#​prepnuti_ze_zjednoduseneho_modu_na_plny_mod|plného módu]]+  - switched the Mervis IDE to [[en:​sw:​01-mervis:​creating-new-project-hidden#​switching_from_simple_mode_to_full_mode|Full mode]]
 </​WRAP>​ </​WRAP>​
  
-===== Nastavení úložiště ​===== +===== Memory storage settings ​===== 
-Pokud máte vše ze seznamu ​**Co budete potřebovat**, Váš pracovní prostor by měl vypadat následovně+If you have everything from the **Prerequisite** listyour workspace should look like this 
  
 {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-01-workspace.png?​direct |}} {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-01-workspace.png?​direct |}}
  
-Nejprve v **levém panelu** vyberte PLCV panelu ​**Vlastnosti** je nyní třeba změnit ​**Identifikace runtimu pro historii**. Tento atribut je používán jako identifikace historie ​PLC, pokud PLC připojíte k Mervis DB, bude tato identifikace využita i ve vizualizačním nástroji ​Mervis DB viewer. ​Zadejte dostatečně popisný názevjako např. lokace daného ​PLC či jeho funkci.+<​html><​div class="​directTag"​ id="​runtime-set"></​div></​html>​ 
 +Start by selecting the PLC in the **left panel**. In the **Properties** menu, you need to change ​**History Runtime Identification** attribute, which is used as identification of the PLC's historyIf the PLC will be connected to the Mervis DB service the identification will be also used in the Mervis DB viewer ​visualisation toolEnter a descriptive namesuch as the PLC's location or its function.
  
 {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-02-mervis-db-parameters.png?​direct |}} {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-02-mervis-db-parameters.png?​direct |}}
  
-Dalším krokem je definovat ​**Záznam historie** obsahující proměnné, které budeme chtít ukládat**levém panelu** klikněte pravým tlačítkem na **Historie** a z kontextového ​menu vyberte ​**Přidat novou historii**. +The next step is to define a **History log** containing all variables saved in the historyIn the **left panel** right-click on **History** and in the context ​menu choose ​**Add New History**.  
  
 {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-05-add-new-history.png?​direct |}} {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-05-add-new-history.png?​direct |}}
  
-Pod záložkou ​**Historie** **levém panelu** se objeví položka ​**Záznam historie**. Vyberte ji a přesuňte se do panelu ​**Vlastnosti**. +A new **History log** will appear under **History** in the **left panel**. Select it and head to the **Properties** panel 
  
 {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-06-history-properties.png?​direct |}} {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-06-history-properties.png?​direct |}}
  
-Změňte vlastnosti **Záznamu historie** dle následujícího:  +<​html><​span class="​kbBlueText">​Change History log properties to the following:</​span></​html>​ 
-  * **Historie ukládaná na PLC**: ​povolte ukládání záznamu nastavením hodnoty na ''​true''​.  +  * **History saved on PLC**: ​set to ''​true'' ​to enable data logging
-  * **Typ**: nastavte na ''​Synchronous'' ​FIXME Typ nemusi byt pouze synchronni ale i asynchronni. Tj zminitze ukladat jde i urcite udalosti +  * **Type**: set to ''​Synchronous'', ​for logging in intervals ​ 
-  * **Interval ukládání**: nastavuje inteval ukládání hodnot proměnných zapsaných v Záznamu historie+  * **Save Period**: determines the save period for variables included in the History log.
  
-**Záznam historie** máme nadefinovaný,​ můžeme do něj tedy přidat proměnnéNa **hlavním panelu** byste měli vidět hlavní pracovní prostorJednoduše klikněte pravým myšítkem na globální proměnnou ​''​office_Temperature'' ​a v kontextovém ​menu klikněte na **Přidat do historie**. Podobně můžete přidávat proměnné do historie i z **Prohlížeče proměnných**.+<​html><​span class="​kbBlueText">​Alternatively,​ you can enable event-based logging:</​span></​html>​ 
 +  ​* **Type**:''​Asynchronous''​ enables logging based on an event triggered by a selected variable 
 + 
 +**History log** is now defined and we can add variables into itOn the **main panel** you should see the main workspaceSimply right-click on ''​office_Temperature'' ​global variables and in the context ​menu click on **Add to History**.
  
 {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-07-add-to-history.png?​direct |}} {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-07-add-to-history.png?​direct |}}
  
-Objeví se dialogové okno **Přidat do historie**. Vyberte správný záznam historie a potvrďte kliknutím na **OK**.+Using a similar method you can add variables into history also from the **Variable browser**. 
 + 
 +{{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-07b-add-to-history.png?​direct |}} 
 + 
 +**Add to history** window will appear. Choose the correct history log and confirm by clicking on **OK**. ​
  
 {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-08-add-to-history-dialog.png?​direct |}} {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-08-add-to-history-dialog.png?​direct |}}
  
-Tento proces opakujte i pro zbytek proměnnýchAž budete hotovi**levém panelu** dvojitě klikněte na záznam historie, čímž na **hlavním panelu** zobrazíte kompletní seznam proměnných,​ které jsou k danému záznamu přiřazeny+Repeat the process for all remaining variablesWhen finisheddouble-click on the history log in the **left panel** to display a complete list of variables assigned to the given history log on the **main panel**. 
  
 {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-09-history-list.png?​direct |}} {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-09-history-list.png?​direct |}}
  
-**Nahrajte sestavu**. Nyní máte pro PLC nastaveno lokální ukládání historie proměnnýchTo, zda je záznam historie nastaven správně a další informace o historii se dozvíte po nahrání sestavy, pod kolonku ​**výstup** ve spodním paneluZde v textových záznamech vyhledejte ​''​statistiku historie''​.+**Deploy Solution**. The PLC is now ready to store variable history locallyYou can check the history log's configuration and other related info in the **Output** tab in the bottom panel after clicking on the Deploy solutionHere in the text logs look for ''​history statistics''​. ​
  
-FIXME Zminit cim a jak je ovlivnen max casovy usek dat ulozenych na PLC (interval ukladanipocet typ promennych)Pro pouziti v offline modu je tohle strasne dulezity, aby si to odladili specificky podle aplikace.+<WRAP center round tip 95%> 
 +This statistic also displays the period for which the history log will be stored in the PLC before being overwritten by new logs. The value is influenced by logging intervals and the number and data type of logged variables. To maximize the storage period we recommend optimizing these parameters. If you wantfor example, to log an outdoor temperature value, most applications should be able to make away with 1-hour intervalAnother option is to create a program (block) that compares temperature values to the most current logged ones, and triggers logging in asynchronous mode when the difference is greater than 1°C 
 +</​WRAP>​
  
 {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-10.png?​direct |}} {{ :​en:​sw:​01-mervis:​storing-data-to-mervis-db-10.png?​direct |}}
  
  
-===== Navazující návody ​===== +===== Related tutorials ​===== 
-  * [[cs:​sw:​01-mervis:​multiple-history-intervals-hidden|Více intervalů ukládání historie]] +  * [[multiple-history-intervals-hidden|]] 
-  * [[cs:​sw:​01-mervis:​download-history-log-hidden|Stažení záznamu historie z PLC]] +  * [[download-history-log-hidden|]] 
-  * [[cs:​sw:​01-mervis:​storing-data-to-mervis-db-hidden|Ukládání dat do Mervis DB]]+  * [[storing-data-to-mervis-db-hidden|]]