G10 L20 does not work as expected, applies offset like G10 L2

16 Sep 2022 11:35 #252071 by mh300
Hello LinuxCNC community, 

I am currently trying to use LinuxCNC as a kind of DRO replacement (I will add CNC control capability later). For this, I am trying to replicate the classic DRO functionality, where you enter a value and then set it to an axis - and the axis display then shows the entered value.

Starting point:
- Probe_basic starts with the following startup codes:
F10 S300 G21 G17 G40 G49 G54 G64 P0.001 G80 G90 G91.1 G92.1 G94 G97 G98
- I power on the machine and home all the axis
- The offset table is G54 X0 Y0 Z0
- I move the axis to for example -15.348
- The G54 and Machine DRO both read -15.348

Then I go to MDI mode and enter the following Line
G10 L20 P1 X5
In response, the G54 DRO displays -10.348, and the machine DRO is still -15.348. The offset table now shows G54 X-5.0.
But I would have expected the G54 DRO to display "5.0" and the offset table to now contain "X-20.348" (calculated from the current axis position). 

Have I understood the G10 L20 wrong? Or is there some prerequisite required that I am missing?

Further Information: Running on Debian Buster 11, LinuxCNC2.9.0~pre and ProbeBasic compiled from the python3 branch of the GitHub repository.

Best regards,

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

20 Sep 2022 14:36 #252405 by Todd Zuercher
I don't use ProbeBasic, but that's not the behavior I see. If I do the above. I see the expected behavior where the G54 X offset becomes -20.348. Perhaps it is a quirk of ProbeBasic where the offset or position isn't being displayed as or where you'd expect or is it possible you miss typed your MDI command and typed L2 instead of L20?

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

22 Sep 2022 15:25 #252573 by Lcvette
i will take a look, but for simplicity sake, you can simply click in the DRO and enter the desired position and it will set the current offset accordingly.

for example if you come down in Z- and touch off the top of a part using a 1.000" gage block, you can click in the DRO and enter 1.000 and "enter" and it will set the work offset for the z axis. may be easier? you can also hit the zero z button if you want to zero that axis in its current position.

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

Moderators: KCJLcvette
Time to create page: 0.103 seconds
Powered by Kunena Forum