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/25 12:21]
avsetula
en:sw:01-mervis:storing-data-to-history-log-hidden [2021/08/05 14:50] (current)
avsetula
Line 1: Line 1:
 ====== Storing data into a history log ====== ====== Storing data into a history log ======
-This guide will demonstrate how to use history logs for short-term, memory-constrained data storage from Unipi controllers using the 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">​Prerequisites:</​span></​html>​ <​html><​span class="​kbBlue-H4alt">​Prerequisites:</​span></​html>​
   - Unipi controller running the Mervis OS   - Unipi controller running the Mervis OS
-  - 24V power supply+  - 24 V⎓ power supply
  
 {{ :​files:​img_breakline_2.png?​nolink |}} {{ :​files:​img_breakline_2.png?​nolink |}}
Line 20: Line 33:
 {{ :​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 |}}
  
-Start by selecting the PLC in the **left panel**. In the **Properties** menu, you need to change **Runtime ID for History** attribute, which is used as identification of the PLC's history. If the PLC will be connected to the Mervis DB service the identification will be also used in the Mervis DB viewer visualisation tool. Enter a descriptive name, such as the PLC's location or its function.+<​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 history. If the PLC will be connected to the Mervis DB service the identification will be also used in the Mervis DB viewer visualisation tool. Enter a descriptive name, such 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 |}}
  
-The next step is to defined ​**History log** containing variables ​we will want to save. In the **left panel** right-click on **History** and in the context menu choose **Add New History**.  ​+The next step is to define a **History log** containing ​all variables ​saved in the history. In 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 |}}
Line 32: Line 46:
 {{ :​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 |}}
  
-Change ​**History log** properties to the following: ​+<​html><​span class="​kbBlueText">​Change History log properties to the following:</​span></​html>​
   * **History saved on PLC**: set to ''​true''​ to enable data logging.   * **History saved on PLC**: set to ''​true''​ to enable data logging.
-  * **Type**: set to ''​Synchronous'', ​pro ukládání v intervalech ​ FIXME+  * **Type**: set to ''​Synchronous'', ​for logging in intervals ​
   * **Save Period**: determines the save period for variables included in the History log.   * **Save Period**: determines the save period for variables included in the History log.
  
-Alternativně můžete nastavit ukládání na základě událostiFIXME +<​html><​span class="​kbBlueText">​Alternatively,​ you can enable event-based logging:</​span></​html>​ 
-  * **Typ**: ''​Asynchronous'' ​umožní ukládání na základě události signalizované vybranou proměnou+  * **Type**:''​Asynchronous'' ​enables logging based on an event triggered by a selected variable
  
-**History log** is now defined and we can add variables into it. On the **main panel** you should see the main workspace. Simply right-click on ''​office_Temperature''​ global variables and in the context menu click on **Add to History**. Using a similar method you can add variables into history also from the **Variable browser**.+**History log** is now defined and we can add variables into it. On the **main panel** you should see the main workspace. Simply 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 |}}
 +
 +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**. ​ **Add to history** window will appear. Choose the correct history log and confirm by clicking on **OK**. ​
Line 52: Line 70:
 {{ :​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 |}}
  
-**Deploy Solution**. The PLC is now ready to store variable history locally. You can check the history log's configuration and other related info in the **Output** tab in the bottom panel. ​In-text logs located here to look for ''​history statistics''​. ​+**Deploy Solution**. The PLC is now ready to store variable history locally. You 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''​. ​
  
 <WRAP center round tip 95%> <WRAP center round tip 95%>
-FIXME To jak dlouho bude historie v PLC uloženanež se přepíše novými záznamyuvidíte právě v této statistice. Tato hodnota je ovlivněna intervaly ukládání do záznamupočtem ​datovým typem proměnných ukládaných do záznamuPro maximalizaci času doporučujeme optimalizovat tyto parametry, aby se vám hodnoty ukládaly pouze v reakci na změnu proměnné ​(asynchroní režim). Chcete-li například ukládat hodnotu venkovní teplotymělo by pro většinu aplikací stačit ukládání po 1 hodině. Další možností je vytvoření programu (bloku) sledujícího změny teplot oproti posledním uloženým hodnotám a při rozdílu větším než 1°C aktivuje uložení záznamu v asynchronním režimu.+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 exampleto log an outdoor temperature valuemost applications should be able to make away with 1-hour intervalAnother option is to create a program ​(blockthat compares temperature values to the most current logged onesand triggers logging in asynchronous mode when the difference is greater than 1°C. 
 </​WRAP>​ </​WRAP>​
  
Line 62: Line 80:
  
 ===== Related tutorials ===== ===== Related tutorials =====
-  * [[en:​sw:​01-mervis:​multiple-history-intervals-hidden|Multiple history log intervals]] +  * [[multiple-history-intervals-hidden|]] 
-  * [[en:​sw:​01-mervis:​download-history-log-hidden|Downloading history logs from a PLC]] +  * [[download-history-log-hidden|]] 
-  * [[en:​sw:​01-mervis:​storing-data-to-mervis-db-hidden|Storing data into Mervis DB]]+  * [[storing-data-to-mervis-db-hidden|]]