Commissioning
There are two application examples for alarm handling commissioning:
- minimal application to describe only the alarm handling.
- Application with complete temperature library for alarm handling of the temperature library.
In both applications important places for alarm handling are marked by (*TVAlarm*).
Basic structure of the Example_TvAlarm application for alarm handling
The project has the following arrays:
- stVisuTempAlarm:
This array is of type ST_VisuAlarm (an application specific structure) and is used as a buffer in case there are several program parts generating an error at the same time (e.g. several zones on one extruder), as well as for presetting prio, Idx1 and Idx2 to each error number. - aaaPfwTempMessageHmi:
This array is of type ST_TcTvA_Alarm_Itf and is the array that must be used for visualization. Here the individual errors are listed in order. - FB_InitAlarmMessage:
In this function block exactly one error code is assigned to each cell of the array stVisuTempAlarm. - F_initTempMsg:
This function is called in the FB_InitAlarmMessage function block and is responsible for initializing the error code in the stVisuTempAlarm array. - FB_MsgCheck:
This function block must be called cyclically. All library function blocks are called from here. This means: - active messages are entered into the event system as active,
- inactive messages are entered into the event system as inactive,
- inactive messages can be deleted.
- FB_MsgCheckTemp:
In this function block all messages that have become active in this cycle are entered at the corresponding positions in the array stVisuTempAlarm.
Since the PfwLib_Processing.lib library was included in this example, various constants had to be declared for the temperature control. But these are unimportant for the actual alarm handling and only serve to compile the project. In the source code these places are marked accordingly.
Basic structure of the Example_TvAlarm_TempCtrl application for alarm handling
Compared to the example above, this alarm handling is much more sophisticated due to the different zones of temperature control and due to the many possible error messages.
The project have the following arrays:
- stVisuTempAlarm:
This array is of type ST_VisuAlarm (an application-specific structure) and serves as a buffer in case several alarms become active in one cycle. In the array you have the possibility to record 30 different errors for one zone. - aaaPfwTempMessageHmi:
This array is of type ST_TcTvA_Alarm_Itf and must be used for visualization. - FB_InitAlarmMessage:
In this function block exactly one error code is assigned to each cell of an array stVisuTempAlarm. - F_initTempMsg:
This function is called in the FB_InitAlarmMessage function block and is responsible for initializing the error code in the stVisuTempAlarm array. - FB_MsgCheck:
This function block must be called cyclically. All library function blocks are called from here. This means - active messages are entered into the event system as active,
- inactive messages are entered into the event system as inactive,
- inactive messages can be deleted.
- FB_MsgCheckTemp:
In this function block all messages that have become active in this cycle are entered at the corresponding positions in the array stVisuTempAlarm.