M66 keeps waiting
- Firehunter
- Away
- New Member
-
Less
More
- Posts: 14
- Thank you received: 1
08 Aug 2025 19:09 #333058
by Firehunter
M66 keeps waiting was created by Firehunter
I have configured a hydraulic tailstock on a CNC lathe. It has 2 valves (in/out) and 2 proximity sensors (min/max). I want to use M-codes to control the tailstock, but I can't get M66 to work. M64 and M65 do work properly. I've attached the sensor inputs to motion.digital-in-00 and 01. I can see the signals changing low/high in halshow. But when I try to test this functionality with a small G-code file, it keeps waiting on the M66 line.
It keeps waiting on line M66 P1 L4 Q10. Even if I manually turn the sensor on/off, it doesn't do anything. But when I use this line in MDI, it works without problems. When I use MDI I can see the gmoccapy interface "freeze" when I execute this line. It "unfreezes" when the sensor is operated.
Why doesn't my G-code work?
%
M64 P2 ; turn extend tailstock valve on
M66 P1 L4 Q10 ; wait for max sensor signal to go low
G4 P5 ; wait 5 seconds just for testing purposes
M65 P2 ; turn extend tailstock valve off
M64 P1 ; turn retract tailstock valve on
M66 P0 L3 Q10 ; wait for min sensor signal to go high
M65 P1 ; turn retract tailstock valve off
M30
%
It keeps waiting on line M66 P1 L4 Q10. Even if I manually turn the sensor on/off, it doesn't do anything. But when I use this line in MDI, it works without problems. When I use MDI I can see the gmoccapy interface "freeze" when I execute this line. It "unfreezes" when the sensor is operated.
Why doesn't my G-code work?
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23443
- Thank you received: 4981
08 Aug 2025 20:51 #333069
by andypugh
Replied by andypugh on topic M66 keeps waiting
L3 is correct for this application, but out of interest, does L1 work?
Does the 10 second timeout work?
Which LinuxCNC version?
In halshow are you looking at the motion.digital-in pins? (rather than the IO pins)
Does the 10 second timeout work?
Which LinuxCNC version?
In halshow are you looking at the motion.digital-in pins? (rather than the IO pins)
Please Log in or Create an account to join the conversation.
- Firehunter
- Away
- New Member
-
Less
More
- Posts: 14
- Thank you received: 1
08 Aug 2025 21:36 - 08 Aug 2025 21:37 #333070
by Firehunter
Replied by Firehunter on topic M66 keeps waiting
The other L-modes also don't work. Timeout doesn't work. Nothing happens after 10 seconds. Yes I'm looking at the digital-in-xx pins. LinuxCNC version on the splash screen is 2.9.0~pre1+git20230208.f1270d6ed7
Last edit: 08 Aug 2025 21:37 by Firehunter.
Please Log in or Create an account to join the conversation.
- Benb
-
- Offline
- Elite Member
-
Less
More
- Posts: 178
- Thank you received: 58
09 Aug 2025 00:06 #333084
by Benb
Replied by Benb on topic M66 keeps waiting
Since you're observing activity at hal pin “motion.digital-in-xx”, this confirms that the hardware input is functioning correctly. The issue likely lies further downstream—could it be that Gmoccapy is monopolizing this pin?
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23443
- Thank you received: 4981
09 Aug 2025 01:20 #333089
by andypugh
I don't think that anything has changed with M66 since that version (which was a prerelease that found it's way into the Debian archives during their testing phase, expected to be replaced, and then wasn't.
I don't expect it to make a difference to this particular issue but there are other fixed bugs that I would be happier knowing you are not going to see. The current release version (outside Debian) is 2.9.4. You can just download the .deb file and install it from our server:
www.linuxcnc.org/dists/
What Linux are you running? (eg, Debian Bookworm (my first guess)) and on what platform? (PC? Pi? Oher?) we can then point you to the exact package file you need.
Replied by andypugh on topic M66 keeps waiting
I really thought we had a newer version than that on Bookworm, but the package lists suggest otherwise.LinuxCNC version on the splash screen is 2.9.0~pre1+git20230208.f1270d6ed7
I don't think that anything has changed with M66 since that version (which was a prerelease that found it's way into the Debian archives during their testing phase, expected to be replaced, and then wasn't.
I don't expect it to make a difference to this particular issue but there are other fixed bugs that I would be happier knowing you are not going to see. The current release version (outside Debian) is 2.9.4. You can just download the .deb file and install it from our server:
www.linuxcnc.org/dists/
What Linux are you running? (eg, Debian Bookworm (my first guess)) and on what platform? (PC? Pi? Oher?) we can then point you to the exact package file you need.
Please Log in or Create an account to join the conversation.
Time to create page: 0.120 seconds