This lesson is part of the Building in Perspective course. You can browse the rest of the lessons below.

LESSON LIST

Autoplay Off

LESSON

Gateway Configurations

Description

In this lesson, we'll create a device simulator to provide our project with some data, create a SQLite database to store historical records, and create a Tag provider for our project's Tags.

Ignition Exchange: CSV Simulator Instructions

Transcript

(open in window)

[00:00] Welcome back, so in this video, we're going to make a couple of gateway level configurations. Basically some prep work for things we'll need later on. So to begin with on your gateways web interface, you'll want to head over to the config section on the left here. And it may ask you to sign in. So go ahead and sign in. So first let's create a device simulator. So this will be something that will generate some numbers for us that we can display on the screen and also take some readings from some historical readings from. So from the left-hand side here, we'll want to scroll on down and under OPC UA, you want to click on device connections. Now, again, I have opted into, in the last video I opted into the Quick Start configuration which creates a bunch of gateway level configurations in addition to a project. One of those is the sample device here.

[00:58] So you may see sample device there if you opted into Quick Start. If you didn't, that's totally okay, because we're not using sample device. We're going to create our own. So I'll click on create new device here. And from this list of devices, we'll just scroll on down and you want to find programmable device simulator. I'll click on this to select it, and then I'll click next. Now for these gateway level configurations, I'm actually going to try to use a similar naming pattern just so we can kind of recognize them for the series. So, because this is building and perspective, I'll do "BIP" at the start of these, and then we'll do an underscore. So for the simulator here, we'll do "BIP_Simulator". And I'm not going to touch any of the other configurations here. So I'll just click the Create New Device button. Now that created the BIP_Simulator here, but it is blank. It doesn't have a program that it's running right now. So what I'm going to do, is I'm going to click the more dropdown here for the simulator we just created and I'll click edit program.

[02:01] Now the simulator is great. It actually has a bunch of built-in programs, different kind of tag configurations you can use. But as a part of the series, a I did include a CSV file, that has some custom instructions we're going to use. So you'll want to check the lessons page that you're viewing this video on here to get the link to download it. But once you have that CSV, you'll want to come to this dropdown and select load from CSV. Click the little browse button that appears, and then go ahead and find the file. So almost like that instructions.CSV, I'll click open. And then once you've passed the file in, you'll want to click load simulator program. And here we are. So now we have our stimulator program loaded. You can see that we have entries for all of our stations. And then we also have the functions that we're using to derive values for each of these items. We're not going to make any changes to this. I'm just calling out that those functions or how our simulator is going to generate numbers for us. So I'm going to go ahead and scroll on down and click save program.

[03:04] Now for a production system obviously you'd be connecting to real devices but the simulator is going to work great for our little project here. So we have some data coming in, which is great. The next thing we're going to want to do is we're going to want to get a database connection. So let's go ahead and on the left hand side here, we'll go down to databases, and then you want to click on Connections. Now for our production systems, it's generally advised that you use a relational database management system. So something like PostgreSQL or SQL server, Maria DB, those types of SQL databases. However, to do that as part of the series it would be an extra step to go ahead and grabbing installers and get it running in your environment. So to save time and make things a little bit easier, we're actually going to use SQLite. So SQLite is a lightweight database. It's actually designed to be embedded into other applications. And Ignition actually has it embedded inside of it. It's kind of neat because it'll just create a little file, it's local file system, and it will store all of our data inside of that.

[04:02] So to create that, again we're going to ignore the sample SQLite database that was part of the Quick Start program or configuration. Instead, I'm going to click the create new database configuration like here. And then from the list of options, I'll select SQLite. I'll click next. And let's get us a name. So like I said earlier, VIP_ and then we'll name this habitat just SQLite. Under the connect URL, you can actually see the file path that this connection is going to create a file at. This path may look different depending on what operating system you installed Ignition. But regardless you can just use the default value there. SQLite connections don't actually need any sort of user credentials here. So again, not great if you're trying to store sensitive information but then it's kind of funny because SQLite only supports a single connection to the database at a time. And as long as your gateway here is up and running, it will be the only thing connected to it. But that's neither here nor there.

[05:04] The point is I'm not really going to make any changes to any of these other settings. I changed the name, but that's it. So let's go ahead and scroll on down and create the new database connection. And we're all set there. So later on, when we're trying to record some values for our data points there, we'll go ahead and we'll store those inside of the BIP_SQLite Database. Now, the last thing we're going to do, is we're going to create a tag provider. So I'm going to scroll down and yet again, and under tags, I'm going to click on real time. So if you're new we're going to create what's called a tag provider. So Ignition has a Ignition tags, which are just basically objects that can hold a value either from within Ignition or from some sort of external system. So a device for example, or a value on a database. And it will basically put the values on this, on those tags and then things on our screens will reference the value of those tags. We're going to create what's called a tag provider here.

[05:59] Tag provider is basically like a sort of a logical grouping or a meaningful grouping of tags. So we do have two here. Whenever you installed Ignition, you always get a default tag provider. So just kind of like an initial one to use. There's also, in my case, the sample tags tag provided here, again part of the Quick Start configuration. But we're not using either of those, let's create our own. I'll click the create new realtime tag provider link. We'll do a standard type tag provider. I'll click next. And then we'll use our naming convention here. So how about a BIP, we'll do _tag, how about _provider? Now we already created a database connection earlier on and there is a default database drop down here. Basically means if the tag needs to run a query to a database, which database connections show the tag use 'cause you could have a bunch of different database connections on your gateway. So just for fun, we'll go ahead and we'll select the BIP_SQLite database configuration we made earlier.

[07:01] And then I'll click the Create New Realtime Tag Provider button. And there we go, now we have a separate tag provider, which we can use for our project. All right, that about wraps up this video. So in the next video, we're going to take a look at getting the designer, or getting into the designer, and then creating a project.

You are editing this transcript.

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