BD50_ALARM_MEMORY
PROGRAM TEST_BD50
VAR
BOOL1, BOOL2, BOOL3, BOOL4, BOOL5, BOOL6:BOOL;
FB : LIB.CORE.V1_0.BD50_ALARM_MEMORY;
END_VAR
FB.IN[1] := BOOL3;
FB.IN[2] := BOOL4;
FB(ACK:=BOOL1,RESET:=BOOL2);
BOOL5 := FB.OUT[1];
BOOL6 := FB.OUT[2];
END_PROGRAM
LIB\CORE
V1.0
The block is an alarm memory, with up to 16 alarms.
Input | Type | Description | Default value |
---|---|---|---|
IN | MULTIIOBOOL | Inputs of the alarm signals as an array | [False,...,False] |
ACK | BOOL | Acknowledge. If IN=TRUE and rising edge comes to ACK then ACKNOWLEDGED=TRUE (while keeping MEMORY=TRUE) | False |
RESET | BOOL | Reset of the alarm memory and ACKNOWLEDGED output. | False |
IN0,IN1,..,IN15 | BOOL | Inputs of the alarm signals |
Output | Type | Description |
---|---|---|
OUT | MULTIIOBOOL | Alarm output signals as an array. |
ACKNOWLEDGED | MULTIIOBOOL | Indication that an alarm has been acked |
MEMORY | BOOL | Alarm memory |
ALRSTATUS | INT | Status of the alarm block (bit 8 indicates IN=TRUE, bit 9 indicates ACKNOWLEDGED=TRUE, bit 10 indicates MEMORY=TRUE) |
OUT0,OUT1,..,OUT15 | BOOL | Alarm output signals. OUT is in TRUE until an alarm has been reset. |
This block is dedicated to deal with alarm states. The alarm signal is at the IN input. A rising edge on the IN input sets MEMORY to TRUE (alarm memory). The alarm can be reset by a rising edge at the RESET input. If IN=FALSE at the reset time, then MEMORY goes to FALSE. If the alarm is active (IN=TRUE), it can not be reset by the RESET input, but may be acknowledged by a rising edge brought to the ACK input. Note that in ST, the indeces are 1...16 rather than 0...15.
alrstatus values:
The alrstatus value may be addition of more of these states.