L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual
Page 750

L-force | PLC Designer
General Editors
748
DMS 4.1 EN 03/2011 TD29
Accessing flags:
For enabling access on the flags for the control of SFC execution (timeouts, reset, tip
mode), the flag variables must be declared and activated as described above (Control
of SFC execution).
Syntax for accessing:
... from an action or transition within the SFC POU: <stepname>.<flag> resp.
_<actionname>.<flag>
Examples: "status:=step1._x;" "checkerror:=SFCerror;"
... from another POU: <SFC POU>.<stepname>.<flag> resp. <SFC
POU>_<actionname>.<flag>
Examples: "status:=SFC_prog.step1._x;" checkerror:=SFC_prog.SFCerror;"
Regard that in case of write access from another POU the implicit variable additionally
must be declared explicitly as a VAR_INPUT variable of the SFC POU or globally e.g. in a
GVL.
Example:
Local declaration:
PROGRAM SFC_prog
VAR_INPUT
SFCinit:BOOL;
END_VAR
or Global declaration in a GVL:
VAR_GLOBAL
SFCinit:BOOL;
END_VAR
Accessing the flag in PLC_PRG:
PROGRAM PLC_PRG
VAR
setinit: BOOL;
END_VAR
SFC_prog.SFCinit:=setinit; //write access on SFCinit in SFC_prog