Question:
How can I generate an event that happens daily, always at the same ?
Solution:
To do so, follow these procedures:
1. Create an ExpressionTag.
2. Access this tag’s Alarms tab and check Always in Advise option.
Figure 01: Alarm
3. Configure the following expression in the tag:
13 == GetHour(currentTime) AND 36 == GetMinute(currentTime)
Figure 02: Expression
4. Configure the desired logic in the ExpressionTag’s script’s OnValueChanged event.
Figure 03: Script
NOTE: The numbers in the expression can be replaced by Ram tags, which will make the schedule more dynamic.
The sample application below shows you how to record a new register in the historic according to the configured time.