1.1.12
Definition and initialization of array variables (DEF, SET, REP)
Function
A user variable can be defined as a 1- up to a maximum of a 3-dimensional array.
•
1dimensional: DEF <data type> <variable name>[<n>]
•
2dimensional: DEF <data type> <variable name>[<n>,<m>]
•
3dimensional: DEF <data type> <variable name>[<n>,<m>,<o>]
Note
STRING data type user variables can be defined as up to a maximum of 2-dimensional
arrays.
Data types
User variables can be defined as arrays for the following data types: BOOL, CHAR, INT,
REAL, STRING, AXIS, FRAME
Assignment of values to array elements
Values can be assigned to array elements at the following points in time:
•
During array definition (initialization values)
•
During program execution
Values can be assigned by means of:
•
Explicit specification of an array element
•
Explicit specification of an array element as a starting element and specification of a value
list (SET)
•
Explicit specification of an array element as a starting element and specification of a value
and the frequency at which it is repeated (REP)
Note
FRAME data type user variables cannot be assigned initialization values.
Syntax (DEF)
DEF <data type> <variable name>[<n>,<m>,<o>]
DEF
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
STRING[<string length>] <variable name>[<n>,<m>]
Flexible NC programming
1.1 Variables
47