Community
Fusion Manufacture
Talk shop with the Fusion (formerly Fusion 360) Manufacture Community. Share tool strategies, tips, get advice and solve problems together with the best minds in the industry.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

G68.2 Post with Roll, Pitch, Yaw

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
amir.mettawa
1582 Views, 9 Replies

G68.2 Post with Roll, Pitch, Yaw

Looking for any generic post that uses G68.2 P1 (roll, pitch, yaw) instead of Euler. The default Fanuc post uses Euler and I would like to build my own. The machine is a 4+1 A/C (table-table) setup.

 

Thanks

9 REPLIES 9
Message 2 of 10
KrupalVala
in reply to: amir.mettawa

Hi @amir.mettawa,

 

The G68.2 P1  follows the Roll-Pitch-Yaw Euler Convention.

 

Open your post processor in editor or VS code and P1 in workplane definition as shown below,

writeBlock(gRotationModal.format(68.2), "P1 "+ "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0), "Z" + xyzFormat.format(0), "I" + abcFormat.format(abc.x), "J" + abcFormat.format(abc.y), "K" + abcFormat.format(abc.z)); // set frame

Now search for following variable and change it from this..

var euler = _section.workPlane.getEuler2(EULER_ZXZ_R);

to this

var euler = _section.workPlane.getEuler2(EULER_XYZ_R);

 

Save the post modification and test the code.

 

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
Message 3 of 10
amir.mettawa
in reply to: amir.mettawa

Thank you, that works. 

 

There are a few instances where the 68.2 outputs do not match what they need to be. Usually when there is a combination of A and C. 

 

For example, it should be:

G68.2 P1 X0. Y0. Z0. I-90. J0. K-180.
G53.1
 
However, it posts:
G68.2 P1 X0. Y0. Z0. I90. J0. K-180.
G53.1
 
I tried changing the preference to -1 (negative angles) but that didn't change anything.
var aAxis = createAxis({coordinate:0, table:true, axis:[1, 0, 0], range:[-120, 40], preference:-1});
 
I would like it to default to A movements in the (-) direction
 
In the case of just A axis commands, it posts this which is correct:
G68.2 P1 X0. Y0. Z0. I-90. J0. K0.
G53.1 

 

Message 4 of 10
amir.mettawa
in reply to: KrupalVala

Thank you, that works. 

 

There are a few instances where the 68.2 outputs do not match what they need to be. Usually when there is a combination of A and C. 

 

For example, it should be:

G68.2 P1 X0. Y0. Z0. I-90. J0. K-180.
G53.1
 
However, it posts:
G68.2 P1 X0. Y0. Z0. I90. J0. K-180.
G53.1
 
I tried changing the preference to -1 (negative angles) but that didn't change anything.
var aAxis = createAxis({coordinate:0, table:true, axis:[1, 0, 0], range:[-120, 40], preference:-1});
 
I would like it to default to A movements in the (-) direction
 
In the case of just A axis commands, it posts this which is correct:
G68.2 P1 X0. Y0. Z0. I-90. J0. K0.
G53.1 
Message 5 of 10
KrupalVala
in reply to: amir.mettawa

Hi @amir.mettawa ,

 

Could please test the code in your machine? We will get to know whether the axis of rotation is working as expected or not.

 

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
Message 6 of 10
amir.mettawa
in reply to: KrupalVala

Yes, I tested it with that code. 

 

This is what it needs to be:

G68.2 P1 X0. Y0. Z0. I-90. J0. K-180.
G53.1
 
However, this is what it posts:
G68.2 P1 X0. Y0. Z0. I90. J0. K-180.
G53.1
 
Thanks
Message 7 of 10
KrupalVala
in reply to: amir.mettawa

Hi @amir.mettawa ,

 

Could you please try using EULER_XYZ_S, The S stands for static which is roll, pitch, yaw.

 

Here is a picture that shows how G68.2 P1 rotates on a Fanuc control.

EULER_XYZ_S.png

You will notice that the rotations are preformed in the original coordinate system (pitch, roll, yaw) in contrast to the standard G68.2 command, which rotates around Z (original system), X'(X-axis after Z rotation), Z" (Z-axis after ZX rotations).The Q123 indicates the order in which the rotary axes are rotated.

 

Please make sure the order of rotations is correct.

For example, let's assume we have a C/A Head/Head 5-Axis machine. The secondary axis is also sometimes referred to as the 'Slave' axis in that its position is dependent upon where the C-Axis is currently located. For this configuration, we must define the order of axis rotation as Q312. The C-Axis is the primary axis and will rotate first, The A-Axis is secondary and will rotate second.

KrupalVala_1-1646630101924.png

Thanks,

 



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
Message 8 of 10
ifuASTJY
in reply to: KrupalVala

Hello,

I am trying to setup a swivel head B axis,

Why is there no positions for XYZ? I would like to aproach the part as it tilts the work plane.

 

For example:

G68.2 P1 X0. Y0. Z0. I-90. J0. K-180.
G53.1
 
 
Thanks
Message 9 of 10
KrupalVala
in reply to: ifuASTJY

Hi @ifuASTJY ,

 

You can change this behavior and output the origin values in the G68.2 block by making the following changes to the post.  Add the mapWorkOrigin = false; as shown below,

allowHelicalMoves = true;
allowedCircularPlanes = undefined; // allow any circular motion
highFeedrate = (unit == IN) ? 500 : 5000;
mapWorkOrigin = false;

Now make the following change in the setWorkPlane function.

writeBlock(gFormat.format(68.2), "X" + xyzFormat.format(currentSection.workOrigin.x), "Y" + xyzFormat.format(currentSection.workOrigin.y), "Z" + xyzFormat.format(currentSection.workOrigin.z), "I" + abcFormat.format(abc.x), "J" + abcFormat.format(abc.y), "K" + abcFormat.format(abc.z)); // set frame

You will notice that the output coordinates are changed(local workplane) to match the new origin.

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
Message 10 of 10
zns1258866193
in reply to: KrupalVala

This is very useful, when I added this, G68.2 outputs the correct XYZ values instead of always X0.Y0.Z0., thanks a lot!

mapWorkOrigin = false;

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report