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 email@example.com.
We are experiencing playback issues from our video hosting provider. Please check back shortly.
Learn about Tag Groups (formerly called Scan Classes), including how to configure a Tag Group and set up a Tag to use it.
Video recorded using: Ignition 8.0
Transcript(open in window)
[00:00] All tags in Ignition have some concept of execution. A status code, coming from a PLC, is only worth having if its value is updated at some rate. An Expression, or Query Tag, is only useful to us if it reruns its expression, or query, every once in a while. To implement and organize the idea of tag execution, Ignition offers Tag Groups. A Tag Group is a collection of tags that show the same basic execution logic. To demonstrate what I mean, let's try creating a Tag Group. So to do that, I'm going to find the Tag Browser in the designer and, at the top of the Tag Browser, there's a little stopwatch icon right here. So if I click on that, it pulls up the Tag Group Editor. Note that Tag Groups are specific to a Tag Provider, that's why it's saying "For provider default" here. And every provider will start out with a single Tag Group called default. So if I click on default here, we see that this Tag Group uses a mode of Direct with a rate of 1,000 milliseconds. We'll talk about the Direct Tag Group mode in just a moment, but for now let's try creating a new group. So I'm going to click the plus icon here to create group, and the first thing it needs is a name. So let's just call it "my group." Now every Tag Group has this mode property, and as we can see there are three different types of mode: Direct, Driven, and Leased. We'll get into the Driven and Leased modes in later videos, but for now we'll just use Direct, which is the simplest mode. In the Direct mode, the Tag Group will execute 24/7 at a specified fixed rate. So now we can specify what we'd like that rate to be, so let's set it to 5,000 milliseconds, or five seconds. So because I've set the rate property to 5,000 milliseconds and the mode to Direct, every tag in this Tag Group will execute every 5,000 milliseconds, or five seconds. Now the primary function of a Tag Group is to control these two properties, the mode and the rate. But there are some other properties we can control on the Tag Group as well. For instance, all of these OPC settings correspond to some nitty-gritty details of how OPC tags in our Tag Group will execute. For instance, the data mode property, which can be either subscribed or polled, dictates how OPC tags in this group should incorporate the execution rate. Subscribed mode just means that we create a subscription for each OPC tag in the Tag Group at the specified rate. Polled, on the other hand, simply submits read requests for each tag in the Tag Group at the specified rate. Subscribed mode tends to be more efficient and its the recommended choice here, but the polled mode can give you more precise control over how the OPC tags execute, which can be handy in some use cases. I'll set it to polled for now, just for the sake of demonstration. We have other properties as well here. If we set Read After Write to true, we will immediately read an OPC value after we write it, which can be useful if, say, we have really slow subscriptions, so it would take a bit longer for a write request to be reflected on the tag value. We also have some optimistic write settings. These allow us to, essentially, assume that our write request went through successfully. I'm not going to cover every property here. You can find full details on Tag Group properties in our user manual. But if I scroll down just a little bit here, we have some history settings as well. These are just sampling settings that come into play when we use our Tag Group as a historical Tag Group. You can learn more about that in videos about tag history. So I've finished the configuration of my group. I haven't changed very much. I simply set the OPC data mode to polled and I set a rate of five seconds. So now let's test out our group. I'll hit OK. So now I've configured an OPC tag here, and, as we can see, it seems to be updating roughly every second. This is because, if I go into the tag, so I'm just going to right-click and go to edit tag, it's using the default Tag Group. Now we can change the Tag Group of a tag from right here in the tag editor. So let's say instead of using default, I want to use my newly created Tag Group, so I'll select my group and let's see how this affects the tag. So I'm going to click OK. And as we can see, if we wait a few executions, we can see that the value on my OPC tag is changing every five seconds. This wraps up our basic overview on Tag Groups. In future videos, we'll talk a bit more about different Tag Group modes and how we can use them to configure more streamlined and efficient functionality.