Decoding the I/NET signal "flags" attribute

Decoding the I/NET signal "flags" attribute


In newer versions of XBuilder, when importing I/NET sav files into the project, an attribute called "flags" is included.  In an I2V integration, this signal can be used to decode the binary flags associated with an I/NET point.

Product Line



XBuilder 5.1.5 and later


In earlier versions of XBuilder, each binary flag was separated out into an individual signal.  These signals include:

  • test
  • manual
  • alarm
  • old
  • unack
  • alarm_ack

Binding each of these values (along with value, state, and/or control) for every point displayed on a graphic could quickly cause the number of bindings to expand to a number that caused performance issues with TGML graphics.  To combat this, all of the binary flags were combined into one signal called "flags."


The masking for the flags signal comes from the communications format of I/NET:

7 6 5 4 3 2 1 0
Test Alarm Alm Inh Unack Old Manual Not Used

To use these in a TGML graphic, read in the flags signal to a component attribute.  Then read the value and mask off the necessary bits:

test = ((flags & 128) == 128);
alarm = ((flags & 64) == 64);
unack = ((flags &16) == 16);
old = ((flags & 😎 == 8);
manual = ((flags & 4) == 4);

Test, Old, and Manual can be used to append the point value with a T, O, or M, respectively to emulate an I/NET environment.  Logic will need to be written to read in the alarm and unack signals:

alarm unack inhibit result
false false   No alarm condition
true false false Alarm is still active, but has been acknowledged
true false true Input active, but no alarm condition
false true   Alarm has cleared, was never acknowledged
true true   Unacknowledged alarm present
Tags (1)
Labels (2)
100% helpful (1/1)