|
在tcl文件找到2 i( G* F; C6 W( m2 w3 Y3 B' v% y; B6 u
找到 proc PB_CMD_before_motion { } : s9 v5 m6 X8 T8 c7 {
修改为:5 S/ i- X& i. d# x# N' C) r
#=============================================================
# T2 M' v; t$ l* y$ [' N+ nproc PB_CMD_before_motion { } {/ Q$ G3 A) o4 `% o' n6 Z
#=============================================================
& p! Q p5 R8 m, b global mom_motion_event mom_motion_type" f# K0 _: H m0 D
global mom_pos0 P; {, p, ]4 F T, h6 `
global max_z min_z
/ J$ Z2 a9 C2 d4 f+ Y$ p 5 M" @* L, W' K! m
FEEDRATE_SET
# z1 G! z$ c' R; g switch $mom_motion_type { J/ |# `6 G( ^+ ~' n0 d
ENGAGE {PB_engage_move}7 P+ Q4 M2 g; {3 C+ ^* T
APPROACH {PB_approach_move}
6 x* M$ j; P6 T/ f$ p3 c3 K FIRSTCUT {PB_first_cut}3 S4 N1 M: w( \" i
}
# ?7 r& Z J; b* Y" x7 A" d# if {[llength [info commands PB_CMD_before_motion]]} {PB_CMD_before_motion}
: }! Q/ O; y4 e; s0 t. ^ + t# S" V% c2 l3 T- G% R( l
set pb_start_of_program_flag 0
0 K3 s2 K4 H& E7 f* a0 r
, w% A8 V' \: _1 R4 F; p; Y% X if {![info exists min_z]} {
% x3 U- O, X1 r7 y ]8 t set min_z $mom_pos(2)
1 f& q! P! ?0 S- b7 f0 f0 }3 | } elseif { $mom_pos(2) < $min_z } {+ ~( q, o7 T9 t2 T
set min_z $mom_pos(2)
+ i' N; y+ M z% n* Z: a }
7 j' V! N4 V% C c6 W if {![info exists max_z]} {
6 V6 Z) h% p) O8 X set max_z $mom_pos(2)
9 f9 N9 X# O0 u; U$ I } elseif { $mom_pos(2) > $max_z } {: I7 h; r+ r f8 I1 S% I
set max_z $mom_pos(2)
8 ^! X7 N5 t* J ?! u } / S$ l. k& L2 u1 d; @+ ?9 b
}
p: U9 S$ }% d/ h5 d$ z7 }" M/ H
: i! l+ M+ Y: g主要是因为max_z和min_z没有定义导致错误. |
|