I am fairly new to ignition and was wondering how could I change the state of the multi state indicator depending on which tag value increases.
I was writing a Property Binding Expression but it does not work.
An expression binding on the state property should work. What is your expression? What states do you want and under what specific conditions?
I have 2 states, pass and fail. And I have two tags connected to a plc. So, if tag A increases I want the indicator to be in state 1(Pass) and if tag B increases I want the indicator to be in state 2 (fail).
What are the datatypes of these tags?
Integers.
For me, it would be easier to script this. Simply add two custom properties to your component, and bind your tags to them, and then, use the component's propertyChange event handler to drive the state.
Example:
if event.propertyName == 'tag1' and event.newValue > event.oldValue:
event.source.state = 0
elif event.propertyName == 'tag2' and event.newValue > event.oldValue:
event.source.state = 1
2 Likes