Description

Learn how to make the property binding bidirectional so any update will be pushed to the binding source.

Video recorded using: Ignition 7.7

Transcript

(open in window)

[00:00] Property binding as an ignition can be bidirectional, so for example, I have a numeric text field in the window and I also have a slider component. I want to link the slider component to the value of the numeric text field so on the slider we can go down to the value property. On the right hand side I click on the 'bind' button. I can link it to another property in the window which is going to be the numeric text fields value integer. Again, making sure the two data types match up. As soon as I press 'okay', if I go into preview mode and I change the value of the numeric text field to say 50, you're going to see the slider value change. If I go over here and change it to a value of 25 I'm going to see the slider value change, because the slider's linked directly to the numeric text field. If I go to the slider now though and actually modify the value, say I go set it to 75, you're going to see that change does not get reflected back on the numeric text field, but I can go into the binding of the slider, going back into the value property, at the very bottom there is a way to make that binding bidirectional, so that if I change my other slider I can actually ride that value back to the numeric text field because it's linked to it. So, by making it bidirectional, as soon as I press 'okay' of course if I go and modify the value in the numeric text field to say 75, you see the slider change but now if I go over to the slider and change the value, you're going to see it reflect back on the numeric text field. This is also really important when we are using UDTs on Windows, for example, here I have a UDT on the root container as a custom property called Tank. Inside there I have an HOA property and what I want to do is to put in a multi-state button which allows me to actually read and write to that property that's inside the UDT. So if I go down my multi-state button to the control value, I can actually bind this to a property, going into my Tank's UDT and selecting the HOA. Now by making it bidirectional I can actually write that value when I, the operator, changes the state back to the tag that the UDT is linked to. Go ahead and press 'okay' there. On the indicator value here I'll set the link back to a property selecting the Tank's HOA. In this case in don't need it to be bidirectional because it's just there for display. SO now if I go into preview mode I can actually go and set this value off or auto and it actually gets reflected back on the tag there by linking it bidirectionally.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.