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 training@inductiveautomation.com.
Version:
LESSON LIST
-
6:41Tag Binding
-
4:55Indirect Tag Binding
-
3:16Property Binding
-
3:27Expression Binding
-
4:55Query Binding
-
5:35Tag History Binding
-
2:43Component Overlays
Take Topic Challenge
Supplemental Videos
-
3:31HTTP Binding
-
2:55Expression Structure Binding
-
3:14Tag Binding - Expression
-
3:01Tag History Binding - Expression
-
2:55Tag Drop
LESSON
Indirect Tag Binding
Description
Indirect Tag bindings provide the same component-tag synchronization of a standard Tag Binding, but allow the binding to dynamically synchronize with a different Tag. .
Video recorded using: Ignition 8.0
Transcript
(open in window)[00:00] In this lesson, we'll take a look at Indirect Tag Bindings in Perspective. So we can see that I have a couple of components here. I have an LED Display and a Numeric Entry Field. The LED Display we can see has a binding on the value property and it's simply using a direct Tag Binding to the Tower 1/Fan Speed tag, so Tower 1, Fan Speed. Right, and the values do seem to match up. So what I'd like to do, is I would like to be able to type in a number here inside of this Numeric Entry Field and then change the tower, or part of the path here, that this LED Display is using. So type a 2 into here, and then that way this binding will look at Tower 2. So if you wanted to be able to change your Tag Bindings on the fly like this, you could use an Indirect Tag Binding instead of a direct. Notice as I kind of switch around here, it does actually maintain the tag path for us, so if I even add a couple spaces, if I switch over, it does actually remember, or maintain those. Now if I didn't have any path here to start with, if this was just a blank path, there's a little tag button on the right you can click on which will allow you to browse through and see all of your tags. So we can either go to the Tags folder here to get the project default tags, otherwise I can go down to all providers and grab from any of my tag providers. So, in this case I'll just go down here to Tower 1, grab the Fan Speed and hit OK. And you can see that it does actually specify the tag provider in the path. Now we don't really need it for this example, just showing you that you can do that if you need to. So what I would like to do for this example, I want to replace the 1 there with whatever I have typed inside of that component. To accomplish this, I can delete part of my path, so I can get rid of the number 1 here and if I hit the little { } icon here on the right, this allows you to browse for a property, either inside of the View, or somewhere inside of the session. So I know my Numeric Entry Field is inside of my View, so we can go down to our View, we can go down to the root container, we can find our Numeric Entry Field, we'll go to the props category because I know the value on the Numeric Entry Field is under the props category, and I'll grab the value and hit OK. So we do see the curly brackets notation, you'll see this all over the place in Ignition, basically means that that is a reference to some property or something else somewhere. And down below we can actually see what values map to. So value is mapped to this other component that happens to be inside of the View, more specifically, the value property under the props category. So to take a moment to explain, we're still just building a tag path here. The big difference between this and the direct is that I'm just putting a property reference inside of the tag path. So now we can actually change which tag we're bound to. I'll hit OK and we see that my Numeric Entry Field has a 2 in it, which means that the LED is looking at the Tower 2 Fan Speed. If I were to select my Numeric Entry Field, and if I were to change that 2 to a 1, you can see that we switched, now I'm looking at the Fan Speed that's inside of Tower 1. Right, so now I have this one little component here that allows me to change the Tag Binding that's on the LED Display. Now, one more piece of information that you should be aware of, I'm going to select my LED Display here, and we're going to go back to the binding on the value property. So when you're working with these tag paths and references, of course you can add multiple, so I can always just hit the little property reference button and add more properties here and really just fill up this whole table. I can also, when I'm looking at this property column for any one of these references, there's this little fbutton you can click on. When you click on it, it gives you this little expression area, so you can write an Ignition expression that allows you to basically change the value of this one reference before we place it into the path. So this is another opportunity for you to maybe use some of our built in expression functions. So we can use some of the logic functions, we can add if statements, or switch statements. We can also just take other properties, and then you can concatenate what the value of this one reference should be. So in most cases this might be overkill, but it's nice because it allows you to customize this even further. We can make this one reference a bit more interesting. So hopefully that gives you a good idea about what an Indirect Tag Binding is and how it works.