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

LESSON LIST

Autoplay Off
Take topic challenge

Description

Client Tags, as the name implies, are only available for use in Clients. This means that their values are isolated to a Client runtime, and even though they are created in the Designer, each Client will create their own instances. This makes them very useful as in-project variables, for passing information between screens and between other parts of the Clients, such as scripting.

Video recorded using: Ignition 7.7

Transcript

(open in window)

[00:00] Client tags, as the name implies, are only available for use in Clients. This means that their values are isolated to each client runtime, and even though they are created the in designer, each client will have their instance of those tags. This makes them very useful as in-project variables, for passing information between screenings and between other parts of the client. To create client tags in the designer, we go into the Tag Browser, there's a special folder called Client. We can easily right-click and create a new Client Tag, which is the only one available when you right-click on that folder. We give that tag a name, so I'm going to call it Area, and a data type, so I'll make that make a string, and a value, so I'll say Processing. So a client tag can be a static value where I just simply type in the value, and of course, it could be modified from the run time by writing to that tag, but it typically, it can be a static value, or you can go to the Expression/SQL and make it an expression or an SQL query, depends on where you want that value to come from. So if I want it to be a static value, where it at least has the initial value of Processing, I'll go ahead and set that to none, press OK, and I'll see the new client tag in this area. So I can use this as variables between my windows if I want to. I can use a tag exactly the same way as we use other tags, we can easily read from it, we can write to it, it is a variable now that we can work with. We can also create client tags that use expressions, so I'll say Expression Client Tag, make the value an integer or Boolean, whatever you want that data type to be, go to my Expression/SQL, select the Expression, and go and I'll just type that expression in. So let's say that I want to return true if the Client, under System, the Client, Network, the HostName equals, you know, Client1 let's say, so if that expression is true, it will return true on that client tag. Let me go ahead and press OK and I'll see now here it's false 'cause my host name isn't that. So one important thing about client tags that I want to mention, especially when you're looking at expressions or SQL, is that client tags do not have a scanning class, so the value does not poll regarding to the scan classes that we created for regular tags. If you want a client tag to continually update automatically, in the SQL Query mode, you set the Polling Mode to Relative or Absolute, so you can specify how often you want that query to run. In the Expression, you have to make the expression actually reevaluate, which either is dependent on tags that we're changing, or you use functions that actually poll. For example, in the Date and Time, the now function, you can specify a poll rate and it would continually make that expression calculate over and over again. So and client tags, again, can really be useful for in-project variables, in the next lesson, we're going to look at how we can use that for indirection.

You are editing this transcript.

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