Description

An indirect tag binding is very much like a standard tag binding, except that you may introduce any number of indirection parameters to build a Tag path dynamically in the runtime.

Video recorded using: Ignition 7.7

Transcript

(open in window)

[00:00] Many projects you develop in Ignition have quite a bit of repetition. For example, you may have several tanks that are all identical and have the exact same tags. You want to be able to develop screens Ignition that can take advantage of this repetition. You certainly don't want to create 20 different screens for 20 identical tanks. You can simply create one screen with indirect tag bindings, where you basically bind to a set of tags, based on a parameter. So here, for example, I have 25 different tanks in my system. I have tank 100, all the way down to tank 124. Every tank is identical, in that they have the exact same set of tags. If I expand tank 100, I can see HOA level PV and temp PV. If I go down to my tank 101, I have the exact same set of tags. The only difference here, of course, is tank 100 is pointing to a different place in the PLC than 101. I actually created these tags as UDTs in Ignition, which can piggy back off that same hierarchy. So the only difference between the HOA tag and tank 100, and the HOA tag and tank 101, is the tag path itself. So when I look at two different tag paths, I can see for tank 100 and tank 101, the only difference here is the number. 100, and 101. Or you can say the whole name. Tank 100, and tank 101. We can actually take advantage of this fact that it's organized in this hierarchy, and replace any part of this tag path from a parameter. So for example, I can replace the 100 here, from a parameter on the screen. So let's create a screen that does this. Let's go and put a numeric text field on the top, which is going to be the actual number. 100, 101, 102, etc. So I'm going to go on down and set the value initially to 100 here. Now I can put a tank on the window to show the level PV. On the tank, I'm going to go down to the value property, I'm going to bind the value property to, rather than directly to a tag, to an indirect tag. Here, first we want to do is actually get a tag path that we are going to start with. So I'm going to go over here to the tag button, click on that, go and find a tag that we are going to look at initially. So I'm going to go down to tank 100, and select the level PV. You'll see it's going to put that exact same tag path in here. Now, the only part that I want to change here is this number, 100. So I'm going to remove 100, delete it, keep my cursor in the same location, on the right hand side I'm going to click on the property link, 'cause what I want to do is actually insert a reference right there to the numeric text field in the window. So I click on that button on the right hand side, go down to my window, find the numeric text field, and go down to its value integer, and press OK. As you can see, it puts a curly brace 1, with a reference down to the numeric text field. So now if I press OK essentially, the tank here is looking at whatever tank number I have specified up here in the numeric text fields. Right now it's looking at tank 100. If I expand tank 100, you can see level view is 32, when there is 32 percent here. If I set this to a value of say, 101, it's now going to look at tank 101. As you see here, level PV of that is 54. It's showing me 54. So basically, whatever number I have specified up here is the number I'm going to look at on the tank. So go to 124, now I'm looking at 124. So we're indirectly pointing to a set of tags, based on the parameter that we have right here. And certainly that indirection can go all the way. We can replace the folder that it's in. We can replace the entire tag path. We can have more than one reference if we want to. Basically, we can build that path any way that we want. At the end of the day, we're going to point to a set of tags, based on these different parameters.

You are editing this transcript.

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

close

Share this video