Python interface coordinates?

More
09 Jan 2015 00:42 #54792 by eslavko
Hello...

Is there a way to read current coordinates (XYZ) within python interface but to include all offsets so the number retrived should be same as in axis DRO.
For now I'm able just to get real coordinates.

Thanks.

p.s.
reading linuxcnc.org/docs/html/common/python-interface.html doesn't show trick for me... :(

Please Log in or Create an account to join the conversation.

More
09 Jan 2015 04:55 #54804 by newbynobi
Just take a look at the code of my combiDRO.py, is is located at:

Linuxcnc-dev/lib/python/gladevcp/

It is doing whaf you want.

Norbert

Please Log in or Create an account to join the conversation.

More
09 Jan 2015 05:08 #54806 by eslavko

Just take a look at the code of my combiDRO.py, is is located at:

Linuxcnc-dev/lib/python/gladevcp/

It is doing whaf you want.

Norbert


Seems that this is the answer.
rel_pos = p[self.joint_number] - self.status.g5x_offset[self.joint_number] - self.status.tool_offset[self.joint_number]

I already find that I need to subtract g5x_offset but miss the tool_offset.

Thanks for help.

Please Log in or Create an account to join the conversation.

More
09 Jan 2015 18:59 #54816 by andypugh

I already find that I need to subtract g5x_offset but miss the tool_offset..


Don't forget G92...
The following user(s) said Thank You: eslavko

Please Log in or Create an account to join the conversation.

Time to create page: 0.116 seconds
Powered by Kunena Forum