Runtime Binding

Thanks in advance for your help.

I have a dial with 3 buttons. At runtime I’d like to change the dial binding with the push of a button. Button A binds the dial to tag 40616, button B to 40615, and button C to 40614.

I’m a long time VB programmer, first time ignition user. Thanks for your help.

We spoke on the phone, but to clarify for everyone else, you just need to use an Indirect Tag binding. This can be done with just a few steps.

  1. Create a Dynamic Property somewhere on that screen that is a string representing the tag name. Usually this will be on the meter component or the container the meter and buttons are in.
  2. Configure the event script on your buttons to pass a tag name into that Dynamic Property. You can use the Set Property tab of the Event handlers screen.
  3. Set the indirect binding on the meter component’s value property to use that Dynamic Property as part of the tag path.

Now every time a button writes a new value into that Dynamic Property, the path to the tag will change.