IF
With the IF function block it is possible to create alternative flows with forks.
Which one of the two progressing possibilities (Next0 and Next1) is used, depends on the pin allocation of the fork condition (bCond).
The IF function block does not have any state. It is not a dedicated step of the flow. If the flow progress reaches this block, the flow progresses immediately with one of the two possible sub flows. The flow does not stop here.
The outputs Next0 and Next1 have to be connected to the next flow chart function block. Otherwise the download to the target will be disrupted with an error message.
To understand the Flow Chart blocks better, you can have a look at our example Right use of Flow Chart blocks...
Signals
Name | I/O | Type(s) | Function |
---|---|---|---|
Prev | I | FLOWCTRL | Input |
bCond | I | BIT | Branching condition |
Next0 | O | FLOWCTRL | Output |
Next1 | O | FLOWCTRL | Output |
Visualization
If the function block is not properly connected, it will be colored red in run mode.