Implicit variables in sfc, L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 68

Advertising
background image

L-force | PLC Designer

What is What in PLC Designer

66

DMS 3.2 EN 02/2011 TD29



Note!

When an action has been deactivated it will be executed once more. This means
that each action at least is executed twice (also an action with qualifier P).

Implicit variables in SFC

In SFC implicitly declared variables ( "flags") can be used to scan the status of steps
and actions as well as the time of steps. These flags each are set at the beginning of a
cycle. For IEC steps and IEC actions they are provided by the library iecsfc.lib
(structures SFCStepType and SFCActionType), which is included automatically in a
project, for the simplified steps they are implemented in »PLC Designer«.

Scan of the step or action status via boolean variables:

• For IEC steps: <stepname>.x resp. <stepname>._x: <StepName>.x shows the

current activation status. <StepName>._x shows the activation status for the next
cycle. If <StepName>.x=TRUE, the step will be executed in the current cycle. If
<StepName>._x=TRUE and <StepName>.x=FALSE, the step will be executed in the
following cycle, i.e. <StepName>._x gets copied to <StepName>.x at the beginning
of a cycle.

• For simplified steps: <stepname> resp. _<stepname>: If <StepName>=TRUE, the

step will be executed in the current cycle. If _<StepName>=TRUE, the step will be
executed in the following cycle, i.e. <StepName> gets copied to _<StepName> at
the beginning of a cycle.

• For IEC-actions: <actionname>.x gets TRUE as soon as the action gets active

(<actionname>._x is only for internal purposes, not for a status scan).

Time of a step via TIME variables:

The following implicit variables give the current time span which has passed since the
step had got active; this is only for steps which have a minimum time configured in

the step attributes.

• For IEC steps: <stepname>.t (<stepname>._t not usable for external purposes)
• For simplified steps: _time<stepname>. BUT: If this implicit variable should be

used for scan purposes, it also must be declared explicitly as a TIME variable; e.g.
"_timeStep1 : TIME;"

• For IEC actions: the implicit time variables are not used.

Advertising