The message blocks with instance data are system function blocks in the operating system of the CPU. The message blocks must be called in a function block as a local instance. The instance data of the message blocks can then be found in the instance data of the function block.
Message blocks without mandatory acknowledgment The following message blocks are available:
b NOTIFY Alarm with up to ten associated values for a signal (SFB 36) b NOTIFY_8P Alarm with up to ten associated values for eight signals (SFB 31) Fig. 5.41 shows the graphic representation of the block calls.
NOTIFY generates an alarm if the signal state at the parameter SIG changes.
NOTIFY_8P generates an alarm if the signal state at one of the eight input parame- ters SIG_n changes. All eight signals have a common alarm ID that is split into eight individual alarms on the display device. Both message blocks always send an alarm during the first call.
The alarm-triggering signal is created at the SIG or SIG_n parameter. How the sig- nal is processed by the message block is described in section “Recording and saving signals” on page 241.
The parameter ID contains the data channel for the alarms and is occupied with the constant W#16#EEEE. The parameter EV_ID is provided with the input parameter of the “Message function block”, which contains the alarm number (see section “The principle of programming for the message numbering” on page 234). The parame- ter SEVERITY specifies the severity of the alarm in the range of 0 to 127 (the value 0 indicates the greatest severity). This parameter is meaningless for alarm process- ing.
Fig. 5.41 Message blocks with instance data without mandatory acknowledgment SIG_1
SIG_2
… SIG_8 ID EV_ID SEVERITY SD_1 SD_2
… SD_10
DONE ERROR STATUS SIG
ID EV_ID SEVERITY SD_1 SD_2
… SD_10
DONE ERROR STATUS NOTIFY
Instance data Instance data
NOTIFY_8P SFB 36
Generate an alarm without mandatory acknowledgment from a signal
SFB 31
Generate an alarm without mandatory acknowledgment from up to eight signals Message blocks with instance data without mandatory acknowledgment
At an SD_n parameter, an associated value is created for the alarm if needed. Up to 10 associated values can be parameterized. Working with associated values is de- scribed in section “Inserting associated values” on page 239.
The DONE parameter indicates with signal state “1” that the alarm generation has been completed. If the ERROR parameter has signal state “1”, an error has occurred, which is specified in more detail in the STATUS parameter.
Message blocks with possible mandatory acknowledgement The following message blocks are available:
b ALARM Alarm with up to ten associated values for a signal (SFB 33) b ALARM_8P Alarm with up to ten associated values for eight signals (SFB 35) b ALARM_8 Alarm without associated values for eight signals (SFB 34) Fig. 5.42 shows the graphic representation of the block calls.
If the mandatory acknowledgement is deactivated, ALARM generates an alarm if the signal state at parameter SIG changes. ALARM_8 and ALARM_8P generate an alarm if the signal state at one of the eight input parameters SIG_n changes. All eight signals have a common alarm ID that is split into eight individual alarms on the display device. All message blocks always send an alarm during the first call.
Fig. 5.42 Message blocks with instance data and possible mandatory acknowledgment
ALARM ALARM_8
Instance data Instance data Instance data
ALARM_8P
SFB 33 SFB 34
Generate an alarm without associated values from up to eight signals
SFB 35
Generate an alarm with associated values from up to eight signals Message blocks with instance data and possible mandatory acknowledgment
SIG EN_R
SIG_1 SIG_2
… SIG_8 EN_R
SIG_1 EN_R SIG_2
… SIG_8 ID EV_ID SEVERITY SD_1 SD_2
… SD_10 ID
ID EV_ID
EV_ID SEVERITY
SEVERITY SD_1
SD_2
… SD_10
DONE ERROR STATUS ACK_STATE ERROR
DONE
ERROR DONE
STATUS STATUS
ACK_DN ACK_UP
ACK_STATE Generate an alarm
with associated values from a signal
Alarm processing with activated mandatory acknowledgement is described in sec- tion “Alarm with mandatory acknowledgement” on page 241.
The alarm-triggering signal is created at the SIG or SIG_n parameter. How the sig- nal is processed by the message block is described in section “Recording and saving signals” on page 241.
The parameter ID contains the data channel for the alarms and is occupied with the constant W#16#EEEE. The parameter EV_ID is provided with the input parameter of the “Message function block”, which contains the alarm number (see section “The principle of programming for the message numbering” on page 234). The parame- ter SEVERITY specifies the severity of the alarm in the range of 0 to 127 (the value 0 indicates the greatest severity). This parameter is meaningless for alarm process- ing.
At an SD_n parameter, an associated value is created for the alarm if needed. Up to 10 associated values can be parameterized. Working with associated values is de- scribed in section “Inserting associated values” on page 239.
The parameter EN_R controls the updating of the acknowledgement display at the output parameters ACK_DN and ACK_UP or ACK_STATE. If EN_R is occupied with signal state “1”, the acknowledgement display is updated during the block call.
With signal state “0”, the acknowledgement displays remain unchanged. If an ac- knowledgement has been made for an incoming alarm event, the parameter ACK_UP or the bits 0 through 7 of the ACK_STATE parameter have signal state “1”.
If an acknowledgement has been made for an outgoing alarm event, the parameter ACK_DN or the bits 8 through 15 of the ACK_STATE parameter have signal state “1”.
The DONE parameter indicates with signal state “1” that the alarm generation has been completed. If the ERROR parameter has signal state “1”, an error has occurred, which is specified in more detail in the STATUS parameter.