Description

Learn how to design charts by adding elements and connections in the Designer using the element palette and editor.

Video recorded using: Ignition 7.9

Transcript

(open in window)

[00:00] In this lesson, we're going to learn how to create sequential function charts, place elements on them, configure and connect those elements, and along the way, we'll learn a lot about how the Designer can give you error feedback about your charts. So to create a new chart, we simply right-click here, and select New Sequential Function Chart. Here's our new chart, with it's Begin Step, sitting out here. Now one thing you'll notice right away, is that when I mouse over the Begin Step, it tells me that there's a compilation error in this little popup. And it tells me that there's a dead end. Now that's because if the chart were to start now, it would just fall out of the bottom of the Begin Step, and have nowhere to go. And that's not legal. And whenever there's a compilation error like this, the Chart Design panel over here will tell you that your chart isn't valid. And if you check this checkbox, it will highlight any elements that have a problem in the red. So, let's start fixing this problem.

[01:04] So, you don't have to have the Begin Step here, where it is by default. Any step, you can just click on and move around by dragging it. Another thing you'll notice is that when you select your Begin Step, it gets this little arrow underneath it. And you'll notice these arrows popping up in the Designer, wherever there's an element that's unconnected. It's a good cue that you should connect something in that location. Also, you can click and drag these arrows to create links that can go to other elements. So for example, I'll drag this down and create a link. And then I want to put an Action Step there. So I'm just going to drag Action from the element palette up here, and place it right underneath there. And you can see that it connects automatically with that link. So now my Begin Step is happy. There's no longer a red arrow on it, because it's connected to this Action Step.

[02:02] But now the Action Step has the same problem that the Begin Step used to have. So to solve this problem, we'll drag some more links, and then I'm going to place an End Step underneath it. So this is a very basic chart that is valid. And you can see here, that in the Chart Design feedback area, the indicator is now telling me that my chart is valid. And that's a good indication that if I were to save this chart, I could start it up. But this chart isn't going to do anything. Because I haven't configured the Action Step at all. To configure an element like an Action Step, you simply click on it, and then over in the Element Properties panel, its configuration interface will come up. If you don't see the Element Properties panel, you can make it visible by opening up the Panel Chooser and selecting Element Properties. We'll get more into the details of how Action Steps work, later. But for now, I'm going to just write a quick script that writes to a tag.

[03:04] So I previously set up a string tag called Feedback here, that I'm going to copy its tag path, and write to it. It's useful to make this panel a little bit wider, or you could even float it off and put it on a second monitor if you like. So I'm going to paste that tag path in, but one thing to be aware of is that, because SFCs are here in the global section and not part of your project, you need to make sure to put the tag provider in here. Because the tag provider default is part of the project, and the sequential function chart exists outside of the project. So I'll just do a quick write to this tag.

[04:03] And now, I can save my chart and run it. So let's watch this tag as we run our chart. There we go. It's written the value we configured it to. So you can see how charts are pretty easy to configure. They drag and drop. You can connect links to anything that's unconnected. And when things aren't properly configured, the Designer will tell you that things are wrong until you fix them. Next, let's look at how to create links that branch and loop. So I'm going to go ahead and delete these elements by selecting them and hitting the Delete key. And let's say I wanted to branch this chart into three potential directions. So I'm going to put three transitions down here, underneath this step, and then I'm going to drag this arrow, and then if I select the link that its created, it gives me options to branch off of that link. So I'm going to branch this way, and I'm going to branch this way.

[05:09] And that creates branched links so that you can have exclusive logic in your chart. You can also run looping links. So if you just follow the arrows in the direction you want to draw your links, it allows you to create loop-backs. So just to complete this chart, so that it's valid again, we'll go ahead and have these actions lead toward an end step. So in summary, to create elements, you simply drag them onto the chart. To connect them, you simply use the connection arrows to draw links. And to configure elements, you make sure that the Element Properties panel is visible and you just click on the element that you'd like to configure.

You are editing this transcript.

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