This lesson is part of the Tags in Ignition course. You can browse the rest of the lessons below.

LESSON LIST

Autoplay Off

Supplemental Videos

LESSON

Using Client Tags for Indirection

Description

Since Vision Client Tags are used as in-project variables, they can be used as a variable across all windows to indirectly point to a set of Tags, such as an area of the plant.

Video recorded using: Ignition 7.7

Transcript

(open in window)

[00:00] Let's see how we can use client tags for indirection in our project. Like I mentioned earlier client tags can be variables that we can share between different windows in our project. So we can actually use that client tag in multiple different windows. So here I have a Client tag in my Designer, it's called area, and the value is Processing. So essentially I have two areas of my plan, Processing and Packaging. You see in my tags above there are two folders here, Processing and Packaging. If I expand these folders I have tags. I have the exact same set of tags with the same names in the Processing that I do in the Packaging as you can see here. So what I want to do is be able to have screens in my system, that, one set of screens, that'll be indirect based on the area that I had chosen. So if you look in my top in the Project Browser, I have three windows, a Realtime window, a History window and a Docked Window. The Docked Window's my navigation between Realtime and History. My History window is just a simple trend and my Realtime window here shows the live values of the level and the temperature, and that's of that exist in these folders. So right now the Client tag is set to Area, or set to Processing. And all of my windows are looking at the Processing folder here. So I'm looking at tags within this folder. So the idea of using the Client tag is that every Client that's open is going to have a different value of this tag, or they can have a different value of this tag. So I could have two clients open, one looking at processing and one looking at packaging, and the screens will show the different values because of that client tag. So let's see how we can actually use that tag now for indirection. So on my Realtime window, on the Root Container of the window, if I right-click and go to my Custom Properties I have a custom property called area that's a string. And that custom property if I look down the bottom left, in my Property list, it is bound to the Area tag, the Area Client tag that we have. So that's how I bring that value, Processing, into this window. Then, on my components, like the level, the value of the level component is linked to an indirect tag where the first part of that, this curly brace one, is referencing the area property of that window. So I'm going to either the Packaging or Processing based on that client tag. And that's how I'm actually bringing that into the indirect bindings. Then I'm going to level_PV after that. The temperature, same idea, is it's going to the temp_PV but again inside the area that we have selected by that Client tag. The same thing's also true for History. This graph is indirect based on the area that we have there. So I have the same custom property on the Root Container area with it bound to that Client tag. So I can go to a third window here, and I can right-click on the Root Container, add a custom property, that is called area, that's a string, then simply take my Client tag, drag it down to the area property and it's going to link it to that and aow you see Processing, and I could use that within this window. So if I want to use it to maybe control, a temperature high set point, bring a numeric text field in here, and I'm going to link the value integer of the numeric text field to an indirect tag where I first select the tag. So maybe temperature high set point, and the first part, where it says Packaging, I'm going to remove that, use the link over here, to bring in the area custom property which is now going to put a reference to that in my tag path. Go ahead and press OK, and you can see that this is now pointing to the value within that folder. Now, we have to let the operators have some way of changing that Area tag. So typically what you can do is put a Dropdown List on the Docked Window. So I put a Dropdown list here. I'm going to go down to my Data property and set the, actually open up the value, the Dataset Viewer, by clicking on the little magnifying glass, and add two rows, with the top-right button. The first one being Processing and the second one being Packaging. I don't really need the first column, the value, so I'm going to go ahead and click on the zero and simply remove that column by deleting it over here on the right. And now I just have one column, press OK, and now I can see if I go into preview mode, press F5, I can click on a dropdown list, and see Processing and Packaging. If I click on Processing then you see that the Selected String Value is that value. Now I'm going to link this directly to the Area Client tag. So I drag Client tag down to the Selected String Value, it's being bound bidirectionally, so now if I change this from Processing to Packaging and go to a different window like Main Window one, you can see that's pointing to a value of 100. Again going back to Docked Window, change it back to Processing, go back to my Main Window, you see it's now 75. So all of the windows are going to look at these values based on what we have selected. So another way I can show you this, is if I change it right here, Packaging, you'll see that this, the references on these tanks and the LED display change. If I go back to Processing, you see it changes again. So I can use client tags as a way of making my entire project indirect where I can control which area I'm looking at in a single location, with a single drop-down list or a single component, and all of my indirect links will update for me automatically.

You are editing this transcript.

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