Cancel
Showing results for 
Search instead for 
Did you mean: 

[Post Builder] rotate drill code

Solution Partner Innovator Solution Partner Innovator
Solution Partner Innovator

Hi

 

There is a question in Post Builder. The machine type is Horizontal Table-Table BC.

 

C value is not output to normal value in drilling process where C axis and B axis are rotated.

 

 

44.jpg

 

 

I have referenced and modified sim08_mill_5ax.

The value of the rotary axis differs only in the drilling process.

Please give a lot of advice.

 

 

10 REPLIES

Re: [Post Builder] rotate drill code

Gears Phenom Gears Phenom
Gears Phenom

Hi,

show pictures of your rotary axis definitons in Postbuilder.

(plane of rotations and ranges)

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: [Post Builder] rotate drill code

Solution Partner Innovator Solution Partner Innovator
Solution Partner Innovator

Hi~

 

It is as follows.

 

111.jpg

Re: [Post Builder] rotate drill code

Gears Phenom Gears Phenom
Gears Phenom

to your first picture:

-do you use main and local mcs?

-G00 B C - do you have  mom_out_angle_pos in B and C?

Because it looks like BC respects the rotation of mcs

mom_out_angle_pos should respect angles to local mcs.

 

I am not sure but in some output you should have csys rotation and translation.

And we see some *additional rotation of operation tool axis vector (represented by mom_out_angle_pos).

Be carefull how machine control works.

 

I am not familiar with using main + local mcs.

Or you can only translate local mcs to main and then output BC angles of tool axis to local mcs (mom_out_angle_pos)

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: [Post Builder] rotate drill code

Phenom
Phenom
With main mcs and a local special csys type child mcs - NX puts out the coordinates relative to the local and then the post gets some extra variables - mom_init_pos or something (from memory.) There are OTB example posts that use it. With the special csys type the intention is that the coordinate system on the machine will be appropriately moved to match that csys. With each kinematic and control that may mean some different calculations. Fanuc it is probably G68.2 with G43. Siemens it is probably CYCLE800() but it could be a chain of ROTs and TRANSs. With "Swiveling" you usually don't even have to issue the rotary angles which is nice (easy) in the postprocessor. Now - the drawback of manually setting the csys is that with the OTB implementations I have used - you would need one at every hole or orientation in my perception of what you are trying to do. Generally the different origin location won't allow a rotary to move and consider that to be the same. Both the control and NX wouldn't work that way. The only option for a more automatic approach (I am aware of) is to take control of your mom_pos positions and do the math (not let NX kinematics determine it.) Control people tell us that origins should be moved to somewhere close by where you are working - and to not have transformations (rotations just to enable tool axis along Z) determining position far from an origin - instead trans close by in original frame rotation and then rotate to get your Z along tool. This seems to be what you are after.
NX12.02
Windows 10 Pro

Re: [Post Builder] rotate drill code

Solution Partner Innovator Solution Partner Innovator
Solution Partner Innovator

Hi~

 

The currently set environment is as follows.

 

SETUP1.jpg

 

When one drilling process is created, it is output as the correct value.

 

OP1.jpg

 

 

However, many drills are difficult to create TRANS LOCAL coordinates.

 

So I want to process multiple holes in one TRANS value coordinate.

 

OP2.jpg

 

The XYZBC coordinates do not match.

 

Is it possible to output a process that can process several holes in one operation?

 

If there is any way, please help me.

Re: [Post Builder] rotate drill code

Gears Phenom Gears Phenom
Gears Phenom

I think it is as I told you.

 

First rotation you get is rotation of main mcs to local mcs - B90 C13.33

Computed by trigonometry from csys matrix. (look at set_csys custom command)

I see correct angles.

 

Rotations you have with hole coordinates are angles of tool axis vector to your local mcs only. (mom_out_angle_pos  - look at fourth and fifth axis addresses.)

B13.33 C90, B26, B40, B46.., B66..  angles are correct too.

 

It depends how control works - I think it wont accept B..C.. angles as additional angles after first rotation/ csys rotation.

(I am sorry if I am wrong with this, but angles looks like that.)

(You can share your part+postprocessor if you want and we will see )

 

I am not familiar with your setup I see on your picture - main mcs, local mcs and variable axis type path in use.

 

1.Solution - use only one mcs in the middle of the part.

2.Or worse one  - use local mcs in every hole position with Z pointing up from the hole.

Create operation for each hole with Zm+ tool axis.

It means multiple mcs and multiple operaions - mcs + operation for each hole. :/

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: [Post Builder] rotate drill code

Solution Partner Innovator Solution Partner Innovator
Solution Partner Innovator

Hi Juraj.

Thanks for the advice.

 

I want to output the values of mom_pos and mom_out_angle_pos based on CSYS LOCAL coordinates, not MCS coordinates.

 


As mentioned above, only the rotation value which is transformed to the initial CSYS LOCAL is outputted, and then the coordinate value is outputted based on the MCS. That is, it should be outputted as C13.33, C26, C40, C46 .., C66 .. instead of B13.33 C90, B26, B40, B46 .., B66 ..

 

Re: [Post Builder] rotate drill code

Gears Phenom Gears Phenom
Gears Phenom

(MCS -  I mean coordinate system.)

 

That is, it should be outputted as C13.33, C26, C40, C46 .., C66 .. instead of B13.33 C90, B26, B40, B46 .., B66 ..

- you cant get C, look at your local mcs, where is pointing Z. Moving to second hole needs only tilting in B.

 

Try to translate local mcs from main mcs, not rotate.

Then should be C rotation outputed.

 

And again I really dont know if code will work, because for translating and rotating you need some transfomation functions, tcpm, csys rotation.

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: [Post Builder] rotate drill code

Phenom
Phenom
The MCS local csys special type sends the post mom_pos positions related to the local mcs orientation. The rotary positions are output relative to the main mcs above (actually NX sets mom_init_pos rotary locations and they are probably loaded into mom_out_angle_pos in the post code.) This is what NX does out of the box. Of course in the post you can do whatever you want to. The scheme you are after would be achieved by ignoring what NX sends for mom_pos and recalculating them in the post. It is up to you to code - but there are some examples that may help in the latest OTB PB posts (sim15.) You will have to recalculate mom_pos in PB_CMD_before_motion routine before the positions are output to G code.
NX12.02
Windows 10 Pro

Learn online





Solution Information