SectionFlags

SectionFlags

   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

LIB\JABLOTRON

V1.0



The block divides the Flags input value into individual bits. These bits are then represented on the output.

InputType Description Default value
FlagsUSINTCurrent flags of the section0
Output TypeDescription
InternalWarningBOOLInternal alarm horn message
ExternalWarningBOOLExternal alarm horn message
FireAlarm BOOLFire alarm
IntruderAlarm BOOLIntruder alarm
PanicAlarm BOOLPanic alarm
EntryDelay BOOLEntry delay
ExitDelay BOOLExit delay

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.

Bit positionBit 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



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.

  • © Energocentrum Plus, s.r.o. 2017 - 2024