Sequential Function Chart(Sfc - SMB MAT-LC-C Series User Manual

Plc based motion controller
Table of Contents

Advertisement

REPEAT Loop
The difference between a REPEAT loop and a WHILE loop is that its break condition is checked
after the loop executes, which means that the loop executes at least once, regardless of the
break condition.
Sentence:
REPEAT
<Instructions>
UNTIL <Boolean expression>
END_REPEAT;
Instructions are executed until the Boolean expression returns TRUE. If the Boolean expression
is assigned a true value for the first time, the Instructions are executed only once, otherwise the
Instructions will be executed repeatedly and will cause a time delay.
<Note> The programmer can ensure that no infinite loop occurs by changing the condition of the
instruction part of the loop, for example, by incrementing or decrementing the counter.
Example:
REPEAT
Var1 := Var1*2
Counter := Counter-1;
UNTIL
Counter=0
END_REPEAT;
EXIT Instruction
f there is an EXIT instruction in a FOR, WHILE or REPEAT loop, then the inner loop ends,
regardless of the interrupt condition.
6.2.3
Sequential Function Chart(SFC)
Sequential function chart is a graphical language that can be used to describe the sequence of
different actions in a program. Because these actions are assigned to single-step elements, and
transition variables are used to control the order of processing.
Step
A POU written in a sequential function diagram contains a series of steps, which are realized
through directed connections (transition conditions).
There are two types of steps:
• Simple type: Each step consists of an action and a flag to indicate whether the step is active or
not. If a single step action is in progress, a small triangle will appear in the upper right corner of
the step.
• IEC Types: Actions or Boolean variables with each step consisting of a flag and one or more
assignments. The associated action appears to the right of the step.
Action
61

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MAT-LC-C Series and is the answer not in the manual?

This manual is also suitable for:

Mat-lc-c0 seriesMat-lc-c06Mat-lc-c07

Table of Contents