Cancel
Showing results for 
Search instead for 
Did you mean: 

Linear move, turn or face?

Good day,

I ask for your support, I am doing a postprocessor for a lathe with dynapath control

I need to make a difference when it is a movement cutting "x" and a cut in "z".

With which variable in the post builder can do these differences

thanks

4 REPLIES

Re: Linear move, turn or face?

Gears Phenom Gears Phenom
Gears Phenom

An easy way to see the active variables is to use the review tool.

 

 

John Joyce, Manufacturing Engineer,
Senior Aerospace Connecticut
www.senioraeroct.com
Production: NX11.0.2.7, Vericut 8.0.3
Development: Tcl/Tk
Testing NX12.0

Re: Linear move, turn or face?

How can I do that?

I want to know how to divide the linear cutting motion in axial or radial, for example

(1) Z1.9, "cutting Movement z"
(2) x9.82, "cutting Movement x"
(3) -1.82 z d9.96 "Movement in both xz"
(0) z4.0 "quick motion"

 

I want to prefix the numbers (1),(2),(3),(0) for each type of movement,

thanks

Re: Linear move, turn or face?

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

You can use mom_pos() array (position tool is moving to in this motion) and mom_prev_pos() array (position it is moving from) to do this.  Note there is also a mom_last_pos() array, not sure the difference from mom_prev_pos (other than last_pos doesn't include the rotary axis info, which I'm guessing isn't important for you)

Code something like:

global mom_pos
global mom_prev_pos

set moving_x 0
set moving_z 0
if {![EQ_is_equal $mom_pos(0) $mom_prev_pos(0)]} {
    set moving_x 1
}
if {![EQ_is_equal $mom_pos(2) $mom_prev_pos(2)]} {
    set moving_z 1
}
# logic based on moving_* variables here

 

 

Note if drill cycles are involved it gets more complicated (mom_pos & mom_prev_pos are actually the point on the top surface of the part for the current & previous hole)

 

Ken

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: Linear move, turn or face?

I am beginner in programming post, I put this code in a custom command and then how I print to the code post?

thanks a lot

Learn online





Solution Information