Hello, I need to know the distance in Z from Machine zero to zero piece after a table rotation is performed.
I know how to get the distance from machine zero to zero piece at the begining of the program with setOffsetSysVar, but after moving (for example) the table, the distance between the zero piece and zero Machine is not the same. How can I kown the new distance?
Thanks for your quick answer.
Not exactly, I didn't explained it very well.
I need to know what is the distance (in Z or other joints), if all transformations were deactivated.
During the simulation some transformations causing "Displace origin", I need to know the distance between the zero piece and zero machine like if all transformations causing displace origin were deactivated.
I will try to explain a little bit better my problem, perhaps as you said, there is another approach.
I have two axes, Z and W, Z axis is under W, so when I move W, Z axis is moved too.
I need to freeze Z axis in Z=0 and move W so the tip of Z axis moves to coordinates piece.
For example if I programed "L W0 FMAX" the W axis must move a a distance that makes the tip of Z axis goes to Z=0 coordinates piece. That's why I need to know what is the distance Z axis would move and move the W axis instead.
AAHHH now I understand. Maybe we should talk the next time the other way around ;-)
Look at the sim17 OOTB sample. There is a sample for W-Axis compensation. It is for Sinumerik but can easily adapted for each controller.
In your case I could imagine that you introduce a transformation for the W axis compensation which is written with the calulcated values of W and Z when local offset (CYCL DEF 7 or 247) is active. The axis values can be retrieved by getJointValue("AXISNAME", "machine") in machine coordinates should be enough. You only need the delta between both axes.