====== SectionFlags ====== {{:en:mervis-ide:35-help:img_10.png?180}} ==== Block name ==== SectionFlags ==== ST call ==== PROGRAM TEST_SectionFlags VAR USINT1: USINT; BOOL1,BOOL2,BOOL3,BOOL4,BOOL5,BOOL6,BOOL7: BOOL; END_VAR FB(Flags:=USINT1, InternalWarning:= BOOL1, ExternalWarning:= BOOL2 FireAlarm:= BOOL3, IntruderAlarm:= BOOL4, PanicAlarm:= BOOL5, EntryDelay:= BOOL6, Exithelay:= BOOL7); END_PROGRAM ==== Library ==== LIB\JABLOTRON ==== Version ==== V1.0 \\ ---- ==== Description ==== The block divides the Flags input value into individual bits. These bits are then represented on the output. ==== Inputs ==== ^Input^Type ^Description ^Default value^ |Flags|USINT|Current flags of the section|0 | ==== Outputs ==== ^Output ^Type^Description ^ |InternalWarning|BOOL|Internal alarm horn message| |ExternalWarning|BOOL|External alarm horn message| |FireAlarm |BOOL|Fire alarm | |IntruderAlarm |BOOL|Intruder alarm | |PanicAlarm |BOOL|Panic alarm | |EntryDelay |BOOL|Entry delay | |ExitDelay |BOOL|Exit delay | ==== Function ==== The block reads the section’s flag value containing info about all flags of the section. The read value is transformed into an individual bit according to a bitmask. Each bit is written onto the corresponding output. According to its position, the bit may have multiple meanings, as listed in the table below. ==== Bitmask ==== ^Bit position^Bit meaning ^ |1 |Internal Warning | |2 |External Warning | |4 |Fire Alarm | |8 |Intruder Alarm | |16 |Panic Alarm | |32 |Entry Delay | |64 |Exit Delay | |0 |Default flag value| \\ ---- ==== Application example ==== {{:en:mervis-ide:35-help:img_11.png}} A **Section_Flag** read from a control module is connected to the **Flags** input. All outputs must be connected. Output values have multiple uses, ie. in a web interface for state indication or can serve as a trigger for sending notification or activation of the facility’s security protocols.