|
|
sav_absinc : 0 #Absolute/Incremental Saved value
7 F" E" v8 |+ Y) `! G( E, k0 ysav_coolant : 0 #Coolant saved / }$ ~& L* F. }) p. q# m8 h3 z8 X
toolchng : 1 #On a toolchange flag 8 G; q% R* Y- F! Q! G1 @) s
spdir2 : 1 #Copy for safe spindle direction calculation
2 ]+ Q. o. ?8 }3 v! W J0 x, [% E#Drill variables
+ I$ _3 V& A) Ldrlgsel : -1 #Drill Select Initialize 8 q% h- l9 O' m
drillref : 0 #Select drill reference b8 a6 I2 m) `1 l* T
peckacel : 0 #Fractional percent to reduce peck2 when usecan.. : no
, w A7 [. k' [. t; J' kdrlgcode : 0 #Save Gcode in drill
+ v9 F8 K3 v5 Q: M% xsav_dgcode : 0 #Drill gcode saved
! B; R) L; G/ B2 p
* z. ^0 `7 a& T! C# --------------------------------------------------------------------------
# [0 U, v; S1 ?6 f: S% N# 格式列表 - n=nonmodal, l=leading, t=trailing, i=inc, d=delta
/ G1 R3 f& y/ x. P, U0 A# & @8 n- \* w, I, F/ N
# --------------------------------------------------------------------------
6 W ^- |9 Z7 z O4 H
0 y7 B; R8 R( H$ l9 R" r, M#定義 英制/米制 坐標格式列表 1 F0 {$ U; h; G# Z7 |/ f
fs2 1 0.7 0.6 #小數, absolute, 7 place, default for initialize ( 0 C4 o$ D# N* K1 i/ u ~( K1 b
fs2 2 0.4 l1.3 #小數, absolute, 4/3 place (x,y,z) 5 Y) [4 w& E1 b5 `1 H8 W
fs2 3 0.4 l1.3d #小數, delta, 4/3 place (i,j,k) $ l) m3 _8 `4 t& g
1 S. |8 \+ z; X#Common format statements / Y! N5 Z1 N! b9 x7 d
fs2 4 1 0 1 0 #整數, 無前綴 2 H) B! Y( v* V2 {3 X
fs2 5 2 0 2 0l #整數, 強制兩位前綴
3 }1 n3 D! L" rfs2 6 3 0 3 0l #整數, 強制三位前綴
$ \- K4 w0 ^; h$ m9 sfs2 7 4 0 4 0l #整數, 強制四位前綴 ( v; S" L# h5 ^' R( l& h
fs2 9 0.1 0.1 #小數, absolute, 1 place 5 F6 [* Q% f9 j) T6 K' A2 R, H
fs2 10 0.2 0.2 #小數, absolute, 2 place
) V9 ~* Q0 Y- v9 ?9 Z0 z5 Hfs2 11 0.3 0.3 #小數, absolute, 3 place
2 i5 Q$ \' e, y( Y' f# ]+ s, Tfs2 12 0.4 0.4 #小數, absolute, 4 place 中國熱模網首發 , o$ y7 {) p% L' e6 l+ M- i8 G
fs2 13 0.5 0.5 #小數, absolute, 5 place o! r! o2 L3 D: v; r
fs2 14 0.3 0.3d #小數, delta, 3 place
% t& d* _! [3 bfs2 15 0.2 0.1 #小數, absolute, 2/1 place
- n+ U% w8 Z" ?4 ]$ s' Sfs2 16 1 0 1 0n #整數, 強制輸出 ( g( C8 y) f0 g0 V! j4 _- v! L1 C
+ S% Y6 x$ [% f3 T$ y8 K- ?$ O6 ~6 p1 C1 ~: y2 j
# 輸出加工類型字符串定義
6 l& r6 y' }" Q+ U1 C& j! L# -------------------------------------------------------------------------- & A9 `6 t0 U, y8 X9 l2 o D
# 字符串 - 字符串標簽必須由 's' 開頭,它們沒有預先指派
) [; _& @: [/ |! q+ t# -------------------------------------------------------------------------- ( k( o9 F" I$ G8 J
#Select operation note
7 t8 g1 ]7 y% _/ W; Qsop00 "NULL" # String definition $ Q, Y$ p) A) f! i7 p% Z' l
sop01 "CONTOUR" # " " - w. ?& J3 @3 Q& a! H
sop02 "CONTOUR" # " "
: `9 o, C" ~# z( m K; vsop03 "DRILL CYCLE" # " "
, }6 W3 b W* x2 y/ Hsop04 "OCKET...." # " " 0 A ^* \0 a, i
sop05 "RULED....." # " " * m* {( |( e/ T) k1 ^- d, n7 |* p' G$ l
sop06 "2D-SWEPT.." # " " 4 R8 @0 o+ _9 W6 n# x2 m
sop07 "3D-SWEPT.." # " "
) j6 c" m: G, w' z( x' y, r4 K: ^sop08 "REVOLVED.." # " "
, c8 U9 S* B' j( Gsop09 "LOFT......" # " " , A. h& B- L9 ?; `9 e$ B8 r
sop10 "COONS....." # " "
$ t. f U: T7 n' H# K$ dsop11 "TRIM ....." # " " 7 s: k& A. j+ y- c0 j
sop12 "FLOWLINE.." # " "
. a0 ^+ n' c+ X; T* x# I5 f3 I5 dsop13 "SURFACE_FINISH" # " " 1 d0 O6 L- L# S2 l* I
sop14 "SURFACE_ROUGH" # " "
d# ?0 @# c9 t. q" }7 Xsop15 "OINT....." # " " $ S# T& ?2 ~$ t! b' m
sop16 "DRILL-5AX."
# h) Z8 V7 D' u4 u! jsop17 "CURVE-5AX."
\4 w) H( Z- z- \, O% M% N! ?# ysop18 "SWARF-5AX." 3 B- v) {: k" Z
sop19 "flat MILL" # f2 f. q4 i# K+ R) l
sop20 "op20?....."
4 Q0 |, C, f9 K, p; F: Y; O' E: g6 U5 r2 w
- [ |: W; X/ g% o. k3 t. {
- v; t. h/ a$ t5 G$ d
sopnote # Target string
a6 t* E% V1 O) _9 V- ]
+ ?& k4 y! E" @7 j6 [fstrsel sop00 opcode sopnote . p; a& [$ n: I' L
3 q- P7 @ Z9 X, R; z. N l5 T# --------------------------------------------------------------------------
! M" A; X& Z; L. D; l# NC 輸出的字符串和字符串選擇定義 ; k: m: D2 X& Q+ x
# -------------------------------------------------------------------------- 4 v% i- }$ H) J8 Z4 z
* ^6 U8 u9 s( A- z: n5 y+ _#Address string definitions 位址串定義 w1 Q7 A' X* @; i# a
strm "M"
0 V& L- b# J! I, o d# z+ xstrn "N"
: Y* n* }( G! g' ~) N3 Kstro "O"
! N. y' f: X" t; V3 e- [! Nstrp ""
" c* M! I- A2 t: W- `& Jsrad "R" ' R5 ]7 n' t [# C3 x3 Z
srminus "R-" 5 t4 u; p7 z' I: a6 h
sblank ) ^% ?6 ?+ X9 s+ _7 a3 [- x1 r# f
8 \, F$ |% D' r9 U! e6 N3 z* ]#Cantext 字符串定義 (spaces must be padded here)
' Z9 a6 p0 B: `/ {sm00 "M00" ' B' T# ?* i1 G# {( s6 L) a& @
sm01 "M01"
: h R' c0 W) M7 t, estrtextno
' ~, O' [+ g5 G) {- Istrcantext * S2 D( S2 a0 y! `
* {* J4 }9 X$ e8 v9 D6 |
# -------------------------------------------------------------------------- 9 F% _$ h1 i$ D0 M* D. a
# 錯誤信息
( R4 V9 J, |. |- b! P9 z# -------------------------------------------------------------------------- 8 ^4 u7 E* O$ O! |) }. q. T' f
saxiswarn " WARNING-THE RAD OF ARC IS TOO LARGE"
; W M# `, Q: |' Q9 G2 z' A; N& D3 Y+ @. t" l
" s8 i3 C w. Q$ y8 u5 Y
# -------------------------------------------------------------------------- 4 n- w& E- O. p0 K
# 一般的 G 和 M 代碼串選擇表 General G and M Code String select tables
7 j A, P( `+ J# -------------------------------------------------------------------------- % Z4 V( `, p- e/ a) {
# 運動 G 代碼選擇 $ _) ]9 j, J6 T8 j. Y2 `* a) V
sg00 G00 #快速定位 3 R0 b& Y. g/ p
sg01 G01 #直線進給
6 z% C) ]$ S# O. qsg02 G02 #圓弧插補 CW
z* W6 n5 W+ @7 osg03 G03 #圓弧插補 CCW
. z9 |* ~- Y" z* ?6 O6 Nsg04 G04 #暫停
5 ?0 }) o8 |6 v* Nsgcode #Target for string $ u! j/ q3 L! f% L
6 H* m2 h) m, b2 q+ z
fstrsel sg00 gcode sgcode
9 u5 H6 b" c1 V% I5 U% \$ K# --------------------------------------------------------------------------
4 P$ T0 G/ u& E. l \; ^# 選擇工作平面 G 字串 4 I' `$ s8 V# N' [
sg17 G17 #XY 平面代碼 3 s& s9 y2 f: ]" a* s# F
sg19 G19 #YZ 平面代碼 + d( N. Q1 c6 y' F* e
sg18 G18 #XZ 平面代碼 ! B* s; B: }4 _6 @' q
sgplane #Target string " o5 r( i5 D& r3 q+ U
: U: Q- z0 O0 Ufstrsel sg17 plane sgplane 8 q9 \0 Q' U2 Q/ Z2 o- ~: B
# -------------------------------------------------------------------------- * L X7 {* |- v) `7 n8 d
#選擇 英制/米制 字串
1 _+ _" U' k6 ]3 csg20 G20 #英制代碼 % a! a4 _; G! U. O, S
sg21 G21 #米制代碼 8 X. Q5 y/ V' m* [1 k' w) i L% K
smetric #Target string
2 q; J8 V4 V( a& a% t% p4 Q' |! I4 v2 I5 |! H
fstrsel sg20 met_tool smetric
1 e' q0 {' d, a6 E4 b& [# -------------------------------------------------------------------------- # ]9 R- |1 Z9 O3 T: `4 ?
#選擇參考點回歸字串 9 w# i$ m% f. G5 v
sg28 G28 #第一參考點回歸 ; v, U ]9 A. i8 Z* m1 c
sg30 G30 #第二參考點回歸
( v0 [' H$ g: l) Bsg28ref #Target string c" F- \7 i" H/ R: h+ G% X
: y; W; Y# R. s2 |; L. `
fstrsel sg28 mi3 sg28ref
% ?9 y6 x- [ T5 d! y4 s% P# --------------------------------------------------------------------------
$ ^- _; K- V6 e- D: h# 切削補償 G 字串選擇
1 u# H! ^ o/ d( Q1 \5 Bscc0 G40 #切削補償取消 ( g& D% E( \: L' L4 E1 o
scc1 G41 #切削左補償 中國熱點模具網
7 A( T4 C: {5 _9 N7 pscc2 G42 #切削右補償 - ?& }2 j, B) R9 T2 @7 P
sccomp #Target for string . Z5 _& n: `2 w( X5 V
/ Y& D, C% D6 B- O" i6 d9 zfstrsel scc0 cc_pos sccomp , I+ p! w) [ [+ f' F$ E7 L' h
# --------------------------------------------------------------------------
7 k( g: n) x q. }# 鉆孔固定循環字符串選擇 7 e# q6 a7 j0 F& G* j* F. S$ L
sg81 G81 #鉆孔 - 無暫停 ( C9 R+ Z: C+ c8 k7 q- K, s( b3 B
sg81d G82 #鉆孔 - 有暫停 5 c) F' `+ d) j8 q( f
sg83 G83 #啄式鉆孔 - 無暫停 + f+ ^1 T, |/ g
sg83d G83 #啄式鉆孔 - 有暫停
) t& P; U# k# Rsg73 G73 #斷屑 - 無暫停 * ? N0 O; z7 z! b3 H
sg73d G73 #斷屑 - 有暫停 : i5 C _" D- G8 h1 @$ g
sg84 G84 #攻螺紋 - 右手
* `) Y+ W' [( P' ?$ m, A8 Vsg84d G74 #攻螺紋 - 左手 & o3 [+ g/ X8 k6 I1 X0 V
sg85 G85 #鏜孔 #1 - 無暫停 ! x8 Z G) S4 i: n t) {% V* Q) `& U9 _
sg85d G89 #鏜孔 #1 - 有暫停 , } e( o7 M4 o- V* P
sg86 G86 #鏜孔 #2 - 無暫停
/ m/ t5 P) R1 P; J8 }$ gsg86d G86 #鏜孔 #2 - 有暫停 3 D$ K, ?2 J2 [4 a, V% f
sgm1 G76 #misc #1 - 無暫停
; O) `- \# r9 |/ A4 Lsgm1d G76 #misc #1 - 有暫停 2 ~0 V5 {6 w" F T; \
sgm2 G81 #misc #2 - 無暫停 ; C- Z! j/ u5 \6 `+ p
sgm2d G82 #misc #2 - 有暫停 9 H! o n0 ?& F/ }$ M
sgdrill #Target for string
, ?' R# u- E+ v7 {; X$ T* k; y5 W3 y
: s+ Y* u3 v/ `% @0 k Sfstrsel sg81 drlgsel sgdrill L+ ~: f/ h, O3 [$ E5 [
# -------------------------------------------------------------------------- : |9 z- e& r) G& \% ^
# 選擇增量或絕對 G字符串
5 Y) s' @2 j1 Y2 x5 A1 Q E' rsg90 G90 #絕對代碼 ' |1 l6 u( T; A/ r
sg91 G91 #增量代碼 7 N. t7 t$ y8 R6 ?/ u
sgabsinc #Target string
) L8 u1 ^# ~* l' Y! O1 X* R' S/ k( g" f
fstrsel sg90 absinc sgabsinc
9 N# h. b0 e' h+ P6 G$ @# -------------------------------------------------------------------------- * q+ R1 @( B+ q' @( C6 ]$ R' Q
#鉆孔固定循環參考高度
( N" g1 h+ J0 ?3 r, x5 L- Dsg98 G98 #Z軸回到起始高度
; [0 O: M1 Y6 J- \- B& Y6 wsg99 G99 #Z軸回到參考高度 8 E* o0 Z/ w. z0 F
sgdrlref #Target for string 1 j& m! |; K( ?4 E* O3 P
& J6 R g x. j/ j' l1 U# o4 ~. ^" Rfstrsel sg98 drillref sgdrlref # Drill cycle G string select
$ H+ m3 e$ n( w% v# u" H3 u2 V# --------------------------------------------------------------------------
5 p( G! l) |1 o) v. I2 W; y# Generate string for spindle
% C- \4 O: ?# @: b& ?sm04 M04 #主軸反轉
/ X4 S7 h3 x [. \3 Qsm05 M05 #主軸停止 : @, |" }3 @: t$ N0 A
sm03 M03 #主軸正轉
z8 `9 B! t/ e; w k9 h Ispindle #Target for string
1 L. ?# ~9 Y0 f! U0 r1 T) L# I4 c; v, }. K, K: n( J
fstrsel sm04 spdir2 spindle 1 Y0 E9 M8 ] ^( ]
# --------------------------------------------------------------------------
_( n2 M" L& G8 {6 W: n" {# 冷卻 M 字符串選擇 7 d; ]2 |) j2 K; d; w( j6 h6 v; t
sm09 M09 #冷卻液 Off
; k6 R6 }, M- s, N! L |sm08 M08 #冷卻液 噴射 / ~* U1 A# P+ L+ U
sm08_1 M08 #冷卻液 噴霧 / ]. B+ N+ p8 Z! L4 C
sm08_2 M08 #Coolant Tool
5 j! H8 u1 H1 H/ E& p) @- L9 u' S2 Vscoolant #Target for string
! ~# N" ^9 ^7 N7 \0 i e: P" R, y
fstrsel sm09 coolant scoolant ' Z2 e' X$ k8 I/ o
# --------------------------------------------------------------------------
$ I; v8 E1 Q2 \) J- `# 定義齒輪選擇代碼 # |9 H3 A8 y# N7 n9 S: l6 d% m3 B
flktbl 1 3 #Lookup table definition - table no. - no. entries ) a7 W0 x# Z3 h$ E) S' D* b& F
40 0 #底速齒輪檔 4 ^1 p' R" A9 g( T% Z4 X6 ]+ k
41 400 #中速齒輪檔 & |; D0 |! L' u7 T/ V: D
42 2250 #高速齒輪檔 4 x4 V2 v+ j; U ?9 N* Y
' c$ L: ~3 l' e( Q) K K. u* M
# --------------------------------------------------------------------------
/ b; F( [& ]5 k2 k7 U$ F# 刀具交換 / NC輸出變量格式
c7 R" ?' b- J: D# --------------------------------------------------------------------------
8 ]& E& ~1 c' \; g1 a# i. g$ Ffmt T 4 t #刀具號
! A n8 |4 L) o/ W+ e& y ?fmt T 4 first_tool #第一把使用的刀具 5 R2 U* }8 k/ |; W$ o9 c- a
fmt T 4 next_tool #下一把使用的刀具 7 |$ N2 ]6 a1 R' Q- L- n* T2 |! s
fmt D 4 tloffno #直徑偏移號 ( I+ v5 X! B$ y$ j+ |* K8 Q2 x
fmt H 4 tlngno #長度偏移號
' q7 [& I$ ^2 t' A/ X6 r& {fmt G 4 g_wcs #WCS G address
" n7 ~2 O q1 ^; ]4 g8 t, c H* Zfmt P 4 p_wcs #WCS P address ( r2 W# ]$ R/ l8 l. i3 d- m
fmt S 4 speed #主軸轉速 " f1 `# V* f3 T7 q. ?+ r
fmt M 4 gear #Gear range |
|