Introduction
RTE can manage an alarm history of a specified number of locations. It stores all alarms passing through the stack by associating date and time with them. It is retentive and is managed as a circular buffer.
Since RTE 34.20.3 the ability to add messages has been added.
Since RTE 34.24.10 alarm 9995 was added, which is entered into the alarm history when it is reset.
Since RTE 34.24.10 bit 1 of the variable sys_flag_2 was added, which allows immediate entry of all alarms into the history.
NOTE: It is recommended to use the SYS_LOG variable to have RTE autogenerate a log file within the CF also containing alarm history information. Since such a file can be easily transferred, with a CF reader, to the PC it can be sent, for example, via e-mail to the programmer for due analysis.
Logic for entering alarms into the history
A new alarm that enters the alarm stack of Robox devices is entered into the historian if the following conditions are met:
•The alarm history is enabled(alarm_history_item >= 0)
•The alarm was not already present in the alarm stack
•The alarm is of the type expected in the predefined variable ah_filter
•A time interval equal to ah_filter_time seconds has elapsed since the last time the alarm entered the stack
NOTE: From RTE 34.18.7 setting 0 as the entry number enables auto-sizing. Previously imposing 0 would disable management. To disable management put a negative value.
NOTE: The logic of entering messages into the history is equivalent to alarms' one.
User interaction with the alarm history
For configuration:
•From project configurator -> settings -> general -> alarms or via the keyword alarm_history_item, entered in the RTE.CFG file, can define how many alarms to store
•Through R3 program initialization of the predefined variable ah_filter can apply a filter on the type of alarms to be inserted (e.g.: only major alarms, only minor alarms, etc). By default all types are entered
•Through initialization from R3 program (or from configurator) of the predefined variable ah_filter_time can apply a time filter for inserting the same alarm. Default 1 second
For access from program R3:
•Using from program the ah_cmd function can send commands to the historian (ex: reset historian etc)
•Using from program the function ah_get_d can have information related to the content of the historian (ex: return alarm at position 34) returned in a variable of type STRU_AH_INFO
•Using from program function ah_get_s can have information related to the content of the history (e.g., return alarm at position 34) returned in a variable of type STRING
•Using from program the ah_info function one can get information regarding the number of alarms present and the identification number of the oldest and newest alarm
•Using from program the function ah_log one can enter messages directly into the history
•Using from program the ah_log_us function one can enter messages with USV user string variables directly into the history
For RDE shell access:
•Via the ALH shell command, the contents of the history can be viewed
•Via the ALHCMD shell command it is possible to send commands to the historian (ex: reset historian etc)
NOTE: Alarms with USV type parameters occupy multiple entries depending on string content (2 up to 7 alarm history entries).