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

Page 984

Advertising
background image

L-force | PLC Designer

Programming Reference

982

DMS 4.1 EN 03/2011 TD29

Example for a Variable Configuration
Assume that the following definition for function block locio - see the example above -
is given in a program:

PROGRAM PLC_PRG
VAR
locioVar1: locio;
locioVar2: locio;
END_VAR

Then a corrected variable configuration would look this way:

VAR_CONFIG
PLC_PRG.locioVar1.xLocIn AT %IX1.0 : BOOL;
PLC_PRG.locioVar1.xLocOut AT %QX0.0 : BOOL;
PLC_PRG.locioVar2.xLocIn AT %IX1.0 : BOOL;
PLC_PRG.locioVar2.xLocOut AT %QX0.3 : BOOL;
END_VAR

Note: Changes on directly mapped I/Os are immediately shown in the process
image, whereas changes on variables mapped via VAR_CONFIG are not shown
before the end of the responsible task.

16.1.22

Declaration and Initialization of User Defined Data Types
Besides the standard data types also user defined types might be used.
For information on declaration and initialization see the pages on DUT (Data Unit
Type).

Advertising