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 training@inductiveautomation.com.
Version:
LESSON LIST
-
3:26Begin Step and Using Parameters
-
1:04End Step
-
2:49Action Step
-
3:11Transition
-
4:03Enclosing Step
-
2:59Parallel Element
-
1:44Jump and Anchor
-
0:43Note
LESSON
Transition
Description
Here is a detailed explanation of how the Transition element functions in a Sequential Function Chart.
Video recorded using: Ignition 8.1
Transcript
(open in window)[00:00] In this lesson, we'll take a look at the transition SFC element. Transitions use expressions to determine whether or not a chart will move forward and continue executing the elements below. The expression will be evaluated to a boolean, and if that boolean is true, the next step in the chart will start executing. Otherwise, the element above will continue to execute until the transition becomes true. If you'd like to refresh your memory on the expression language and its syntax, I'll link to a page in our user manual with more information. Let's take a look at some example charts. The first chart has two different branches, A and B, and transitions at the top of each that control whether or not the chart progresses. If there are multiple true transitions on the same level, then the leftmost transition that's true will be picked. So if both of these are true, when the chart gets to this point, then the A action is the one that will end up executing. If there are multiple false transitions, then the first one to become true will be the one that gets picked.
[01:04] To demonstrate this, I'll use my "Shift" tag and set up the expression of each of these transitions so that they look for a specific value for my tag. For the A path, I'll check whether or not the tag is equal to "Day", and then for B, I'll check for "Night". I'll start the chart, and right now the tag isn't equal to either of those values, so the chart is waiting. If I change the value of the tag to "Night", then the B branch executes. Let's look at another example with three transitions. It can be helpful to think of these transitions as "if" statements. The way these would be evaluated is the same as saying, if this first condition is true, execute this branch, else if this statement is true, execute this branch, else if this is true, execute this. A catchall else can be added by making the last transition true.
[02:07] The chart will pick the first statement going from left to right, so first it will check these two, and if they're false, it will move on. And if this is always true, then it will be the catchall. To expand on this. You can also add a timeout to transitions that allow you to specify a specific delay to wait for. If the delay time is reached, then it will set a flag that you can specify here. I'll add a timeout to this transition that waits five seconds and then sets a flag named "Other" to true. Then the last transition will evaluate the "Other" flag. What ends up happening here is the chart will start, none of the transitions will evaluate to true, so the chart waits. Then after five seconds, the "Other" flag is set to true which makes the final else branch true, and that section of the chart will execute. As you can see, transitions are a critical component of SFCs as they allow you to control the flow of a chart.