Attribute no-exit, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 1004

Advertising
background image

L-force | PLC Designer

Programming Reference

1002

DMS 4.1 EN 03/2011 TD29

Attribute No-exit
If a function block provides an exit method, you can suppress its call for a special
instance with help of assigning the pragma {attribute 'no-exit'} to the function block
instance.
Syntax:
{attribute 'symbol’ := 'no-exit’}

Example:
Assume the exit method FB_Exit being added to a function block named "POU".

In program PLC_PRG two variables of type POU are instantiated:

PROGRAM PLC_PRG
VAR
POU1 : POU;
{attribute 'symbol’ := ‘no-exit’}
POU2 : POU;
END_VAR

When variable bInCopyCode becomes TRUE within POU1, the exit method FB_Exit is
called exiting an instance that will get copied afterwards (online change). Though the
value of variable bInCopyCode will have no influence on POU2.

Advertising