Basic probe fails on latch return

More
1 year 2 months ago - 1 year 2 months ago #333922 by h_munktell
So, this is going to be a lengthy post. I'm having trouble with qt_dragon_hd and probing via the "Basic Probe" interface. Sometimes, probing fails sporadically for no reason. What happens is that when I probe towards Z- (towards the work piece), when the probe tip hits the target, it stops there and does not retract for a slow probe.

Up until yesterday, I had not been able to reproduce this error consistently. But now I can, and it might be easier to track this issue down.

I'm on 2.9.4, running a MESA card for my router. I have been able to reproduce it and have taken status dumps in between every action I do to reproduce the fault and actually resetting the fault so I can make one probe action again, instead of restarting LinuxCNC.

I have seen other people having similar problems that I think are related to this:
Thread #1: forum.linuxcnc.org/qtvcp/54027-retract-n...-works-after-a-while
Thread #2: forum.linuxcnc.org/49-basic-configuratio...e-with-qtdragon-hang

So, the first procedure for me to reproduce the issue:
  • 1: Start LinuxCNC and home all axes.
  • 2: Load the 3D probe and issue an "M61 T99" in MDI.
  • 3: I can now probe several times without issues.
  • STATUS FILE SAVE: A3-4_status_after_homing_and_several_successful_probes.txt
  • 4: Issue an "S6000 M3" to start the spindle.
  • 5: Issue an "M05" to stop the spindle.
  • STATUS FILE SAVE: A5-6_status_after_M05.txt
  • 6: Issue an "M02" to end the program (should not matter for testing, just in MDI mode).
  • STATUS FILE SAVE: A6-7_status_after_M02.txt
  • 7: Try to probe, fails.
  • STATUS FILE SAVE: A7-_status_after_failed_probe.txt

To "reset" the issue, this works:
  • 1: Issue a probing action that is bound to fail.
  • STATUS FILE SAVE: B1-2_status_during_retract_halt_probe_fail.txt
  • 2: Wait for the 30 sec delay to get the error message "latch return failed" (row 1508 in probe_routines.py, I think).
  • STATUS FILE SAVE: B2-3_status_after_retract_halt_probe_fail.txt
  • 3: Issue a "G1 Z1 F200" (the same as the probe routine that failed) in MDI. Z will not move after this command.
  • STATUS FILE SAVE: B3-4_status_during_MDI_G1Z1F200_after_probe_fail.txt
  • 4: Press the "STOP" button in the UI.
  • STATUS FILE SAVE: B4-5_status_after_pressing_stop_button_after_probe_fail.txt
  • 5: Reissue the "G1 Z1 F200"; now Z is moved to Z1.
  • STATUS FILE SAVE: B5-6_status_after_successful_MDI_G1Z1F200_after_probe_fail.txt
  • 6: Do a probe; this succeeds.
  • STATUS FILE SAVE: B6-7_status_after_successful_secondary_probing.txt
  • 7: Try a second time; this fails.
Here is my config: github.com/hmunktell/printNC/tree/dustshoe

If I run the sim.qtdragon_hd_xyz on the same machine as my CNC, probing is working fine and I have not been able to get the issue. Also, on my desktop, in a virtualbox, running the same sim, everything is fine.

I can not really read out anything else from the status files other than that the probing routine tries to do the latch return, but motion is not up to this task. It almost feels like a race condition somewhere, or a flag that is set after the first probe that is then locked from clearing when starting the spindle. But it works fine in the sim environment; it might be that the internals in LinuxCNC are not handled the same.

Unfortunately, I have no other computer to test this on right now. I'm attaching the status log files. If I can assist with further testing, I'm willing to, as this is rather cumbersome.

Best regards, Henrik
Last edit: 1 year 2 months ago by h_munktell. Reason: Formating

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

More
1 year 2 months ago - 1 year 2 months ago #333951 by wusel0464
Hello,

Thank you for your efforts, I thought I was the only one.
But I did not pursue this further due to time constraints, especially since no further reactions were made to my post.
The switching states are displayed properly on my mesa card. However, if I quickly press my mesa card in a row, the mesa card reacts correctly, but the LED in QT_DRAGON_HD sometimes does not react as expected.
Possibly a timing problem with signal processing.
I have a flying button that measures both workpiece and tool length. Workpiece height is the built -in routine and tool length and change your own, but that makes no difference.

Many greetings Frank.
Last edit: 1 year 2 months ago by wusel0464.

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

More
1 year 2 months ago #333952 by h_munktell
Hi,

Thank you for your time and response. I think the UI polls data from the STATUS data. Probably, if a signal is only high fraction of a second, the UI might not refresh quickly to show that. But I think the underlying logic in HAL is catching all states. 

I just run linuxcnc with debug and verbose output from the terminal, but nothing other than the latch return error is printed to the console during the issue image missing /media/kunena/emoticons/sad.png.

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

More
1 year 2 months ago #333965 by h_munktell
Can now confirm that versaprobe has the same issue for me.

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

More
1 year 2 months ago #333966 by h_munktell
This might be related
github.com/LinuxCNC/linuxcnc/issues/3486
I have something with spindle-at-speed in HAL, have not looked into it as I just see this now, and need to sleep.... If possible....

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

More
1 year 2 months ago - 1 year 2 months ago #334008 by h_munktell
Yes! Got it working now. My spindle.0.at-speed that was taken from hy_vfd.spindle-at-speed was the problem.

hy_vfd.spindle-at-speed is not set to TRUE when MDI M05 and spindle actually comes to a stop. This behavior is not according to the docs.  linuxcnc.org/docs/html/man/man1/hy_vfd.1.html

So, instead, now I'm taking the spindle-speed-fb from hy_vfd and compare that to speed-command in a near component, and that sets spindle.0.at-speed correctly.

Now probing and movement works as expected.

github.com/hmunktell/printNC/commit/46ca...22d4761f4831403e5867
Last edit: 1 year 2 months ago by h_munktell. Reason: Adding links
The following user(s) said Thank You: tommylight

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

Moderators: cmorley
Time to create page: 0.089 seconds
Powered by Kunena Forum