Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
7
Table of contents
Preface ...................................................................................................................................................... 3
1 Flexible NC programming ........................................................................................................................ 15
1.1 Variables ......................................................................................................................................15
1.1.1 General information about variables............................................................................................15
1.1.2 System variables..........................................................................................................................16
1.1.3 Predefined user variables: Arithmetic parameters (R).................................................................19
1.1.4 Predefined user variables: Link variables....................................................................................20
1.1.5 Definition of user variables (DEF)................................................................................................23
1.1.6 Redefinition of system variables, user variables, and NC language commands (REDEF).........30
1.1.7 Attribute: Initialization value .........................................................................................................33
1.1.8 Attribute: Limit values (LLI, ULI)...................................................................................................36
1.1.9 Attribute: Physical unit (PHU) ......................................................................................................38
1.1.10 Attribute: Access rights (APR, APW, APRP, APWP, APRB, APWB)..........................................40
1.1.11 Overview of definable and redefinable attributes.........................................................................45
1.1.12 Definition and initialization of array variables (DEF, SET, REP) .................................................46
1.1.13 Definition and initialization of array variables (DEF, SET, REP): Further Information.................51
1.1.14 Data types....................................................................................................................................53
1.2 Indirect programming ...................................................................................................................55
1.2.1 Indirectly programming addresses...............................................................................................55
1.2.2 Indirectly programming G codes..................................................................................................58
1.2.3 Indirectly programming position attributes (BP)...........................................................................59
1.2.4 Indirectly programming part program lines (EXECSTRING) .......................................................62
1.3 Arithmetic functions......................................................................................................................63
1.4 Comparison and logic operations ................................................................................................66
1.5 Precision correction on comparison errors (TRUNC) ..................................................................68
1.6 Variable minimum, maximum and range (MINVAL, MAXVAL and BOUND) ..............................70
1.7 Priority of the operations ..............................................................................................................72
1.8 Possible type conversions ...........................................................................................................73
1.9 String operations..........................................................................................................................74
1.9.1 Type conversion to STRING (AXSTRING) ..................................................................................75
1.9.2 Type conversion from STRING (NUMBER, ISNUMBER, AXNAME) ..........................................76
1.9.3 Concatenation of strings (<<).......................................................................................................77
1.9.4 Conversion to lower/upper case letters (TOLOWER, TOUPPER) ..............................................79
1.9.5 Determine length of string (STRLEN) ..........................................................................................80
1.9.6 Search for character/string in the string (INDEX, RINDEX, MINDEX, MATCH)..........................81
1.9.7 Selection of a substring (SUBSTR) .............................................................................................82
1.9.8 Selection of a single character (STRINGVAR, STRINGFELD) ...................................................83
1.10 Program jumps and branches......................................................................................................85
1.10.1 Return jump to the start of the program (GOTOS) ......................................................................85
1.10.2 Program jumps to jump markers (GOTOB, GOTOF, GOTO, GOTOC) ......................................86
1.10.3 Program branch (CASE ... OF ... DEFAULT ...) ..........................................................................89
1.11 Repeat program section (REPEAT, REPEATB, ENDLABEL, P) ................................................91