Shown AXIS TLO Z Offset not stored in #5403 ?
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23288
- Thank you received: 4936
04 Sep 2015 16:32 - 04 Sep 2015 16:33 #62113
by andypugh
Replied by andypugh on topic Shown AXIS TLO Z Offset not stored in #5403 ?
One thing to note, putting G43 on the same line as G10 won't have the effect you expect, the G43 is interpreted first.
The G43 needs to be on the next line after the G10.
You might be able to get Z-length from a custom M-code.
M101
See www.linuxcnc.org/docs/html/common/python...xcnc_stat_attributes for more details.
This is only part of the puzzle, though. That code has found the Z offset, but we need to get the value back to G-code or it is no good to you.
Without a computer to experiment with (I am at work now) I can only offer hints.
it _might_ be as easy as
But I am still at the stage of trying things, looking at error messages and trying other things with Python and linuxCNC.
There are clues here:
linuxcnc.org/docs/html/remap/structure.h...d_named_parameters_a
and looking in existing code:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...cf39b7b1cc76e71d#l45
The G43 needs to be on the next line after the G10.
You might be able to get Z-length from a custom M-code.
M101
#!/usr/bin/python
import linuxcnc
s = linuxcnc.stat()
zlen = s.tool_offset(3)
See www.linuxcnc.org/docs/html/common/python...xcnc_stat_attributes for more details.
This is only part of the puzzle, though. That code has found the Z offset, but we need to get the value back to G-code or it is no good to you.
Without a computer to experiment with (I am at work now) I can only offer hints.
it _might_ be as easy as
#!/usr/bin/python
import linuxcnc
zlen = s.tool_offset(3)
s = linuxcnc.stat()
zlen = s.tool_offset(3)
def _zlen(self):
return zlen
But I am still at the stage of trying things, looking at error messages and trying other things with Python and linuxCNC.
There are clues here:
linuxcnc.org/docs/html/remap/structure.h...d_named_parameters_a
and looking in existing code:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...cf39b7b1cc76e71d#l45
Last edit: 04 Sep 2015 16:33 by andypugh.
Please Log in or Create an account to join the conversation.
Time to create page: 0.052 seconds