You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing email@example.com.
We are experiencing playback issues from our video hosting provider. Please check back shortly.
2:15Property Binding – Bidirectional
Take topic challenge
Expression Binding – Checking Conditions
Learn how to use the expression bindings to return true or false based on different conditions.
Video recorded using: Ignition 7.7
Transcript(open in window)
[00:00] You may want to show a graphic to represent a state of a machine. So for example I have a tag here called machine state. If the value is zero I want to show this first graphic, showing that it's off. If the value's one, I want to show this graphic here, showing that it's on. The value's two, I want to show that it is in manual mode. So essentially, I have to bind the visibility of each of these individual components, to one of the values of this machine state. So the first one here is only going to be visible if the machine state is equal to zero. So I can bind the visible property of this symbol to an expression where I can utilize that tag, and bring in machine state. And I'm going to say basically if it's equal to zero, it's going to be visible here. So that's the first one. I'm going to go ahead and copy that, cause it's very similar to the other two. On the second one, I want to show if the machine state is equal to one. I'm going to bind the visible property to an expression. This time I'm going to say machine state equals one. And lastly, I'm going to do the machine state two. I'm going to bind the visible property of that one, to expression machine state equals two. Now I have three different components, and right now because the value's two, this one here is showing up. What I want to do is take all three of these graphics, and I want to put them right on top of each other. So I'm basically going to select all three of them up to the top. I'm going to center them, all on top of each other here. So now it's one big graphic. And as soon as I change the state if I put it to a value of zero, you're going to see it go off. If I put it to a value of one, you're going to see it go to the on state. Put a value to a two, you're going to see it go back to the manual state. Essentially we can show the perfect graphic for the right state.