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 STRING[<string length>] <variable name>[<n>,<m>]
Syntax (DEF...=SET...)
Using a value list:
● During definition:
DEF <data type> <variable
name>[<n>,<m>,<o>]=SET(<value1>,<value2>, etc.)
Equivalent to:
DEF <data type> <variable name>[<n>,<m>,<o>]=(<value1>,<value2>,
etc.)
Note
SET does not have to be specified for initialization via a value list.
● During value assignment:
<variable name>[<n>,<m>,<o>]=SET(<VALUE1>,<value2>, etc.)
Work preparation
3.1 Flexible NC programming
NC programming
418 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0