I have been trying to work out an issue when probing on my CNC mill. I have found that for preparatory moves where I want to use G31 in case the probe does make contact, but I'm not actually looking for a probe contact, Mach 4 is hanging while waiting on the motion controller if I understand the log correctly. I have included it below.
When using G31 in the simplest sense, it works. IE, machine starts to move, and it stops when the probe is triggered.
What i want to do is use G31 to take me from the center of a part past its edge to subsequently drop down in Z and then probe the outside edge. I want to use G31 in case the probe is triggered so that it stops instead of breaking off the probe. The probing scripts in Mach4 do it this way and they watch for unexpected probe contact. It is my understanding that it is the best practice versus using G01 to make the setup moves.
Here is the error I see when I input the following in MDI, it is worth noting that the machine moves to the position X -1.000 correctly but the code hangs waiting for the motion controller after the move from what i can tell in the log.
G31 X-1.000 F20
- Code: Select all
2021-11-24 05:26:29.134 - API: mcCntlMdiExecute(inst = 0, commands = 'g31 x-1.000 F20') (unknown caller)
2021-11-24 05:26:29.243 - Attempt transition from "Idle" on event "MDI Start" controller.cpp:2364
2021-11-24 05:26:29.243 - Signal id 1127, (Jog Enabled), changed from HIGH to LOW.
2021-11-24 05:26:29.243 - S_IDLE_on_exit
2021-11-24 05:26:29.243 - Signal id 1172, (Machine Idle), changed from HIGH to LOW.
2021-11-24 05:26:29.243 - ACTION_start_mdi
2021-11-24 05:26:29.243 - SoftSync()! Clearing planner.
2021-11-24 05:26:29.274 - S_MDI_RUNNING_on_entry
2021-11-24 05:26:29.274 - SoftSync()! Clearing planner. stateinterface.cpp:1351
2021-11-24 05:26:29.274 - S_MDI_RUNNING2_on_entry
2021-11-24 05:26:29.274 - Signal id 1114, (Gcode Running), changed from LOW to HIGH.
2021-11-24 05:26:29.274 - Attempt transition from "MDI Running" on event "Probe" runcanon.cpp:536
2021-11-24 05:26:29.274 - S_MDI_RUNNING2_on_exit
2021-11-24 05:26:29.274 - Signal id 1114, (Gcode Running), changed from HIGH to LOW.
2021-11-24 05:26:29.274 - ACTION_start_probe
2021-11-24 05:26:29.274 - S_MDI_PROBING_on_entry
2021-11-24 05:26:29.274 - Signal id 1173, (Machine Probing), changed from LOW to HIGH.
2021-11-24 05:26:29.274 - Probing: Waiting on exit event... runcanon.cpp:267
2021-11-24 05:26:29.274 - Waiting on planner to drain before waiting on SetStill... runcanon.cpp:92
2021-11-24 05:26:31.383 - Waiting on SetStill...
2021-11-24 05:26:31.383 - Signal id 1180, (Feed Hold Disabled), changed from LOW to HIGH.
2021-11-24 05:26:31.383 - Controller::RunCanonBuffer called AddStopReportRequest() runcanon.cpp:101
2021-11-24 05:26:31.383 - Requesting a stopped report for axis 0 motors.
2021-11-24 05:26:31.383 - Requesting a stopped report for motor 0.
2021-11-24 05:26:31.383 - Requesting a stopped report for axis 1 motors.
2021-11-24 05:26:31.383 - Requesting a stopped report for motor 1.
2021-11-24 05:26:31.383 - Requesting a stopped report for axis 2 motors.
2021-11-24 05:26:31.383 - Requesting a stopped report for motor 2.
It just hangs here after calling AddStopReportRequest()
In case it is helpful, the machine just sits like this with the cycle time counting up until i toggle the enable button off. The log file then continues as below
- Code: Select all
2021-11-24 05:28:33.223 - API: mcCntlEnable(inst = 0, FALSE) (Mach4GUI Button)
2021-11-24 05:28:33.239 - Signal id 1018, (Enable #0), changed from HIGH to LOW.
2021-11-24 05:28:33.239 - Signal id 1019, (Enable #1), changed from HIGH to LOW.
2021-11-24 05:28:33.239 - Signal id 1020, (Enable #2), changed from HIGH to LOW.
2021-11-24 05:28:33.239 - Attempt transition from "Probing" on event "Stop" controller.cpp:5235
2021-11-24 05:28:33.239 - S_FILE_PROBING_on_exit
2021-11-24 05:28:33.239 - Signal id 1173, (Machine Probing), changed from HIGH to LOW.
2021-11-24 05:28:33.239 - S_MDI_RUNNING_on_exit
2021-11-24 05:28:33.239 - ACTION_stop
2021-11-24 05:28:33.348 - S_IDLE_on_entry
2021-11-24 05:28:33.364 - Signal id 1172, (Machine Idle), changed from LOW to HIGH.
2021-11-24 05:28:33.364 - Waiting on SetStill is Done!
2021-11-24 05:28:33.364 - Signal id 1120, (Machine Enabled), changed from HIGH to LOW.
2021-11-24 05:28:33.364 - Probing: Exiting probe state because of end of move. gcodeexec.cpp:1552
2021-11-24 05:28:33.364 - Attempt transition from "Idle" on event "Probe Complete" gcodeexec.cpp:1574
2021-11-24 05:28:33.364 - Can't transition from "Idle" on event "Probe Complete" gcodeexec.cpp:1574
2021-11-24 05:28:33.379 - Signal id 1180, (Feed Hold Disabled), changed from HIGH to LOW.
For background, at the risk of making this post too long to be interesting, my probe is hooked up to Port 2 pin 5 of the AXBB-E. It is an NPN switching probe @5volts. I have its output hooked up to i5- and 5VDC going to i5+. I have it set up as active low in Mach4 config. It works perfectly and is very consistent. I'm quite certain i don't have a hardware issue, but i wanted to give that context in case it mattered.
I have the most current AXBB-E plugin that i can find. It is listed as V 1.002 in Mach4.
If anyone has any ideas about how i can resolve this please let me know. If it is not a bug in the AXBB-E plug-in I apologize for my mistake. I will post this over on Machsupport as well to get some more feedback.
I found one other forum post here of another person struggling with this specific issue and Mach4 but it was over a year ago and they never got any replies to their post. https://www.forum.cncdrive.com/viewtopic.php?f=22&t=2600
I also read about something similar happening to people with another vendors product (Ethernet Smooth Stepper), and they added functionality to their plug in to prevent it hanging in this situation. I only include this for context of me suspecting it as a bug.
Please let me know if there is other information i can provide that would be helpful and i will get it to you.
Thanks in advance for any help or clarity you can provide!