SFC element Branch
Symbol:
Branches are used for programming parallel or alternative sequences in SFC.
For alternative branches, TwinCAT always executes only one of the branches, depending on the previous transition condition. Parallel branches are executed simultaneously.
See also:
- Programming in Sequential Function Chart (SFC)
- Processing order in SFC
- TC3 User Interface documentation: Command Insert branch right
Parallel branch
In a parallel branch, the branches must begin and end with steps. Parallel branches may contain further branches.
The horizontal line before and after the branch is a double line.
Processing in online mode: If the previous transition (t2 in the example shown) is TRUE, the first steps are active in all parallel branches (Step11 and Step21). TwinCAT processes the individual branches in parallel and only then evaluates the subsequent transition (t3).
A label Branch <n> is automatically added to the horizontal line that forms the beginning of a branch. You can specify this mark as a jump destination.
Note that you can use the Alternative command to convert a parallel branch into an alternative branch.
See also:
- TC3 User Interface documentation: Command Alternative
Alternative branch
The horizontal line before and after the branch is a single line.
In an alternative branch, the branches must begin and end with transitions. The branches may contain further branches.
If the step preceding the branch is active, TwinCAT evaluates the first transition of each alternative branch from left to right. The corresponding branch is "opened" in the first transition that returns TRUE, i. e. the step following the transition is activated.
Note that you can use the Parallel command to convert an alternative branch into a parallel branch.
See also:
- TC3 User Interface documentation: Command Parallel