Sfc flags, L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 69

Advertising
background image

L-force | PLC Designer

What is What in PLC Designer



DMS 3.2 EN 02/2011 TD29

67

These status flags can be used in each action and transition of the SFC module. But
they can also be accessed from other programs:

Example: boolvar1:=sfc.step1.x;

step1.x in this example is an implicit boolean variable showing the status of IEC step
"step1" in POU "sfc1".

SFC Flags

For controlling the operation of SFC POUs flags can be used, which are created
implicitly during running the project. To read this flags you have to define appropriate
global or local variables as inputs or outputs. Example: If in a SFC POU a step is active
for a longer time than defined in the step attributes, then a flag will be set, which is

accessible by using a variable "SFCError" (SFCError gets TRUE in this case).

The following flag variables can be defined:

SFCEnableLimit: This variable is of the type BOOL. When it has the value TRUE, the
timeouts of the steps will be registered in SFCError. Other timeouts will be ignored.

SFCInit: When this boolean variable has the value TRUE the sequential function chart
is set back to the Init step. The other SFC flags are reset too (initialization). The Init

step remains active, but is not executed, for as long as the variable has the value
TRUE. It is only when SFCInit is again set to FALSE that the block can be processed
normally.

SFCReset: This variable, of type BOOL, behaves similarly to SFCInit. Unlike the latter,
however, further processing takes place after the initialization of the Init step. Thus
for example the SFCReset flag could be re-set to FALSE in the Init step.

Note!

As from compiler version 2.3.7.0 SFCReset also can be used to reset boolean actions
associated to IEC steps, which was not possible before.

SFCQuitError: Provided that the Execution of the SFC diagram is stopped for as long as
this boolean variable has the value TRUE whereby a possible timeout in the variable
SFCError is reset. All previous times in the active steps are reset when the variable
again assumes the value FALSE. It is a pre-condition that the flag SFCError has been
defined also, which registers any timeout in the SFC.

SFCPause: Execution of the SFC diagram is stopped for as long as this boolean variable
has the value TRUE.

Advertising