Description

Learn the rules of what makes a chart structure valid or invalid. When the chart is invalid, compilation errors are displayed.

Video recorded using: Ignition 7.9

Transcript

(open in window)

[00:00] When working on a sequential function chart there's a number of rules you must follow in order for your chart to compile correctly. If your chart doesn't compile, you'll have this Chart Invalid indicator over here in the Chart Design and you won't be able to start your chart. The first rule to keep in mind is that each element in your chart must have a valid connection to another element. Whenever there's a element that has dangling connections, that creates a compilation error. So, to make this chart valid, I'm going to create a few action steps and then link them all together like that. And now my chart is valid because there are no elements that are awaiting a connection to another element. Another thing you need to make sure to do is to make sure that all of your scripts and transition expressions don't have any syntax errors. If I drop a transition into here, and let's say I try to reference a variable and I forget that you don't use double equals in our expression language, you'll see that the chart is now invalid. And it shows you the error right here. It says, oh, this is an invalid expression syntax. So you can go ahead and fix that problem and your chart will be valid again. Another rule that you need to follow is that whenever the chart branches into multiple directions, it absolutely must lead, all of the branches must lead to a transition first. So for example, if I put a transition here, and a transition here, I can't put a step here. This will create a compilation error. Because the chart can't execute this step at the same time as waiting for these transitions to become true. And again, it'll show you an error here. It'll remind you that the elements must lead to another element or a group of transitions. Another rule to know is that parallel sections, like this one, any parallel branches that you start must reach the bottom. So for example, if I start a parallel branch here and leave it dangling, that'll cause a compilation error as well. And lastly, let me zoom out here with holding down Control and moving my mouse wheel, it's a good thing to know that charts don't need to have an end step. Now, this is invalid because my parallel section is waiting a connection beneath it. But that connection can, if I'd like, loop back up to the top. And in this case, I'll loop using a combination of a jump and an anchor. So now my chart is valid again, because I'm connected back to the chart. Those are the rules you need to keep in mind in order to make sure your charts compile successfully.

You are editing this transcript.

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