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 docs@inductiveautomation.com.
Version:
LESSON LIST
-
4:33Connecting to the Device Simulator
-
7:24Custom Programs
-
2:35Control Tags
LESSON
Connecting to the Device Simulator
Description
Learn how to create a device simulator connection, as well as loading an initial program.
Video recorded using: Ignition 8.0
Transcript
(open in window)[00:00] In this lesson, we'll be taking a look at the simulator functionality built into Ignition's OPC UA server. Using the Programmable Device Simulator, you can mock up a test device for development and experimental purposes containing OPC items from one of our sample programs or from you that you create yourself. So, to get us started here we're going to go ahead and configure a connection to our Programmable Device Simulator. So, I'm in the config section of my gateway webpage and I'll go into my sidebar here and scroll down until I find OPC UA device connections. So once I'm there, I'm going to go ahead and click, create new device. And then I'm go to scroll down until I find the Programmable Device Simulator driver. And I'll select the simulator and then click, next. Since we're not connecting to a real device we don't have to type in anything like an IP address or a host name. The one thing I do need to give my connection is a name. So I'll go ahead and call this simulator. Now it's worth noting here that I could configure multiple connections that are simulator driven. It's not like this is the only simulator connection that I can make. So now that I've given my simulator a name there are a couple settings at the bottom here. Repeat program will allow my program to run indefinitely. Once it's done executing all of the instructions in the simulator program it will just run them all again. As we'll see in a moment our simulator program is broken up into time intervals with instructions at each time interval. And the base rate property here just specifies what the unit should be for each time interval. So I could have some instructions executing it times zero. And others executing times one and that could be one second or thirty seconds apart based on this setting here. So I'll go ahead and create my new device. And now my simulator connection is up and running. However, we'll find that the simulator isn't running anything in particular. In fact if I browse that connection via the OPC quick client or the OPC browser in the designer. We'll find that there are no OPC items in it all. To change that I'm going to find the connection here an click more and then click edit program. So now you've got a chance to configure what are simulator should actually simulate. To get us started here I'm going to find the load program options on the left hand side. And let's just choose a program to load. How about our generic program. So I'll select that program and then say load simulator program. So these programs are pre configured collections of simulated values just designed to give you something to test with. In fact the programs that are available to us in here directly mimic the simulators that have long been available in Ignition. Prior to the release of the Programmable Device Simulator. So you may recognize these programs already. Now since I've already selected a program. We can see the program's instructions listed below. For now I won't dive to much into those instructions, we will explore how to write you own instructions in programs in a later video. It's worth noting that at any time you can export your instructions. Which will allow you to download your program as a CSV file and if you wanted to say, transfer your programs to a different gateway. Or maybe write a script that builds a program for you. You'll find that you can load programs from CSV files as well, by selecting load from CSV in the program list. So now that I have my generic program up, I'll just go ahead and save my program at the bottom. And now my simulator device is running that generic program. So if I wanted to see that in action. I can scroll down here in my gateway webpage and pull up my OPC quick client. So the OPC quick client allows you us to browse any OPC and device connections on our gateway. So in here I'll go ahead and expand Ignition OPC-UA server. And then expand devices, and then expand simulator. And now we can see that our simulator program is running. So for instance if I wanted to expand Ramp here and subscribe to that Ramp 0 item. We can see that the value is coming through just fine. And of course I can create tags from this device connection in the usual way. So this concludes our basic overview of the Programmable Device Simulator. It can be an easy way to get some test tags up and running. Either from one of our starter programs or from one that you create.