Beckhoff Automation GmbH & Co. KG TX1200 — 2.2.4 Sequential Function Chart (SFC)

A Brief Introduction to TwinCAT PLC Control ELSE END_CASE; A CASE instruction is processed according to the following model: If the variable in has the value , then the instruction is executed. If has none of the indicated values, then the is executed. If the same instruction is to be executed for several values of the variables, then one can write these values one after the other separated by commas, and thus condition the common execution. Example: CASE INT1 OF 1, 5: BOOL1 := TRUE; BOOL3 := FALSE; 2:

BOOL2 := FALSE; BOOL3 := TRUE; ELSE BOOL1 := NOT BOOL1; BOOL2 := BOOL1 OR BOOL2; END_CASE; 2.2.3.6 RETURN instruction The RETURN instruction can be used for ending a function, depending upon a condition. 2.2.3.7 EXIT instruction If the EXIT instruction appears in a FOR, WHILE, or REPEAT loop, then the innermost loop is ended, regardless of the break-off condition. 2.2.4 Sequential Function Chart (SFC) The sequential function chart a graphically oriented language which makes it possible to describe the chronological order of different actions within a program. Example for a network in the sequential function chart: TX1200 23 Version: 1.3