Patch for Combination M61 + G4 #2489

More
05 Jan 2024 05:06 #289830 by zz912
Hello,

again I will try to make a patch for github.com/LinuxCNC/linuxcnc/issues/2489

I don't want to make another mess on github so I opened a thread here.

I would like to ask if someone would show me how the STOP button control works. The button is circled in red in the following image.
 

I realized that all I need to solve the "M61 + G4" bug is to run AUTOMATIC G43 LINES when this STOP button is deactivated.
 
Attachments:

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

More
05 Jan 2024 20:59 #289902 by zz912
The following user(s) said Thank You: tommylight

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

More
06 Jan 2024 06:55 #289929 by cmorley
pressing stop is calling abort. You can set up an on_abort_command script to call gcode.
Would this help you?
linuxcnc.org/docs/stable/html/config/ini...sub:ini:sec:rs274ngc
(right at the end)
The following user(s) said Thank You: zz912

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

More
06 Jan 2024 08:01 #289933 by zz912
I made patch. It is working version. I worked on it to 3:00. I will rewrite it and show it. I will tested it.

I have already written many times that I solved it and in the end it didn't work. So maybe it will work out now. Thanks Chriss for the discussion with me.

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

More
07 Jan 2024 07:49 - 07 Jan 2024 07:51 #290059 by zz912
Hello,

I'm currently trying to understand what this piece of code is for:
    def _update_toolinfo(self, tool):

............................

        if self.load_tool:
            self.load_tool = False
            self.on_hal_status_interp_idle(None)
            return
............................
github.com/LinuxCNC/linuxcnc/blob/a49f53...ccapy.py#L3531-L3534

I don't like that the on_hal_status_interp_idle function is called when the LCNC is definitely not in IDLE. It may not cause any error now, but it is dangerous if someone then adds something to the on_hal_status_interp_idle function that must be implemented in IDLE. I would like to make a suggestion to fix this, but I need to know why the on_hal_status_interp_idle function is called.

Do you think this could be considered a mistake?
Last edit: 07 Jan 2024 07:51 by zz912.

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

More
07 Jan 2024 08:37 #290064 by cmorley
is _update_toolinfo() only called when linuxcnc is idle?
Hard to see whats going on here without digging in the code - comments in the code would help.
The following user(s) said Thank You: zz912

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

More
07 Jan 2024 09:40 #290070 by zz912

is _update_toolinfo() only called when linuxcnc is idle?
 


No.

_update_toolinfo() is called here:
github.com/LinuxCNC/linuxcnc/blob/a49f53...py/gmoccapy.py#L2635

on_hal_status_tool_in_spindle_changed() can be called at any time. This function is called especially when the LCNC is not IDLE.
 

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

More
08 Jan 2024 21:14 #290238 by zz912
Hello,

I made:
github.com/LinuxCNC/linuxcnc/pull/2841
I would like to ask you to test this patch to see if it created any more bugs.

Zdeněk

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

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