
Programming manual.
CNC 8070
STATEMENTS AN
D INSTRUCTIONS
22.
Pro
g
ramming statements
·417·
(R
EF
: 1709)
22.1.17 Definition of macros
Macros may be used to define a program block or part of it with their own names in the format
"MacroName" = "CNCblock". Once the macro has been defined, programming
"MacroName" will be the same as programming "CNCblock". When executing a macro from
the program (or MDI), the CNC will execute its associated program block.
The macros defined via program (or MDI) are stored in a CNC table; this way, they are
available for the rest of the programs without having to define them again. This table is
initialized on CNC power-up and it can also be initialized from the part-program using the
#INIT MACROTAB
instruction, thus deleting the macros saved.
#DEF:
Macro definition
Up to 50 different macros may be defined at the CNC. The defined macros may be accessed
from any program. When trying to define too many macros, the CNC issues the relevant error
message. The macro table may be initialized (erasing all the macros) using the instruction
#INIT MACROTAB
.
The definition of the macro must be programmed alone in the block.
The programming format is as follows:
#DEF "MacroName" = "BloqueCNC"
Several macros may be defined in a block as follows.
#DEF "Macro1"="Block1" "Macro2"="Block2" ...
Definition of arithmetic operations in the macros.
When including arithmetic operations in the definition of a macro, the whole arithmetic
operation must be included.
Concatenating of macros. Including macros in the definition of other macros.
The definition of a macro can include other macros. In this case, one of the macros included
in the definition must be delimited with the \" characters (
\"macro\"
).
Parameter
Meaning
MacroName
Name used to identify the macro in the program. It
may have up to 30 characters and consist of letters
and numbers.
CNCBlock
Program block. It may be up to 140 characters long.
(Definition of macros)
#DEF "READY"="G0 X0 Y0 Z10"
#DEF "START"="SP1 M3 M41" "STOP"="M05"
(Execution of macros)
"READY" (same as programming G0 X0 Y0 Z10)
P1=800 "START" F450 (same as programming S800 M3 M41)
G01 Z0
X40 Y40
"STOP" (same as programming M05)
Correct definition of a macro.
#DEF "MACRO1"="P1*3"
#DEF "MACRO2"="SIN [\"MACRO1\"]"
The following macros are defined wrong.
#DEF "MACRO1"="56+"
#DEF "MACRO2"="12"
#DEF "MACRO3="\"MACRO1\"\"MACRO2\""
#DEF "MACRO4"="SIN["
#DEF "MACRO5"="45]"
#DEF "MACRO6="\"MACRO4\"\"MACRO5\""
Содержание 8070 BL
Страница 1: ... Ref 1709 8070 CNC Programming manual ...
Страница 8: ...BLANK PAGE 8 ...
Страница 12: ...BLANK PAGE 12 ...
Страница 14: ...BLANK PAGE 14 ...
Страница 26: ...BLANK PAGE 26 ...
Страница 28: ...BLANK PAGE 28 ...
Страница 30: ...BLANK PAGE 30 ...
Страница 60: ...Programming manual CNC 8070 2 MACHINE OVERVIEW Home search 60 REF 1709 ...
Страница 72: ...Programming manual CNC 8070 3 COORDINATE SYSTEM Coordinate programming 72 REF 1709 ...
Страница 80: ...Programming manual CNC 8070 4 WORK PLANES Select the longitudinal axis of the tool 80 REF 1709 ...
Страница 96: ...Programming manual CNC 8070 5 ORIGIN SELECTION Polar origin preset G30 96 REF 1709 ...
Страница 178: ...Programming manual CNC 8070 9 TOOL PATH CONTROL MANUAL INTERVENTION Variables 178 REF 1709 ...
Страница 304: ...Programming manual CNC 8070 16 C AXIS Machining of the turning side of the part 304 REF 1709 ...
Страница 440: ...Programming manual CNC 8070 22 STATEMENTS AND INSTRUCTIONS Flow controlling instructions 440 REF 1709 ...
Страница 442: ...Programming manual CNC 8070 23 CNC VARIABLES 442 REF 1709 ...
Страница 443: ...Programming manual CNC 8070 443 User notes REF 1709 ...