L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual
Page 42

L-force | PLC Designer
What is What in PLC Designer
40
DMS 3.2 EN 02/2011 TD29
InOutVariables at call:
Please regard, that the InOutVariables (VAR_IN_OUT) of a function block are handed
over as pointers. For this reason in a call of a function block no constants can be
assigned to VAR_IN_OUTs and there is no read or write access from outside to them.
Example
Calling a VAR_IN_OUT variable inout1 of function block fubo in a ST module:
VAR
fuboinst:fubo;
iVar1:int;
END_VAR
iVar1:=2;
fuboinst(iInOut1:=iVar1);
not allowed in this case: “fuboinst(iInOut1:=2);” or “fuboinst.iInOut1:=2;”
Examples for calling function block FUB:
Function block FUB: see above, chapter 'Function Block':
Declaration part:
FUNCTION_BLOCK FUB
VAR_INPUT
iPAR1:INT;
iPAR2:INT;
END_VAR
VAR_OUTPUT
iMELERG:INT;
xVERGL:BOOL;
END_VAR