最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

UG后处理刀补的正确输出方法

IT圈 admin 152浏览 0评论

2024年3月24日发(作者:波静逸)

UG后处理刀补的正确输出方法

. w/ X; @- J4 f* ]; Q

前一段时间搞ug 刀补的多刀处理问题,蛮头疼的,看到一强人Yeager给了一个方法.

S" S% D$ y( R% : m

在Cutcom On里面增加一個Custom Command.,.填入"MOM_force once D",这个

方法可以解决D号的模态省略的问题

,即在分层刀路里第二层G41/G42后没有D号的问题. 佩服啊!

关于G40的处理:. T9 B5 3 r1 J( B! r2 t5 e# i% L

在Cutcom off项中删除G40 ,生成程序的效果如下: u9 o! m# F! y* E& a) j4 L

2 J" }: D2 `$ ~6 c; n

N40 G0 G90 X-58. Y30. M03 S2000$ u! C: @) ~4 X; _/ R D2 H. q

N50 G43 Z3. H01

N60 Z1.077/ U- D1 Q* G( p7 C4 Z, k7 g

N70 G1 Z-1.923 F250.; u0 [8 t1 p! U: _

N80 G41 X-55. D01& h8 Y; r `9 ( ~0 f

N90 G2 X-50. Y35. I5. J0.07 b9 P8 s) ^" D6 x4 i#

N100 G1 X50.8 P4 K: h6 ?# l( N; M" i

N110 G2 X55. Y30. I0.0 J-5.; b1 h" j6 B( h; d X

N120 G1 Y-30., O! y2 V% X6 }/ n" b

N130 G2 X50. Y-35. I-5. J0.0

N140 G40 G1 Y-37.54, r2 O5 C) U% M) C

N150 G0 Z1.077

N160 Y-38.0 _. O" A! h% |; l

N170 Z-.846/ j/ n" I8 X9 I

N180 G1 Z-3.8466 N7 M8 x- k' U L- U2 A U

N190 G42 Y-35. D01

N200 G3 X55. Y-30. I0.0 J5.! L: `1 O: }% W$ Y+ [4 D: F+ h

N210 G1 Y30.! @) v: r6 1 M

N220 G3 X50. Y35. I-5. J0.0

N230 G1 X-50.

N240 G3 X-55. Y30. I0.0 J-5. _; i, m3 G. i$ b# V. N r% [- W

N250 G40 G1 X-57.54

N260 G0 Z-.846

N270 X-58.

N280 Z-2.769

N290 G1 Z-5.769

N300 G41 X-55. D01

N310 G2 X-50. Y35. I5. J0.0$ J( c: J* q! Z

, b% S f! Q$ o

在fanuc 、mazak等机床上试验过,在fanuc系统上如果G41后没有D号,可以执

行前一个模态的有效的D号,在G40后如果没有撤销刀补的直线段,刀补撤销没有问题,

在G40这一句不产生移动,在下一句G1 x y 的语句执行

。如果将G41D1 单独列一行,可以对下一个坐标点进行补偿,但是补偿点的位置有

在mazak系统中:G41D1单独列一行的语句运行后,立即对前一个坐标点进行补偿,

G40也是如此,也就是说补的位置不是我们要补的位置。' ~; k. M$ n. a3 |: Q- q( e

所以我们为了程序的正确性,必须保证G41 D1 position7 H0 V- V1 R; N) U* I

,G40 position 的格式。

2 x, a& @; O! M8 n/ k% M

做好刀补的方法:

总结:1.在Cutcom On里面增加一個Custom Command.,.填入"MOM_force once

D",这个方法可以解决D号的模态省略的问题1 a2 a+ E/ v; o

2.删除Cutcom Off的G40。

3.在rapid move 里加入G40。% y6 Q% U$ f( R2 v# K- w6 n% A

4.加入G54

5.刀具信息:global mom_tool_name) l6 _# N3 v6 w2 r

MOM_output_literal "(TOOL NAME $mom_tool_name)"

1 x6 F/ k* D; ^4 @) Y1 ~$ Q4 f

6.加工时间:global mom_machine_time: @# Y+ u+ h- L9 @6 r4 `

, d7 v6 c2 ^) p+ H0 L" {)

MOM_output_literal "(MACHINE TIME [format "%.2f" $mom_machine_time]

MIN )"

7.在每个操作前加入行号及路径名$mom_path_name( J( R* P- i+ w: n

on$ t8 [, R# q& T% s. q7 M f, x- ?% j

路径名(operator message)' r5 J P0 g+ z* G8 Y, [4 U

off

8.在rapid move中,需对rap1,rap2,rap3及m13强制输出./ L* x+ |) T; e; i( _1

S+ K# p% A

$ z7 @. {$ f$ X9 |2 l

($mom_output_file_basename)(刀轨文件名)

$mom_path_name(操作名)' w R( 4 s2 j7 A" c4 E# E6 M* U

9."MOM_force once M03" 。

10. 要用M8-Coolant Flood

11.螺纹铣:init_helix

uplevel #0 {

#

# This procedure will be executed automatically at the start of program and

# anytime it is loaded as a slave post of a linked post.

#" ?& P% l% b+ d' U0 j! |

# This procedure can be used to enable your post to output helix. U, D& v$ e'

`2 a C

# You can choose from the following options to format the circle 1 g: c3 p4 J"

F7 S5 y3 @

# block template to output the helix parameters.% d& j2 |' p _8 Z( X" y) G

#

set mom_sys_helix_pitch_type "rise_radian" ; N0 p4 o* U/ P( I

#

# The default setting for mom_sys_helix_pitch_type is "rise_radian".

# This is the most common. Other choices are:1 L$ i0 u5 e. _) T: W/ c( e, j7 M

#

# "rise_radian" Measures the rise over one radian.

# "rise_revolution" Measures the rise over 360 degrees.% c% m8 n/

C0 j2 D; M

# "none" Will suppress the output of pitch.

# "other" Allows you to calculate the pitch; R9 I0 N$ C2 E) Z6

e. H1 q, x o

# using your own formula.

#

# This custom command uses the block template circular_move to output" j2 [;

u( A8 T: j& V/ ?

# the helix block. If your post uses a block template with a different4 t9 s% z.

o; ) o, z" K1 {. K

# name, you must edit the line that outputs the helix block. b* U. # ]0 |) J$ l

m9 P" @: F( t7 E, Z: ^

#

# The following variable deines the output mode for helical records.( p; c% d3

A6 i$ R

#, E6 R4 X7 T! P+ ^, w

# FULL_CIRCLE -- This mode will output a helix record for each 360

# degrees of the helix.5 |* }2 T& a/ I2 ]+ H

# QUADRANT -- This mode will output a helix record for each 90 7 o! I, {)

A& P1 `

# degrees of the helix.: M' h0 A" T8 y+ Z

# LINEAR -- This mode will output the entire helix as linear gotos.

# END_POINT -- This mode will assume the control can define an entire

# helix in a single block.

set mom_kin_helical_arc_output_mode FULL_CIRCLE& N! o# y5 n( N. e# p

MOM_reload_kinematics _9 A2 v# @1 b$ h. m8 K

7 I$ |/ c7 N+ T- M0 [ M

* K% X8 w+ a* M3 @. B" U

" b6 [& m0 U8 l1 b2 I6 B

#=================================================

============

proc MOM_helix_move { } {4 `& r! z$ T! M* S( C

#=================================================

============* M7 h8 H" b$ _5 @4 {4 d4 n7 r

global mom_pos_arc_plane

global mom_sys_cir_vector8 q. @7 l$ D( O. `2 h2 ~; z; D

global mom_sys_helix_pitch_type! u l, N$ a2 |: l

global mom_helix_pitch

global mom_prev_pos mom_pos_arc_center

global PI

9 g+ t3 K8 m. [* u9 ?# D7 g

switch $mom_pos_arc_plane {

XY { MOM_suppress once K ; set cir_index 2 }

YZ { MOM_suppress once I ; set cir_index 0 }

ZX { MOM_suppress once J ; set cir_index 1 }( A4 z! m/ B1 E. o

}+ _! {" H! }& S- y5 G- A/ X! P

switch $mom_sys_helix_pitch_type {& `7 J7 X8 a. P5 W% `

none { }

rise_revolution { set pitch $mom_helix_pitch }

rise_radian { set pitch [expr $mom_helix_pitch / ($PI * 2.0)]}

other {6 ^' v6 Z) |8 [/ t

#$ t( q0 l' l) _1 B- |7 I

# Place your custom helix pitch code here0 P/ ]' u7 s' q5 k3 t2 l

#/ m: J- e) ?: L0 n6 ]- ^

}

default { set mom_sys_helix_pitch_type "none" }

}; u4 L4 ?' B, D* A8 c$ W

MOM_force once X Y Z3 C1 D! a/ X0 b# p0 O! A6 u

if {$mom_sys_helix_pitch_type != "none"} {

MOM_force once I J K

if {$mom_sys_cir_vector == "Vector - Arc Center to Start"} {

set mom_prev_pos($cir_index) 0.0

set mom_pos_arc_center($cir_index) $pitch

} elseif {$mom_sys_cir_vector == "Vector - Arc Start to Center"} {, D4 n( t' }# F

set mom_prev_pos($cir_index) $pitch+ P; K d) r; E% |

set mom_pos_arc_center($cir_index) 0.0

} elseif {$mom_sys_cir_vector == "Unsigned Vector - Arc Center to Start"} {

set mom_prev_pos($cir_index) 0.0! I2 A& A$ ~$ P. h. u. T3 _. t

set mom_pos_arc_center($cir_index) $pitch. u# G( [2 n$ V: M

} elseif {$mom_sys_cir_vector == "Absolute Arc Center"} {

set mom_pos_arc_center($cir_index) $pitch

}4 I$ h- l7 g; V5 S

}( I1 k7 O4 v% J! ]" n* u% d

* X6 s n% M% O" |

## U* Q+ z" y. N/ c* w

# You may need to edit this line if you output more than one block- J+ I% n( |)

z

# or if you have changed the name of your circular_move block template

#

MOM_do_template circular_move

} ;# MOM_helix_move, U! p; o+ V" _, [

} ;# uplevel

VERICUT7.0怎么样删除和添加定义的用户目录* q) D8 a3 B9 c0 V( s$ E

% v- M: N( a' g: D2 C. s9 s

在平时使用当中,我们会设置很多用户路径,但有些仿真文件被移动后,该用户目录

就没有用处了,但还会在shortcut下拉列表框出现。我们可以通过编辑

cgtech_62_文件,来删除和添加定义的用户目录。

3 b0 d, O e- a: J) _ w+ U4 M

_62_文件一般在C:Documents and Settings×××目录下,xxx

是你的windows用户名。

9 |2 T. |0 P $ N+ O

2.打开cgtech_62_文件,找到以Recent Work开头的行,这些就是我们

设置的用户路径,你可以按照这种格式删除或添加用户路径。8 i! y- x/ i" J& c4 Q& q

1 o9 c$ f7 U' E0 J

3.还可以找到Toolpath Filters这一行,可以添加你想要的数控程序的后缀名。

4.用户还可以在这里编辑其它一些设置,但在设置前你最好知道这些设置是干什么用

的!!!

: X) B7 k5 J3 T3 I$ @

2024年3月24日发(作者:波静逸)

UG后处理刀补的正确输出方法

. w/ X; @- J4 f* ]; Q

前一段时间搞ug 刀补的多刀处理问题,蛮头疼的,看到一强人Yeager给了一个方法.

S" S% D$ y( R% : m

在Cutcom On里面增加一個Custom Command.,.填入"MOM_force once D",这个

方法可以解决D号的模态省略的问题

,即在分层刀路里第二层G41/G42后没有D号的问题. 佩服啊!

关于G40的处理:. T9 B5 3 r1 J( B! r2 t5 e# i% L

在Cutcom off项中删除G40 ,生成程序的效果如下: u9 o! m# F! y* E& a) j4 L

2 J" }: D2 `$ ~6 c; n

N40 G0 G90 X-58. Y30. M03 S2000$ u! C: @) ~4 X; _/ R D2 H. q

N50 G43 Z3. H01

N60 Z1.077/ U- D1 Q* G( p7 C4 Z, k7 g

N70 G1 Z-1.923 F250.; u0 [8 t1 p! U: _

N80 G41 X-55. D01& h8 Y; r `9 ( ~0 f

N90 G2 X-50. Y35. I5. J0.07 b9 P8 s) ^" D6 x4 i#

N100 G1 X50.8 P4 K: h6 ?# l( N; M" i

N110 G2 X55. Y30. I0.0 J-5.; b1 h" j6 B( h; d X

N120 G1 Y-30., O! y2 V% X6 }/ n" b

N130 G2 X50. Y-35. I-5. J0.0

N140 G40 G1 Y-37.54, r2 O5 C) U% M) C

N150 G0 Z1.077

N160 Y-38.0 _. O" A! h% |; l

N170 Z-.846/ j/ n" I8 X9 I

N180 G1 Z-3.8466 N7 M8 x- k' U L- U2 A U

N190 G42 Y-35. D01

N200 G3 X55. Y-30. I0.0 J5.! L: `1 O: }% W$ Y+ [4 D: F+ h

N210 G1 Y30.! @) v: r6 1 M

N220 G3 X50. Y35. I-5. J0.0

N230 G1 X-50.

N240 G3 X-55. Y30. I0.0 J-5. _; i, m3 G. i$ b# V. N r% [- W

N250 G40 G1 X-57.54

N260 G0 Z-.846

N270 X-58.

N280 Z-2.769

N290 G1 Z-5.769

N300 G41 X-55. D01

N310 G2 X-50. Y35. I5. J0.0$ J( c: J* q! Z

, b% S f! Q$ o

在fanuc 、mazak等机床上试验过,在fanuc系统上如果G41后没有D号,可以执

行前一个模态的有效的D号,在G40后如果没有撤销刀补的直线段,刀补撤销没有问题,

在G40这一句不产生移动,在下一句G1 x y 的语句执行

。如果将G41D1 单独列一行,可以对下一个坐标点进行补偿,但是补偿点的位置有

在mazak系统中:G41D1单独列一行的语句运行后,立即对前一个坐标点进行补偿,

G40也是如此,也就是说补的位置不是我们要补的位置。' ~; k. M$ n. a3 |: Q- q( e

所以我们为了程序的正确性,必须保证G41 D1 position7 H0 V- V1 R; N) U* I

,G40 position 的格式。

2 x, a& @; O! M8 n/ k% M

做好刀补的方法:

总结:1.在Cutcom On里面增加一個Custom Command.,.填入"MOM_force once

D",这个方法可以解决D号的模态省略的问题1 a2 a+ E/ v; o

2.删除Cutcom Off的G40。

3.在rapid move 里加入G40。% y6 Q% U$ f( R2 v# K- w6 n% A

4.加入G54

5.刀具信息:global mom_tool_name) l6 _# N3 v6 w2 r

MOM_output_literal "(TOOL NAME $mom_tool_name)"

1 x6 F/ k* D; ^4 @) Y1 ~$ Q4 f

6.加工时间:global mom_machine_time: @# Y+ u+ h- L9 @6 r4 `

, d7 v6 c2 ^) p+ H0 L" {)

MOM_output_literal "(MACHINE TIME [format "%.2f" $mom_machine_time]

MIN )"

7.在每个操作前加入行号及路径名$mom_path_name( J( R* P- i+ w: n

on$ t8 [, R# q& T% s. q7 M f, x- ?% j

路径名(operator message)' r5 J P0 g+ z* G8 Y, [4 U

off

8.在rapid move中,需对rap1,rap2,rap3及m13强制输出./ L* x+ |) T; e; i( _1

S+ K# p% A

$ z7 @. {$ f$ X9 |2 l

($mom_output_file_basename)(刀轨文件名)

$mom_path_name(操作名)' w R( 4 s2 j7 A" c4 E# E6 M* U

9."MOM_force once M03" 。

10. 要用M8-Coolant Flood

11.螺纹铣:init_helix

uplevel #0 {

#

# This procedure will be executed automatically at the start of program and

# anytime it is loaded as a slave post of a linked post.

#" ?& P% l% b+ d' U0 j! |

# This procedure can be used to enable your post to output helix. U, D& v$ e'

`2 a C

# You can choose from the following options to format the circle 1 g: c3 p4 J"

F7 S5 y3 @

# block template to output the helix parameters.% d& j2 |' p _8 Z( X" y) G

#

set mom_sys_helix_pitch_type "rise_radian" ; N0 p4 o* U/ P( I

#

# The default setting for mom_sys_helix_pitch_type is "rise_radian".

# This is the most common. Other choices are:1 L$ i0 u5 e. _) T: W/ c( e, j7 M

#

# "rise_radian" Measures the rise over one radian.

# "rise_revolution" Measures the rise over 360 degrees.% c% m8 n/

C0 j2 D; M

# "none" Will suppress the output of pitch.

# "other" Allows you to calculate the pitch; R9 I0 N$ C2 E) Z6

e. H1 q, x o

# using your own formula.

#

# This custom command uses the block template circular_move to output" j2 [;

u( A8 T: j& V/ ?

# the helix block. If your post uses a block template with a different4 t9 s% z.

o; ) o, z" K1 {. K

# name, you must edit the line that outputs the helix block. b* U. # ]0 |) J$ l

m9 P" @: F( t7 E, Z: ^

#

# The following variable deines the output mode for helical records.( p; c% d3

A6 i$ R

#, E6 R4 X7 T! P+ ^, w

# FULL_CIRCLE -- This mode will output a helix record for each 360

# degrees of the helix.5 |* }2 T& a/ I2 ]+ H

# QUADRANT -- This mode will output a helix record for each 90 7 o! I, {)

A& P1 `

# degrees of the helix.: M' h0 A" T8 y+ Z

# LINEAR -- This mode will output the entire helix as linear gotos.

# END_POINT -- This mode will assume the control can define an entire

# helix in a single block.

set mom_kin_helical_arc_output_mode FULL_CIRCLE& N! o# y5 n( N. e# p

MOM_reload_kinematics _9 A2 v# @1 b$ h. m8 K

7 I$ |/ c7 N+ T- M0 [ M

* K% X8 w+ a* M3 @. B" U

" b6 [& m0 U8 l1 b2 I6 B

#=================================================

============

proc MOM_helix_move { } {4 `& r! z$ T! M* S( C

#=================================================

============* M7 h8 H" b$ _5 @4 {4 d4 n7 r

global mom_pos_arc_plane

global mom_sys_cir_vector8 q. @7 l$ D( O. `2 h2 ~; z; D

global mom_sys_helix_pitch_type! u l, N$ a2 |: l

global mom_helix_pitch

global mom_prev_pos mom_pos_arc_center

global PI

9 g+ t3 K8 m. [* u9 ?# D7 g

switch $mom_pos_arc_plane {

XY { MOM_suppress once K ; set cir_index 2 }

YZ { MOM_suppress once I ; set cir_index 0 }

ZX { MOM_suppress once J ; set cir_index 1 }( A4 z! m/ B1 E. o

}+ _! {" H! }& S- y5 G- A/ X! P

switch $mom_sys_helix_pitch_type {& `7 J7 X8 a. P5 W% `

none { }

rise_revolution { set pitch $mom_helix_pitch }

rise_radian { set pitch [expr $mom_helix_pitch / ($PI * 2.0)]}

other {6 ^' v6 Z) |8 [/ t

#$ t( q0 l' l) _1 B- |7 I

# Place your custom helix pitch code here0 P/ ]' u7 s' q5 k3 t2 l

#/ m: J- e) ?: L0 n6 ]- ^

}

default { set mom_sys_helix_pitch_type "none" }

}; u4 L4 ?' B, D* A8 c$ W

MOM_force once X Y Z3 C1 D! a/ X0 b# p0 O! A6 u

if {$mom_sys_helix_pitch_type != "none"} {

MOM_force once I J K

if {$mom_sys_cir_vector == "Vector - Arc Center to Start"} {

set mom_prev_pos($cir_index) 0.0

set mom_pos_arc_center($cir_index) $pitch

} elseif {$mom_sys_cir_vector == "Vector - Arc Start to Center"} {, D4 n( t' }# F

set mom_prev_pos($cir_index) $pitch+ P; K d) r; E% |

set mom_pos_arc_center($cir_index) 0.0

} elseif {$mom_sys_cir_vector == "Unsigned Vector - Arc Center to Start"} {

set mom_prev_pos($cir_index) 0.0! I2 A& A$ ~$ P. h. u. T3 _. t

set mom_pos_arc_center($cir_index) $pitch. u# G( [2 n$ V: M

} elseif {$mom_sys_cir_vector == "Absolute Arc Center"} {

set mom_pos_arc_center($cir_index) $pitch

}4 I$ h- l7 g; V5 S

}( I1 k7 O4 v% J! ]" n* u% d

* X6 s n% M% O" |

## U* Q+ z" y. N/ c* w

# You may need to edit this line if you output more than one block- J+ I% n( |)

z

# or if you have changed the name of your circular_move block template

#

MOM_do_template circular_move

} ;# MOM_helix_move, U! p; o+ V" _, [

} ;# uplevel

VERICUT7.0怎么样删除和添加定义的用户目录* q) D8 a3 B9 c0 V( s$ E

% v- M: N( a' g: D2 C. s9 s

在平时使用当中,我们会设置很多用户路径,但有些仿真文件被移动后,该用户目录

就没有用处了,但还会在shortcut下拉列表框出现。我们可以通过编辑

cgtech_62_文件,来删除和添加定义的用户目录。

3 b0 d, O e- a: J) _ w+ U4 M

_62_文件一般在C:Documents and Settings×××目录下,xxx

是你的windows用户名。

9 |2 T. |0 P $ N+ O

2.打开cgtech_62_文件,找到以Recent Work开头的行,这些就是我们

设置的用户路径,你可以按照这种格式删除或添加用户路径。8 i! y- x/ i" J& c4 Q& q

1 o9 c$ f7 U' E0 J

3.还可以找到Toolpath Filters这一行,可以添加你想要的数控程序的后缀名。

4.用户还可以在这里编辑其它一些设置,但在设置前你最好知道这些设置是干什么用

的!!!

: X) B7 k5 J3 T3 I$ @

发布评论

评论列表 (0)

  1. 暂无评论