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

LESSON

Driven Tag Group

Description

Learn how to configure a Driven Tag Group, a Tag Group that varies in execution rate based on some condition.

Video recorded using: Ignition 8.0

Transcript

(open in window)

[00:00] Sometimes we don't want our tags to execute 24/7. Or we want to execute them at different rates based on some condition. For this, Ignition offers the driven tag group. Tags in a driven tag group will execute at one rate when a condition is true, and at a different rate when that condition is false. So to demonstrate I've setup a couple OPC tags here. I have these pressure and temperature tags that are being derived from my PLC. And I have a machine status tag, so when the machine is turned off, I don't want to look at these pressure and temperature tags at the same rate. So these pressure and temperature tags are on a one second tag group, and that's fine when the machine is running, but when the machine's turned off, I'd like to turn down the pull rate a little bit, or maybe even stop pulling completely. So to configure this, I'll need a driven tag group. So in the tag browser, I'll select the little stopwatch icon, which will pull up our tag group editor, and then I have my default tag group, which all three tags are currently using. Again, it's that one second tag group using a mode of direct. So I'm going to add a second tag group by clicking the plus icon here, and let's just call it driven tag group. And then of course we'll set its mode to driven, and we see in the tag group editor that a few more settings appear. For starters, we have two rates. Again, a driven tag group is run at one of two rates, based on some condition. So rate is the rate in milliseconds that we will use when our condition is false, and the leased/driven rate is the rate we'll use when the condition is true. So let's actually start by building the condition we'd like to look at. For that, we have three properties here, driving expression, driving comparison, and comparison value. So I'd like the driving expression to look at the machine status tag, so I'm going to click this icon here for driving expression, and then I'll click the tag icon, I'll expand the tags folder, and I'll find my machine status tag, and then I'll click okay, and that's all I want to look at for this expressions, I'm going to click "apply changes" and then the condition I'd like to use is when that machine status tag is equal to one, meaning it's true. So I'm going to set this to one, and the driving comparison is good at its default. So let's say that when the machine is on, that is when the machine's status tag is equal to one, you want to run it this one second rate. So I can leave this the same, but let's say that when the machine is turned off, we want to run at a five second rate, so I'll set this to 5000 milliseconds, and we're all ready to test this out, but I do want to note this one shot property here. If we set this one shot property to true, then tags in this tag group will only execute once when the condition becomes true, and then they'll wait for the condition to be false, and then true again before they execute again. In essence, this would dramatically change the function of our tag group, but we'll look into some applications of a one shot driven tag group in future videos. So with that said, let's test out our driven tag group, so I'm going to click okay, and now I need to assign tags to this tag group. So I'm going to select my pressure and temperature tags. Note that I don't want to include the machine status tag in our driven tag group. Including the machine status tag in our driven tag group would prevent the tag group from executing at different rates, so I'm only going to configure my other two tags here in my driven tag group. To do that, I'm going to right click, and select edit tag, and then to update the tag group for both tags, I'm going to select the checkbox here, and then for the tag group dropdown, I'm going to select driven tag group, which is the tag group we just created, and then I'll click okay, and we see now that the pressure and temperature tags are updating at a five second rate. Now if I change my machine status tag to true, we can see that the tags are now updating at a one second rate. So just one other thing to show about driven tag groups, I'm going to go back into the tag group editor, and then for my driven tag group, how about instead of a five second rate when the machine is off, we set the tag group to not execute at all when the machine is off? To do this, all I have to do is specify a rate of zero here. A rate of zero will indicate that the tag group will not execute. So just to see how this works, I'm going to click okay, and then I'll set my machine status to false. And as we can see, our pressure and temperature tags have stopped updating. So that's all it takes to configure a basic driven tag group. In future videos, we will look at different configurations and applications of driven tag groups.

You are editing this transcript.

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

close

Share this video