Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gmoccapy - Combination M61 + G4 #2489

Open
zz912 opened this issue May 11, 2023 · 7 comments
Open

Gmoccapy - Combination M61 + G4 #2489

zz912 opened this issue May 11, 2023 · 7 comments

Comments

@zz912
Copy link
Contributor

zz912 commented May 11, 2023

I use RIP instalation Branche 2.9, sim gmoccapy

If I enter a combination of M61 and G4 commands in the command line, sometimes the G4 command is executed, sometimes not.

Watch the video:

MDI_command_ignore_G4.mp4
@zz912
Copy link
Contributor Author

zz912 commented May 12, 2023

  1. If you cannot view the video, please download it and play it in VLC player. On some PCs the video plays, on some PCs the video says that it is broken.

  2. I think this bug is the cause of these bugs:
    Gmoccapy MSG: Must be in MDI mode..... #2453
    Gmoccapy - Remap - random bug #2448
    I tried to look for the cause of these bugs and found that the execution of MDI_COMMANDS is random. Maybe this bug isn't the cause, but I can't look any further.

  3. I managed to simulate the bug:

  • on a physical PC, RIP installation, branche 2.9
  • on Oracle VM VirtualBox, RIP installation, branche 2.9 (reduce CPU is irrelevant)
  • on Oracle VM VirtualBox, Debian installation, branche 2.8.4 (CPU reduction is irrelevant)
  1. I have a problem that HansU wants to help me solve the previous bug, but he can't simulate it. Therefore, I would like to ask for feedback if this error also appears.

@zz912
Copy link
Contributor Author

zz912 commented May 14, 2023

I made tests of this bug:
2.8.0-pre3, GUI AXIS, BUG - NO
2.8.0-pre3, GUI GMOCCAPY, BUG - YES
2.8.0-pre3, GUI GSCREEN, BUG - NO
2.8.0-pre3, GUI SILVERDRAGON, BUG - NO

2.7.15, GUI AXIS, BUG - NO
2.7.15, GUI GMOCCAPY, BUG - NO

I couldn't plot 2.8.0-pre0 and 2.8.0-pre1 so I couldn't test them.

@zz912 zz912 changed the title Combination M61 + G4 Gmoccapy - Combination M61 + G4 Jul 16, 2023
@zz912
Copy link
Contributor Author

zz912 commented Jul 16, 2023

The cause of this problem is in these lines:

if "G43" in self.active_gcodes and self.stat.task_mode != linuxcnc.MODE_AUTO:
self.command.mode(linuxcnc.MODE_MDI)
self.command.wait_complete()
self.command.mdi("G43")
self.command.wait_complete()

As these lines cause more problem, I made a HAL pin which disable these lines.
#2571

Here is the test result:
MDI_commands

When I change tools Q1 to Q5, the lines are activated. This is the default behavior of Gmoccapy. Note that LCNC ignores G4 P10.

When I change tools Q6 to Q10, the lines are disabled by my HAL pin. LCNC is working properly.

@gmoccapy
Copy link
Collaborator

I will be on this point in early September and double check all code and hope to find a solution for all the issues you mentioned.

Could you please do a test for me?
Disable the lines in "tool in spindle changed" and then set the retain G43 parameter in the INI.
Have the bug gone away?

Thanks for you help

@zz912
Copy link
Contributor Author

zz912 commented Jul 28, 2023

I will do the test and then I will give you feedback.

@gmoccapy
Copy link
Collaborator

Thank you

@zz912
Copy link
Contributor Author

zz912 commented Jul 31, 2023

I tried to do that test, but I couldn't get RETAIN_G43 to work:
https://forum.linuxcnc.org/38-general-linuxcnc-questions/49657-retain-g43

zz912 added a commit to zz912/linuxcnc that referenced this issue Jan 8, 2024
This patch ensures that the automatic command G43 is not executed immediately, but when the LCNC is in IDLE mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants