Hello everyone,
I have a problem with G68.2 in my post processor. The code which is generate by G68.2 is different then axis rotation. For example i get something like that:
G0 A-35.132 C90.
G68.2 P1 X0. Y0. Z0. I-90. J35.132 K180.
I achived rotation in A=-90, B=35.132 and C=180 and i do not know how to fix that. Do you guys have an idea?
Solved! Go to Solution.
Solved by andrea.amilo. Go to Solution.
Hi @wrobel094 ,
I think the issue could be related to the order of rotation configured in your postprocessor vs the one expected from your controller.
Maybe you could try to configure your postprocessor to use XYZ static rotation order, written as G68.2P1Q123 in Mazak language.
If so, you can add Q123 argument at line 593 :
writeBlock(gRotationModal.format(68.2), "P1 Q123", "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
and, as a consequence, you could modify EULER order of rotation at line 860 :
var euler = currentSection.workPlane.getEuler2(EULER_XYZ_S);
Please test it carefully and let me know.
Thank you for respond Andrea. Now I'm getting something like that:
N40 G0 A-35.132 C90.
N45 G68.2 P1 Q123 X0. Y0. Z0. I180. J35.132 K-90.
After changes u suggested the rotation values are still generated in wrong places.
Hi @wrobel094 ,
have you modified also the EULER order of rotation at line 860 ?
Now everything works perfectly. I forgot to change EULER_XYX to EULER_XYZ. Anyway thank you so much Andrea for help!
Hello! I have one more question. Well everything works fine when i have simply axes rotation like:
N45 G0 A-90. C180.
N50 G68.2 P1 Q123 X0. Y0. Z0. I-90. J0. K180.
But when I want to rotate part in more specific way I get this:
N64395 G0 A-5.469 C-164.648
N64400 G68.2 P1 Q123 X0. Y0. Z0. I5.276 J1.44 K0.133
In my opinion code G68.2 generate incorrect values in this case. Can we fix it?
And i have another example when i want to rotate part by 5 degree:
N40 G0 A5. C0.
N45 G68.2 P1 Q123 X0. Y0. Z0. I5. J0.011 K-0.126
Hi again. I think I solved the problem. I make some changes in this section:
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
To this:
writeBlock(gRotationModal.format(68.2), "P1 Q123", "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0), "Z" + xyzFormat.format(0), "I" + abcFormat.format(angles.x), "J" + abcFormat.format(angles.y), "K" + abcFormat.format(angles.z)); // set frame
Now everytime I get exactly what I want. Will everything be alright if I kept this in that way?
Hi @wrobel094 ,
first of all I am happy that everything seems to work fine.
Changes you made are to write machine angles instead euler angles.
As usual, test it carefully.
@wrobel094 have you tested this on your machine with success? Looking to do the similar post mods for our VC-500.
Thank you.
Can't find what you're looking for? Ask the community or share your knowledge.