Showing results for 
Search instead for 
Do you mean 
Reply

4th axle auto clamp

Is there a way to make post processor clamp 4th axle automatically when needed? I have made a new post processor and it clamps A axle sometimes but not every time. For example Face_milling clapms the axle but Floor_wall won’t. I’m using NX 10.0.2 post builder.

10 REPLIES

Re: 4th axle auto clamp

how you did it? Can you share?
BR
Mak
TC10/NX 9

Re: 4th axle auto clamp

I do this in the post, but there is a UDE you can start with.

 

Try adding a "Clamp" UDE with the axis set to "Auto", and see what happens.

 

If you don't want to use the UDE, you can examine what the UDE does and just add the code to your post.

 

If you look in the post's tcl file, look at the "proc"s AUTO_CLAMP, AUTO_CLAMP_1 and (for 5 axis) AUTO_CLAMP_2

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


Re: 4th axle auto clamp

Here is my current version of post processor. It now opens and locks 4th axle every single time when tool or A axle position changes. I'm planning to tell nx to open clamp when there is 4axis cutting coming.

 

Ken_A:

I don’t quite understand what do you mean with “Try adding a “clamp” UDE..”

Do you refer to Program -> Tool Path -> Machine Control -> Clamp? And is that somehow meant to add to Operation Start Sequence?

Re: 4th axle auto clamp

I quickly looked at what you have. You are unclamping, moving A and clamping in initial_move but any other move would not have this feature. Initial move is the first one for the tool. The rotary may move on other moves. You could first check that the rotary is moving - set a flag - and issue the unclamp/clamp before and after the move. You will need to do this anywhere you have A axis output (initial move, rapid, linear, cycles.) I prefer to create a block template (get_fourth in example) with the rotary (A only) in it. Then issue the command:

 

set tmp [MOM_do_template get_fourth CREATE]

 

And check if the rotary was issued.

 

global myflag

set myflag 0

if {$tmp != ""} {

  MOM_force fourth_axis ;# so that it will modally come out in next block

  set myflag 1

}

 

Then use myflag to set a conditional output of the unclamp/clamp blocks. I did not test the code above - but it demonstrates the idea.

NX10.03
Windows 7 Pro

Re: 4th axle auto clamp

Thanks for the answer but I don’t quite get it yet. I understand that I need to check if A axis is going to move and change myflag value depending on that. Is that done with this code?:
global myflag
set myflag 0
if {$tmp != ""} {
MOM_force fourth_axis ;# so that it will modally come out in next block
set myflag 1
}

Also I don’t know where I need to put that code and where to check myflag value to clamp/unclamp.
This is what I think that I need to do.
First I made get_fourth block template (pic) with the rotary in it.

 

1.PNG

 

Then I think that I need to make custom command (pic). clamp_test custom command contains the code you posted. I also added something that I think is needed for clamp/unclamp.

 

2.PNG

 

I added that clamp_test custom command to linead, circular and rapid move blocks

 

3.PNG


Did I understand anything right? That code does not work but am I heading to right direction? I also added post processor files.

Re: 4th axle auto clamp

The clamp UDE is added to the operation (not in the post):

clamp.png

 

In the post's .tcl file, the UDE handler will be "proc MOM_clamp"

If you understand how that works, you can use the "built in" auto clamp behavior by setting the appropriate variables correctly, and calling the AUTO_CLAMP... procs when you need.

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


Re: 4th axle auto clamp

The rapid event shows my approach - but I would recommend considering Ken's built in one. It tend to code things that already exist.

NX10.03
Windows 7 Pro

Re: 4th axle auto clamp

I forgot to add the variable for the check blok code:

# This custom command should return
#   1 : Output BLOCK
#   0 : No output

   global mom_logname

global my_fourth_clamp_state

set tmp [MOM_do_template get_fourth CREATE]

set my_fourth_clamp_state 10
if {$tmp != ""} {
  MOM_force fourth_axis ;# so that it will modally come out in next block
  set my_fourth_clamp_state 11
  return 1
} else {
  return 0
}

 

NX10.03
Windows 7 Pro

Re: 4th axle auto clamp

Thanks for replies! I don’t quite understand your method but I somehow managed to get clamping to work. I think that I used what Ken_A advised to do. Now I just need to make sure that it works all the time and everywhere. I have to keep working with post processor code so I understand it better but thanks for the help!

Learn online





Solution Information