- •第一章OpenCnc发展环境安装及使用说明
- •第二章OpenCnc Structure Motion language 一、Block Format
- •三、Expressions Operators
- •五、Functions Listing
- •六、Variables
- •程序批注 (Comment)
- •七、Macro Program Call Methods:
- •Return Methods:
- •System Variables
- •Modal information
- •Argument specification
- •Operation control/status
- •Single Block Control Word(#1502)
- •Feed Control Word(#1504)
- •Current position
- •Runtime state variable
- •Workpiece coordinate system compensation values (workpiece zero point offset values)
- •Reference point position
- •八、扩充插值G码(Extended Interpolation g Code)宏程序说明:
- •九、macro 撰写需注意事项:
- •十、macro范例:
Argument specification
Address |
Variable Number |
Address |
Variable Number |
Address |
Variable Number |
A |
#1 |
J |
#5 |
U |
#21 |
B |
#2 |
K |
#6 |
V |
#22 |
C |
#3 |
M |
#13 |
W |
#23 |
D |
#7 |
P |
#16 |
X |
#24 |
E |
#8 |
Q |
#17 |
Y |
#25 |
F |
#9 |
R |
#18 |
Z |
#26 |
H |
#11 |
S |
#19 |
|
|
I |
#4 |
T |
#20 |
|
|
关于扩充地址,X1=,请使用GETARG(address)函式读取
System Variables
编号 |
说明 |
R(读)/W(写) |
#0 |
VACANT |
R/W |
#1~#50 |
Local variable for macro program |
R/W |
Modal information
#1000 |
Interpolation mode, 00/01/02/03/33/34/35 |
R/W |
#1002 |
Contouring plane selection mode, 17/18/19 |
R |
#1004 |
Absolute/Incremental command mode, 90/91 |
R |
#1006 |
Stored stroke check mode, 22/23 |
R |
#1008 |
Cutting feed mode, 94/95 |
R |
#1010 |
Inch/Metric mode, 20/21 |
R |
#1012 |
Cutter compensation mode, 40/41/42 |
R |
#1014 |
Tool length compensation mode, 43/44/49 |
R |
#1016 |
Scaling mode, 50/51 |
R |
#1018 |
Spindle speed mode, 96/97 |
R |
#1020 |
Cutting feedrate control mode, 61/62/63/64 |
R |
#1022 |
Rotation mode, 68/69 |
R |
#1024 |
Spindle speed fluctuation detection mode, 25/26 |
R |
#1026 |
Polar coordinate interpolation mode, 12/13 |
R |
#1028 |
Polar coordinate command mode, 15/16 |
R |
#1030 |
Cutter radius offset selection number, D Code |
R |
#1032 |
Tool length offset selection number, H Code |
R |
#1034 |
Cutting condition selection number, S Code |
R |
#1036 |
Tool selection number, T Code |
R |
#1038 |
Miscellaneous function number, M Code |
R |
#1040 |
Current workpiece coordinate number |
R |
#1042 |
Program sequence number, N Code |
R |
#1044 |
Last block interpolation mode, could be 4(dwell) or vacant(M_ S_ T_ F_) for G66.1 modal macro call |
R |
#1046 |
Feedrate command, F Code |
R |
#1048 |
Caller’s current line number |
R |
#1050 |
Program start sequence number |
R |
#1052 |
Program start line number |
R |
#1054 |
Spindle operation state(M03/M04/M05) |
R |
#1056 |
Program sequence number after corner processing, N Code |
R |
