KB-32492: Creating a daily alarms file.

Question:

How can I create a historic alarms file that is updated daily, always at the same time? 

Solution:

To do so, create an expression tag, and fetch its hour attribute in Global Manager. Then, on the tag’s Alarms tab, check Keep tag value always updated to ensure the script is called, because the tag is not linked to any object in the application.  After that, create the following script at OnValueChanged event:

DIM FileName
IF hour == 12 AND minute == 00
FileName = “Historic”+Str(day)+Str(month)+Str(year)+”.dat”
CopyFile(Hist1.filename, FileName)
ENDIF
Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

,

Deixe seu Comentário

Seu endereço de e-mail não será publicado. Campos marcados com asterisco são obrigatórios *