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.
Creating the History View
In this lesson we'll look at Perspective's Power Chart component. In addition, we'll enable Tag history on our Tags, which tells our Gateway to record the values on our Tags.
Transcript(open in window)
[00:00] Welcome back. So, we wrapped up our overview here. Let's take a look at our project in a browser here. Let's take a look at our run time. So, in the Designer we'll go to tools, launch perspective and launch session. And honestly, our project isn't really too much to look at yet. It looks great, but it's more or less represented by this overview in the Designer. We don't have any doc to views, or really anything else to navigate to. So, that's kind of the next step here. I would like this topic to kind of focus on navigation but before we can really do that, we need something else to navigate to. So, that's next on the agenda. So, let's create a new view. We can go ahead and we can create the the chart view, or the charting screen that I wanted to add as part of this project here. So, let's head back to the home of the perspective section here. So, I'll click the left most little tab, or that left little icon there. And I did want to stay organized here. So, we'll head over here to perspective, views and on primary views, I'll right-click and select a new view.
[01:03] And let's call this history. I will use a flex container as the container type and from, my plans for this view is very simplistic. I want a single chart to take up all of the available space and I will opt into a page URL and it will base the page URL off of the name of the view you're trying to create. So, slash history in our case. Now, if I click create view here and just to kind of drive the point home later for future videos, I'm going to head back to that leftmost tab again and that history or that page URL property again, it created this little page configuration entry here and it's targeting the primary view as the history, or the, I should say, the primary views slash history view. So, that's going to be kind of important when we do talk about navigation. But let's let's build out this view for now. So, head back to the history tab down below and let's put a chart here.
[02:03] Let's head over to the component panel and I'll grab a copy of the Power Chart. I'll just drag it into our view here, or I should say I'll drag the Power Chart into the container in our view here. I will select the Power Chart and I'll minimize the component panel here. Under the position properties for the chart here, I'm going to set, grow to one. And when I hit enter, it's going to expand our charts. So, it takes up all of the available space just because there aren't any other components in there. Now, if you've used Ignition's Vision Module before, you're probably familiar with easy chart component. The Power Chart here is sort of the spiritual successor to that. And one of the built-in features it has is actually a built-in little tag browser. So, users from their, from the session can actually just create their own little charts and monitor whichever data points they want. Now, if we put the Designer into preview here, if I click the little tag button here, it does bring up this little tag browser that shows us all of our available sources of data.
[03:00] Now, if you opted into the quick start workflow, you will have this little sample SQLite database here, which if we drill down it does have some realistic tag for you. But I did want to focus on the BIP stuff, which at the moment is nothing. If you're new to Ignition, those tag values we were looking at earlier, well, those are just real time values. If you want the system to start recording values for longterm storage, you need to tell one of our historian systems to do so. So, that's what we'll do next. I'll head over to the UDT definitions tab here in the tag browser and let's start recording some tag values. Let's edit our station UDT. So, I'll double click on that. So, I don't necessarily want to record the values for all of these members here. I think pump_faults, I'm actually going to ignore, we'll do something with alarms later on with that. I will click on ph, I'll hold control because I'm on Windows and then I'll just start left-clicking on the other members to add them into the multi selection. All right, so, now that we have most of our tags selected on the proper table on the right hand side here.
[04:00] I'll scroll down to the history section and let's enable history. So, I'll change history enabled to true. We'll scroll down a little bit more, just because we have some additional properties now and we need to tell the tags where their values should be recorded at. So, for storage provider here, I'll click the little drop down and let's let the BIP SQLite database and we'll click okay. Now, if we expand the UDT definition, we should have these little clock icons, which basically means that these members are configured to have their values recorded by the tag historian. If I switch over to the tags tab here and if I refresh, expand these, we'll see the same icon. So, we're now recording the values of these tags here. Now, that also means we can actually come up over to, and I'm still in preview mode in the Designer by the way, I never left, we can come over here and we can actually do a little refresh with a tag browser up. I can go back to BIP. We can see that, hey, there's a new entry in there and there we go. We do have our stations here. So, what I'll do is I'll go ahead and I'll grab a tank capacity.
[05:03] I'll click on add selector tag and we'll see it's starting to trend now. Now, one of the things you probably want to be aware of going forward here is that the records we're taking for your tag values, those are tied to the trial. So, if the trial expires, you'll need to go and restart it. Otherwise, the history system won't record any of those values. So, keep that in mind, if it's been a while since you've last restarted the trial. Now, I'm not going to do too much else to this chart here, but there are some small configuration changes I'd like to make. So, first of all, I don't necessarily on the browse, the tag browsing side of things here. I don't necessarily want my users to have to click all the way down here. I think I'd like to just start at station one, station two, station three, have those be at the root. And then the other thing is I don't necessarily wonna look at the last eight hours. Maybe, a smaller timeframe would be better. So, that was going to be really easy to do. So, I'm going to go ahead and at the top of the chart here, I'm going to click this little dropdown and I'm going to change the range here. How about the last 10 minutes? I'll click apply here.
[06:00] That's a little bit better. All right, so, for this next part here, or if we're changing the tag browser, let's take a look at how to do that. So, I'm going to click collapse the tag browser there and I'm going to head back over to the property editor, but this time I'm going to look at the prompts category properties. So, with the Power Chart, and I still have the Power Chart select it here you kind of see in the project browser, I'm going to head over to this config object here. I'm going to expand that. And under config, there's this tagBrowserStartPath. So, basically I wants you to provide a path to sort of like what the root of the tag browser will be. But you have to kind of know what the type in here. Now, fortunately, the chart helps you out a little bit. So, we can actually take this first tank capacity that we added here. And we can actually look at its path and then make some modifications. So, for tank capacity over here, I'm going to click the little edit icon here and it's going to bring it a little panel out on the chart here. So, here's where your users can add, or change which access that's showing on. It can change the rendering, the color and all that fun stuff. But if you all the way down to the bottom under data, there's this tag path field here.
[07:02] I actually want to take the entirety of this path here. We're going to have to make some modifications to it, but I did wonna grab it just because it's a kind of a shortcut for us. So, I'm going to left-click into here just to put my text cursor down. I'm going to control+A on Windows to select everything and then control+C to copy everything in that field. Then I'm actually done with this. So, I'm going to click done and then I'm going to paste this into the value for this tagBrowserStartPath. So, I'm just going to click over here. I should say, I'm going to right-click over here and paste. Now, this isn't going to work initially. If I go back to the tag browser, it's not going to give me any results. It's having a hard time sort of parsing the string I gave it, I wonna resize so you can see a little bit more, but that's, there's a good reason for that. So, if we take a look at the value here and you'll notice that it has a slightly different coloring here and there's a little icon to the right, so, we haven't actually ran into this yet, but for any property in here that has a long string value, we had this additional little editor to make to make it a little bit easier for you to modify the text there.
[08:01] So, if you just click the icon, you should get a little pop up like this. Okay, so, this notation here is something that the tag historian uses. We have more details in the user manual, if you wonna learn more about what the, all these, all the little references here are. But the reason this is broken for our tag browser is because it's actually looking at tank capacity and storage one and then it's trying to browse the children on that. But the tank capacity is a tag, it's not a folder. It doesn't have any children. So, to kind of prove that, if I were to delete tank capacity and just basically everything to the right of that last slash there and click okay. Okay, so, now we're looking at all the station one's tags here, right? So, again, the tag path we're basically going to is station one, which is a actually, it's the sort of the root member of our UDT, which is kind of like a as far as the tag history system cares, it's more or less just a folder. So, it's looking for children on station one there. So, we can actually go even further back than that. So, I'm actually going to select everything all the way just to the left of where it says tag.
[09:01] So, I'm going to basically get rid of all of that. So, it should be provider colon slash at the end and that's it. So, if I click okay here, that takes us up another node. So, basically it goes to that one. There we go. So, there we are. If we start adding new tags into this tag provider and start recording their values, they'll show up over here. So, great. All right, and actually one more thing I'd like to do, I actually would like this to start off blank. So, what I'm going to do here, and easy enough to do actually from the, while we're still in preview mode here, I'm going to head down to this little table down below and I'm going to click a little trashcan icon which basically just removes the pen there. All right, that does wrap up this video here. I will go ahead and save the project just so I don't forget. And in the next video, we'll go ahead and actually learn how to navigate to this view from within our session. So, I'll see you then.