Z offset reset on run

More
03 Jul 2024 03:25 - 03 Jul 2024 03:29 #304291 by peterdownunder
Am having a problem, probably user error but unsure where to look.

We have a touchplate on that we normally use with M6 tool change. This assumes that the work origin is at the waste board, and this appears to work Ok.

I regularly do engraving, and it is easier to touch off to the top of the work manually.
The design is in Fusion360 and the post processor is LunuxCNC one unmodified.
To do this I just run the post and edit the file to remove the M6 line.
I then jog over the work bring the tool down to touch the work and click on the Z (gmoccapy) and select 0 offset ok.

Everything looks Ok. I know the clearance height is 15mm. If I single step, which I always do because of this problem, then it appears to reset the Z to an apparent random number after the spindle start and when it positions  over the the work i.e. when it positions over the start  of the plunge i.e. N55 below

%
(THIRD4MM)
(T1 D=4. CR=0. - ZMIN=-3. - FLAT END MILL)
N10 G90 G94 G17 G91.1
N15 G21
(WHEN USING FUSION FOR PERSONAL USE, THE FEEDRATE OF RAPID)
(MOVES IS REDUCED TO MATCH THE FEEDRATE OF CUTTING MOVES,)
(WHICH CAN INCREASE MACHINING TIME. UNRESTRICTED RAPID MOVES)
(ARE AVAILABLE WITH A FUSION SUBSCRIPTION.)
N20 G53 G0 Z0.
(THIRD4MM)
N30 S12000 M3
N35 G17 G90 G94
N40 G54
N45 G64 P0.1 Q0.1
N50 M8
N55 G0 X208.659 Y25.039

If I go back and re-zero the Z then it works every time. Sometimes the Z changes to a "rational" number like 55mm (total Z travel is 190mm).
Other times it is over 600. This only happens occasionally, but always works the second time.

This is a shared machine in a makerspace, but this is happening from a clean start, so unsure if it is related to any previous job.
Have not seen any issues when using the M6 macro.

Linuxcnc version 2.8.2
Gmoccapy 3.1.3.8

Attached is the ini file  

File Attachment:

File Name: mechmate.ini
File Size:6 KB


 
Attachments:
Last edit: 03 Jul 2024 03:29 by peterdownunder. Reason: fix typo

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

More
03 Jul 2024 06:07 #304299 by Aciera
Replied by Aciera on topic Z offset reset on run

N40 G54


Are you sure you are also zeroing the Z offset in G54?

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

More
03 Jul 2024 07:21 #304305 by peterdownunder
That would be embarrassing, but an easy fix, and the sequence of events would match that.

I actually assumed that linuxcnc defaults to that on startup.

My mini mill at home appears to. Is that specifically set in linuxcnc?

Will have to wait till tomorrow to give it a try


Will do a clean startup and see what appears in the modal window

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

More
03 Jul 2024 07:25 #304307 by peterdownunder
Actually just found it in the docs var 5220

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

More
03 Jul 2024 07:35 - 03 Jul 2024 07:35 #304308 by Aciera
Replied by Aciera on topic Z offset reset on run
If you want it to startup in G54 then change this line in your ini:

RS274NGC_STARTUP_CODE = G64 P0.05

to

RS274NGC_STARTUP_CODE = G54 G64 P0.05


You may also want to set other things here
RS274NGC_STARTUP_CODE = G17 G21 G40 G49 G54 G64 P0.05 G80 G90 G94 G97 G98
Last edit: 03 Jul 2024 07:35 by Aciera.
The following user(s) said Thank You: peterdownunder

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

More
08 Jul 2024 01:00 - 08 Jul 2024 01:46 #304618 by peterdownunder
Ok adding G54 to RS274NGC_STARTUP_CODE did not appear to fix it.

I *think* running G54 before I do the Z touch off did fix it. I need to do some more testing.

Note that even before adding it to RS274NGC_STARTUP_CODE the g-code window in gmoccapy shows g54
Last edit: 08 Jul 2024 01:46 by peterdownunder.

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

More
30 Jul 2024 08:00 #306383 by peterdownunder
This wens away and then started coming back again, and I think I have found what is causing my error, apart from me:)

In my original post I stopped the g-code at the G0 X208.659 Y25.039 line but it is the line after the is causing the problem. That is a G43 and the H value points to a valid tool but not the one I am using. It is loading the offset for whatever that tool last touched off to.
Even if it was right tool it would be whatever the last tool touch off measurement that was stored in the tool table.

Unsure why running the job again fixes it, but pretty sure that is the problem.

Sorry for screwing you around, but thatnks for the halp.

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

Moderators: newbynobiHansU
Time to create page: 0.186 seconds
Powered by Kunena Forum