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

Page 265

Advertising
background image

L-force | PLC Designer

Editors in PLC Designer



DMS 3.2 EN 02/2011 TD29

263

Declaration of Arrays:

If ARRAY is chosen as the variable type, the dialog for entering array boundaries
appears.

.

Dialog for determining array boundaries during automatic declaration

For each of the three possible dimensions (Dim.), array boundaries can be entered
under Start and End by clicking with the mouse on the corresponding field to open
an editing space. The array data type is entered in the Type field. In doing this, the

button can be used to call up an input assistant dialog.

Upon leaving the array boundaries dialog via the OK button, variable declarations
in IEC format are set up based on the entries in the Type field in the dialog.
Example: ARRAY [1..5, 1..3] OF INT
In the field Initial value, you may enter the initial value of the variable being
declared. If this is an array or a valid structure, you can open a special initialization
dialog via the

button or , or open the input assistant dialog for other variable

types.
In the initialization dialog for an array you are presented a list of array elements; a
mouse click on the space following „:="opens an editing field for entering the

initial value of an element.
In the initialization dialog for a structure, individual components are displayed in a
tree structure. The type and default initial value appear in brackets after the
variable name; each is followed by „:=". A mouse click on the field following „:="
opens an editing field in which you can enter the desired initial value. If the
component is an array, then the display of individual fields in the array can be
expanded by a mouse click on the plus sign before the array name and the fields
can be edited with initial values.
After leaving the initialization dialog with OK, the initialization of the array or the
structure appears in the field Initial value of the declaration dialog in IEC format.
Example: x:=5,field:=2,3,struct2:=(a:=2,b:=3)

Advertising