MessageDisplayByBit

From AdvancedHMI
Jump to: navigation, search

Message Display By Bit

This control is used to display messages associated to bits within a range of consecutive integers. In comparison to the MessageDisplayByValue, this control can show multiple active messages by rotating through them.

Properties
ComComponent Points to the driver instance for reading its values through
Messages A collection of Messages (Text, BackColor, ForeColor, etc.)to be displayed when it's associated bit is active.
PLCAddressValues An integer register in the PLC that points to the first element to be read for indicating active messages.
PLCElementBitWidth Indicates how many bits are in each element as defined by PLCAddressValue. For example, in Modbus 40001 would be a 16 bit integer.
PLCNumberOfElements Specifies the number of consecutive elements to concatenate their bits for messages.
ValueBitMask Integer value use to mask which bits are to be interpreted for message
INIFileName The name of a text file with a list of messages. This is used in place of defining messages through the Messages property.

Examples of usage:

1) Displaying alarm messages

INI File

Using an INI file can make maintaining messages easier and allow message changes without re-compiling the program. Another use would be using MessageDisplayByBit on multiple forms, but all having the same defined messages.

Example INI file:

0,No Messages
1,Alarm 1 with Red background, Red
2,Alarm with yellow background and black foreground,Yellow,Black