Version:

This lesson is part of the OPC UA and Devices in Ignition course. You can browse the rest of the lessons below.

LESSON LIST

Autoplay Off

Description

The Programmable Device Simulator's Control Tags allow you to interact with a running program. Learn more in this lesson.

Video recorded using: Ignition 8.0

Transcript

(open in window)

[00:00] In this lesson, we'll take a look at one special feature of the programmable device simulator; a set of control tags built into its structure that allow you to monitor and manipulate a program in progress. To demonstrate, I've set up a simple program here. I have a Sine tag set up to start at zero and fluctuate between zero and 20 over a 100-second interval, based on the function parameters in here. I also have a Boolean tag which I've set up to go from false to true over the course of my two-second program. Now in my other tab here I have the OPC Quick Clients, which I can use to test out reads, writes and subscriptions against my simulator. And currently I have it set up to show subscriptions across my Sine and Boolean tags, as well as all the control tags on the system. These tags are located in the controls folder inside the device connection for my simulator. Our five control tags show us the information about the ongoing program, like the program base rate, repeat behavior and current program step. So we can see that as the program restarts, the program counter item goes back to zero. However, it's worth mentioning that I can modify the behavior of my simulator by changing the values on any of these control tags. For example, if I click that little W on the left hand side of our pause item, and write a value of one to it, then click Write, we'll see that that actually suspends our program on its current step. So it effectively acts as a freeze frame for our program. It's worth noting that if I un-pause the program by clicking on that W again, and entering a value of zero, there's actually a pretty big jump in my Sine value. It goes back to what it would have been had I never paused the program in the first place. Effectively, the pause item doesn't pause the program clock so much as freeze the values. There's also a Reset tag. If I write a value of one to that tag, again, by clicking that W and writing the value of one, we'll see that it sets our Sine tag back to where it initially was. It effectively reverts the entire simulator back to its initial state when the program was first loaded. Among the other tags here, the base rate and repeat tags allow me to change the base rate and repeat settings for the entire connection, as defined in the simulator connection properties. However, it's worth noting that if the device connection is restarted or the reset item is used, the settings will revert back to those defined on the connection. So that's a quick overview of the control tags in here. They give us a nice way of monitoring and making adjustments to a program in progress.

You are editing this transcript.

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