-Shenzhen Guanhong Automation Co.,Ltd.-
SZGH-CNC1000MDb Series
- 89 -
3.30 Macro program instruction(G65/G66/G67)
3.30.1
Non-Mode Macro Command G65
Format: G65 P_ L_ A_ B_ C_ ......
Non-mode macro command G65 only work at current line , which is different to mode macro
command(G66),which always work until macro cancel command(G67)
P_ : Specify name of macro program, E.g: P6000 , name of specified macro program is 6000 .
L_: Set times of call macro program
<A_B_C_... ...> : Argument , which is used for transfer data to macro variable(#**) , Transferring
table is as following
Argument
Variable
Argument
Variable
Argument
Variable
A
#0
I
#7
T
#14
B
#1
J
#8
U
#15
C
#2
K
#9
V
#16
D
#3
M
#10
W
#17
E
#4
Q
#11
K
#18
F
#5
R
#12
Y
#19
H
#6
S
#13
Z
#20
Warning:
1. Macro variables #100-#155¾-#201 was occupied by system, user cannot use.
2. User cannot use G70,G71,G72,G73,G92,G76 etc loop command on Macro program.
Note: the address G, L, N, Q, P can’t be used as user-defined variables.
Example:
Main program:9000
Macro program:8000
G00 X0 Z0
G65 P8000 L1 A5 B6
G0 X0 Z0
M30
N1 #2=#0+#1
N2 IF
(
#2 EQ 10
)
GOTO 4
N3 GOO X#2
N4 G00 Z#1
N5 M99
;Return
3.30.2 Mode Macro Command G66/G67
G66 is mode macro command , G67 is cancel mode macro command
Format: G66 P_ L_ A_ B_ C_ ......
G67
G66 Mode macro command,which always call macro program until macro cancel
command(G67)
P_ : Specify name of macro program, E.g: P7000 , name of specified macro program is 7000 .
L_: Set times of call macro program
<A_B_C_... ...> : Argument , which is used for transfer data to macro variable(#**) , the
transferring table is same as above table.
Example:
Main Program : 4000
G00 X0 Z0
G66 P6000 L2 A5 B6
Содержание SZGH-CNC1000MDb Series
Страница 220: ...Shenzhen Guanhong Automation Co Ltd SZGH CNC1000MDb Series 207 Appendix I Wiring Diagram of CN3 Plug...
Страница 221: ...Shenzhen Guanhong Automation Co Ltd SZGH CNC1000MDb Series 208 Appendix II Wiring Diagram of CN10 Plug...
Страница 222: ...Shenzhen Guanhong Automation Co Ltd SZGH CNC1000MDb Series 209 Appendix III Wiring Diagram of CN4 Plug...