Attached here is the latest updated AHMI version of CButton.
You still need to follow the instructions about adding dll references from previous post.
It follows this order of visible colors, which makes it sort of a quad state control:
- Original color (ON = False, Highlight = False, HighlightBlink = False or True)
- ON color (ON = True, Highlight = False, HighlightBlink = False or True)
- Highlight color (ON = False or True, Highlight = True, HighlightBlink = False)
- Blinking Highlight colors (ON = False or True, Highlight = True, HighlightBlink = True)
These can be controlled with values from PLC by using the following properties:
PLCAddressON_ <-- which controls Original & ON color
PLCAddressHighlight <-- which controls Highlight color
PLCAddressHighlightBlink <-- which controls blinking but is dependent on the Highlight state
PLCAddressClick <-- can point to any of the above, or some other address, and will perform the function
as selected in the OutputType property (MomentarySet, Toggle, WriteValue, ... etc).
HighlightBlink is only active when the Highlight is set to True.
Current ON state will be observed after the Highlight is turned off.