Hello Guest it is April 26, 2024, 03:47:08 AM

Author Topic: Strange mach4 behavior  (Read 872 times)

0 Members and 1 Guest are viewing this topic.

Strange mach4 behavior
« on: April 21, 2022, 11:49:26 AM »
Hi Guys,
  its been a while since i had a need to post but i have an issue with mach4.

First a bit of background - its a home built machine and i have been running mach for a while now.  i have noticed sometimes there is some odd behaviour as below
1 the first time i run gcode the tool is set, height is set, but the first z move is often wrong by 10mm or so.  after re-setting the wpc 0 its fine.
2 Every few months the config messes up somehow - not sure what causes it but i have to restore and get back to square 1
3 Sometimes when homing for the first time there is a small delay - 1 or 2 seconds - between moving the axis.  This is not all the time but sometimes

Now i have a new problem.....

After some tidying yesterday i changed the usb port for my rs485 adapter (spindle running through modbus), today i go to use my machine and firstly the tool change option is set to 'm6 is the next tool' - after changing back 3 times it finally stayed and i went to do an m6 (which includes tool height measure).  The routine started as normal and moved to tool change pos, waited for the tool, and then moved to the probe, air blast and start the probe movement.  When the tool reched the probe, the machine stopped and seemed to get 'stuck'- - no error, no e-stop, but no further movement and could only be moved after a reset.  The normal behaviour would be to move z back u and return to previous state.

I have no clue what could be causing this.... very weird.  I dont know why it wont move past the tool probing routine - it has done 1000's using the same m6 script no issue!
« Last Edit: April 21, 2022, 12:05:37 PM by barneskite28 »
Re: Strange mach4 behavior
« Reply #1 on: April 21, 2022, 03:32:24 PM »
Update- after re-installing mach 4 and ess again the behaviour is repeatable..
same issue log below

2022-04-21 20:17:37.297 - Logging Enabled.
2022-04-21 20:17:37.335 - SoftSync()! Clearing planner. gcodeexec.cpp:168
2022-04-21 20:17:37.626 - Waiting on planner to drain before waiting on SetStill... runcanon.cpp:92
2022-04-21 20:17:37.626 - Waiting on SetStill...
2022-04-21 20:17:37.626 - Controller::RunCanonBuffer called AddStopReportRequest() runcanon.cpp:101
2022-04-21 20:17:37.626 - Requesting a stopped report for axis 0 motors.
2022-04-21 20:17:37.626 - Requesting a stopped report for motor 0.
2022-04-21 20:17:37.626 - Requesting a stopped report for axis 1 motors.
2022-04-21 20:17:37.626 - Requesting a stopped report for motor 1.
2022-04-21 20:17:37.626 - Requesting a stopped report for motor 5.
2022-04-21 20:17:37.626 - Requesting a stopped report for axis 2 motors.
2022-04-21 20:17:37.626 - Requesting a stopped report for motor 2.
2022-04-21 20:17:37.805 - API: mcMotionSetStill(inst = 0, motor = 0) (Called by ESS)
2022-04-21 20:17:37.805 - SetStill(): Motor 0 last position reported = 55389.1500 controller.cpp:1400
2022-04-21 20:17:37.805 - Axis 1 reports that it is still moving! controller.cpp:1407
2022-04-21 20:17:37.806 - >>>--- ESS: Reporting Stopped: Motor 0 55389.150000   #B
2022-04-21 20:17:37.806 - API: mcMotionSetStill(inst = 0, motor = 1) (Called by ESS)
2022-04-21 20:17:37.806 - SetStill(): Motor 1 last position reported = 440396.0000 controller.cpp:1400
2022-04-21 20:17:37.806 - Axis 1 reports that it is still moving! controller.cpp:1407
2022-04-21 20:17:37.806 - >>>--- ESS: Reporting Stopped: Motor 1 440396.000000   #B
2022-04-21 20:17:37.806 - API: mcMotionSetStill(inst = 0, motor = 2) (Called by ESS)
2022-04-21 20:17:37.806 - SetStill(): Motor 2 last position reported = -960.0000 controller.cpp:1400
2022-04-21 20:17:37.806 - Axis 1 reports that it is still moving! controller.cpp:1407
2022-04-21 20:17:37.806 - >>>--- ESS: Reporting Stopped: Motor 2 -960.000000   #B
2022-04-21 20:17:37.806 - API: mcMotionSetStill(inst = 0, motor = 5) (Called by ESS)
2022-04-21 20:17:37.806 - SetStill(): Motor 5 last position reported = 440396.0000 controller.cpp:1400
2022-04-21 20:17:37.806 - All motors marked as still.
2022-04-21 20:17:37.806 - >>>--- ESS: Reporting Stopped: Motor 5 440396.000000   #B
2022-04-21 20:17:37.806 - Waiting on SetStill is Done!
2022-04-21 20:17:37.858 - SoftSync()! Clearing planner. controlset.cpp:210
2022-04-21 20:17:37.858 - API: mcCntlGcodeExecute(inst = 0, commands = 'g43 h4.0') (unknown caller)
2022-04-21 20:17:37.972 - SoftSync()! Clearing planner. gcodeexec.cpp:168
2022-04-21 20:17:38.126 - SoftSync()! Clearing planner. controlset.cpp:210
2022-04-21 20:17:38.126 - Signal id 1052, (Output #2), changed from LOW to HIGH.
2022-04-21 20:17:38.128 -        ESS: Activating output Port3-Pin9 - Y309 solenoid 1
2022-04-21 20:17:38.629 - Signal id 1052, (Output #2), changed from HIGH to LOW.
2022-04-21 20:17:38.629 -        ESS: Deactivating output Port3-Pin9 - Y309 solenoid 1
2022-04-21 20:17:38.629 - API: mcCntlGcodeExecute(inst = 0, commands = 'g53 G31 z-150 f200') (unknown caller)
2022-04-21 20:17:38.742 - SoftSync()! Clearing planner. gcodeexec.cpp:168
2022-04-21 20:17:38.744 - Attempt transition from "MDI Running" on event "Probe" runcanon.cpp:536
2022-04-21 20:17:38.744 - S_MDI_RUNNING2_on_exit
2022-04-21 20:17:38.744 - Signal id 1114, (Gcode Running), changed from HIGH to LOW.
2022-04-21 20:17:38.745 - ACTION_start_probe
2022-04-21 20:17:38.746 - >>>>> ESS Probe 0, Starting.

2022-04-21 20:17:38.748 - S_MDI_PROBING_on_entry
2022-04-21 20:17:38.748 - Signal id 1173, (Machine Probing), changed from LOW to HIGH.
2022-04-21 20:17:38.750 - Probing: Waiting on exit event... runcanon.cpp:267
2022-04-21 20:17:38.750 - Waiting on planner to drain before waiting on SetStill... runcanon.cpp:92
2022-04-21 20:17:38.751 - >>>>ESS: Switching from NORMAL to PROBE state for Probe 0
2022-04-21 20:17:38.979 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:39.209 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:39.439 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:39.663 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:39.886 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:40.113 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:40.341 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:40.567 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:40.798 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:41.024 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:41.248 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:41.473 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:41.702 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:41.932 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:42.160 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:42.386 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:42.609 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:42.839 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:43.068 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:43.293 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:43.518 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:43.752 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:43.984 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:44.211 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:44.434 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:44.664 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:44.888 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:45.113 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:45.344 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:45.572 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:45.801 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:46.028 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:46.255 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:46.480 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:46.704 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:46.928 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:47.152 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:47.376 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:47.604 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:47.830 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:48.054 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:48.282 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:48.506 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:48.734 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:48.958 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:49.183 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:49.411 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:49.641 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:49.869 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:50.092 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:50.323 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:50.549 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:50.777 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:51.002 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:51.225 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:51.456 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:51.682 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:51.907 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:52.130 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:52.355 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:52.585 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:52.810 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:53.038 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:53.263 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:53.490 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:53.718 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:53.945 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:54.168 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:54.394 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:54.622 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:54.851 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:55.080 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:55.305 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:55.534 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:55.759 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:55.984 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:56.211 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:56.438 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:56.663 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:56.891 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:57.118 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:57.345 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:57.575 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:57.805 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:58.029 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:58.258 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:58.487 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:58.715 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:58.943 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:59.172 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:59.401 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:59.628 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:17:59.854 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:00.080 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:00.306 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:00.533 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:00.761 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:00.988 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:01.220 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:01.448 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:01.673 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:01.899 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:02.126 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:02.353 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:02.582 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:02.806 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:03.035 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:03.263 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:03.490 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:03.714 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:03.938 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:04.165 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:04.394 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:04.616 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:04.845 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:05.074 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:05.303 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:05.525 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:05.753 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:05.981 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:06.204 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:06.431 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:06.654 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:06.884 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:07.107 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:07.334 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:07.565 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:07.801 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:08.030 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:08.258 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:08.489 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:08.722 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:08.949 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:09.176 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:09.402 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:09.629 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:09.855 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:10.082 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:10.310 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:10.538 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:10.761 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:10.988 - -----ESS: Checking for Probe0 Strike, none yet...
2022-04-21 20:18:11.046 - Signal id 161, (Probe), changed from LOW to HIGH.
2022-04-21 20:18:11.047 - Signal id 186, (Motion Inhibit), changed from LOW to HIGH.
2022-04-21 20:18:11.047 - -----ESS: Mach ACKs Probe0 input signal ON!
2022-04-21 20:18:11.047 - Signal id 5, (Input #4), changed from LOW to HIGH.
2022-04-21 20:18:11.053 - API: mcMotionSetProbePos(inst = 0, motor = 0, position = 55389.1500) (Called by ESS)
2022-04-21 20:18:11.053 - API: mcMotionSetProbePos(inst = 0, motor = 1, position = 440396.0000) (Called by ESS)
2022-04-21 20:18:11.053 - API: mcMotionSetProbePos(inst = 0, motor = 2, position = -35288.0000) (Called by ESS)
2022-04-21 20:18:11.053 - API: mcMotionSetProbePos(inst = 0, motor = 3, position = 0.0000) (Called by ESS)
2022-04-21 20:18:11.053 - API: mcMotionSetProbePos(inst = 0, motor = 4, position = 0.0000) (Called by ESS)
2022-04-21 20:18:11.053 - API: mcMotionSetProbePos(inst = 0, motor = 5, position = 440396.0000) (Called by ESS)
2022-04-21 20:18:11.053 - ^^^^^^ ESS: Success! Probe0 Strike. Switching from PROBING to PROBING_CLEANUP state.
2022-04-21 20:18:11.081 - ^^^^^^ ESS Probe0 Finished: The device is still and the buffer is empty.
2022-04-21 20:18:11.082 - API: mcMotionClearPlanner(inst = 0) (Called by ESS)
2022-04-21 20:18:11.082 - API: mcMotionSetProbeComplete(inst = 0) (Called by ESS)
2022-04-21 20:18:11.083 - Recording latched probe positions.
2022-04-21 20:18:11.084 - Attempt transition from "Probing" on event "Probe Complete" machapi.cpp:1519
2022-04-21 20:18:11.085 - S_FILE_PROBING_on_exit
2022-04-21 20:18:11.085 - Signal id 1173, (Machine Probing), changed from HIGH to LOW.
2022-04-21 20:18:11.085 - ACTION_stop_probe
2022-04-21 20:18:11.086 - >>>>> ESS Probe 0, Done

2022-04-21 20:18:11.089 - S_MDI_RUNNING2_on_entry
2022-04-21 20:18:11.089 - Waiting on SetStill...
2022-04-21 20:18:11.089 - Signal id 1180, (Feed Hold Disabled), changed from LOW to HIGH.
2022-04-21 20:18:11.089 - Signal id 1114, (Gcode Running), changed from LOW to HIGH.
2022-04-21 20:18:11.089 - Controller::RunCanonBuffer called AddStopReportRequest() runcanon.cpp:101
2022-04-21 20:18:11.090 - Requesting a stopped report for axis 0 motors.
2022-04-21 20:18:11.090 - Requesting a stopped report for motor 0.
2022-04-21 20:18:11.090 - Requesting a stopped report for axis 1 motors.
2022-04-21 20:18:11.090 - Requesting a stopped report for motor 1.
2022-04-21 20:18:11.090 - Requesting a stopped report for motor 5.
2022-04-21 20:18:11.090 - Requesting a stopped report for axis 2 motors.
2022-04-21 20:18:11.090 - Requesting a stopped report for motor 2.
2022-04-21 20:18:11.090 - 
2022-04-21 20:18:11.090 - -----===== Mach4 build 4.2.0.4612, ESS build 278.1 =====-----
2022-04-21 20:18:11.090 - 
2022-04-21 20:18:11.825 - Signal id 1180, (Feed Hold Disabled), changed from HIGH to LOW.
2022-04-21 20:18:11.826 - Waiting on SetStill is Done!
2022-04-21 20:18:11.826 - SyncPosition()! Clearing planner.
2022-04-21 20:18:11.826 - Probing: Exiting hold because of probe strike. gcodeexec.cpp:792
2022-04-21 20:18:11.826 -
2022-04-21 20:18:11.826 -
2022-04-21 20:18:11.826 - !!!!!!! ESS: The Inhibit Motion input signal is active! Mach will not generate motion!!!!!!!

2022-04-21 20:18:11.826 - .^^^^^ESS: Switching from PROBING_CLEANUP to NORMAL state.^^^^^
2022-04-21 20:18:11.826 -
2022-04-21 20:18:11.827 -
2022-04-21 20:18:11.884 - API: mcMotionSetStill(inst = 0, motor = 0) (Called by ESS)
2022-04-21 20:18:11.884 - SetStill(): Motor 0 last position reported = 55389.1500 controller.cpp:1400
2022-04-21 20:18:11.884 - All motors marked as still.
2022-04-21 20:18:11.884 - >>>--- ESS: Reporting Stopped: Motor 0 55389.150000   #B
2022-04-21 20:18:11.884 - API: mcMotionSetStill(inst = 0, motor = 1) (Called by ESS)
2022-04-21 20:18:11.884 - SetStill(): Motor 1 last position reported = 440396.0000 controller.cpp:1400
2022-04-21 20:18:11.884 - All motors marked as still.
2022-04-21 20:18:11.884 - >>>--- ESS: Reporting Stopped: Motor 1 440396.000000   #B
2022-04-21 20:18:11.884 - API: mcMotionSetStill(inst = 0, motor = 2) (Called by ESS)
2022-04-21 20:18:11.885 - SetStill(): Motor 2 last position reported = -35301.0000 controller.cpp:1400
2022-04-21 20:18:11.885 - SoftSync()! Clearing planner. controlset.cpp:210
2022-04-21 20:18:11.885 - All motors marked as still.
2022-04-21 20:18:11.885 - >>>--- ESS: Reporting Stopped: Motor 2 -35301.000000   #B
2022-04-21 20:18:11.885 - API: mcMotionSetStill(inst = 0, motor = 5) (Called by ESS)
2022-04-21 20:18:11.885 - SetStill(): Motor 5 last position reported = 440396.0000 controller.cpp:1400
2022-04-21 20:18:11.885 - All motors marked as still.
2022-04-21 20:18:11.885 - >>>--- ESS: Reporting Stopped: Motor 5 440396.000000   #B
2022-04-21 20:18:11.886 - API: mcCntlGcodeExecute(inst = 0, commands = 'G90 G53 G1 Z0.0000 F600.0') (unknown caller)
2022-04-21 20:18:12.000 - SoftSync()! Clearing planner. gcodeexec.cpp:168
Re: Strange mach4 behavior
« Reply #2 on: April 21, 2022, 03:32:40 PM »


My M6 macro

Code: [Select]
function m6()
   
local inst = mc.mcGetInstance()

----------------------------------------------------------------------------------
--change lines here to either auto rapid, or manually jog to a tool change position
----------------------------------------------------------------------------------
--Manual Lines. Uncomment line below to allow you to manually jog to a tool change position.
--local MyChoice = wx.wxMessageBox("Click OK, \nThen Jog to A Safe Tool Change Position,\nInsert New tool,\nThen Click Cycle Start.","Click OK to continue" , 16)
---------------------------------------------------------------------------------
--Auto Lines.  Uncomment both lines below (and comment out local MyChoice line above) to automatically move to tool change position.
--Edit to include the machine coordinate values of that tool change position.

--AUTO LINES
mc.mcCntlGcodeExecuteWait(inst, "G53 G0 Z-5\nG53 G0 X200.0 Y20.0")--Move the Z to Home.Then to the X, Y Coords for our touch pad.
mc.mcCntlSetLastError(inst, 'Now in Tool Change Position. Hit Cycle Start!')
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local posmode = mc.mcCntlGetPoundVar(inst, mc.SV_MOD_GROUP_3) --get the current mode so we can return to it when macro ends
local selectedtool = mc.mcToolGetSelected(inst)
local currenttool = mc.mcToolGetCurrent(inst)
   
 if selectedtool == currenttool then
        mc.mcCntlSetLastError(inst, "Current tool == Selected tool so there is nothing to do")
        do return end
 end
  mc.mcCntlToolChangeManual(inst, true);
  mc.mcCntlSetLastError(inst, "Current tool == " .. tostring(selectedtool) .. "   Previous Tool == " .. tostring(currenttool))
  mc.mcToolSetCurrent(inst, selectedtool)

  --local MyChoice = wx.wxMessageBox("Click Ok to Begin Probing the New Tool","Click OK to continue" , 16)
    mc.mcCntlGcodeExecuteWait(inst, "G53  G90 G0 X24.0 Y436.0")--
        mc.mcCntlSetLastError(inst, "Probing in Progress!")
        mc.mcCntlGcodeExecuteWait(inst, " G90 G31 Z-95. F150.")--probe the new tool
local probedz = mc.mcCntlGetPoundVar(inst, mc.SV_PROBE_POS_Z) -- Z Probe position in Machine coords
        mc.mcCntlGcodeExecute(inst, string.format('G ' .. posmode))--return to pre macro mode G90, or G91
  mc.mcCntlGcodeExecuteWait(inst, "G00 G53 Z0 ")--Retract
 
local NewOffset = probedz
  mc.mcToolSetData(inst, mc.MTOOL_MILL_HEIGHT, selectedtool, NewOffset)
  mc.mcCntlSetLastError(inst, string.format("Auto tool setting complete, Offset = %.4f", NewOffset))
wx.wxMessageBox("Toolchange Complete.\nTLO Set")
end

if (mc.mcInEditor() == 1) then
 m6()
end

Offline Azalin

*
  •  181 181
    • View Profile
Re: Strange mach4 behavior
« Reply #3 on: May 04, 2022, 06:09:23 PM »
1 the first time i run gcode the tool is set, height is set, but the first z move is often wrong by 10mm or so.  after re-setting the wpc 0 its fine.

I am having the exact same problem. Z axis exactly moves down about 10mm and crashes. I ruined countless end mills.

Have you find a solution?
Re: Strange mach4 behavior
« Reply #4 on: May 04, 2022, 06:26:43 PM »
1 the first time i run gcode the tool is set, height is set, but the first z move is often wrong by 10mm or so.  after re-setting the wpc 0 its fine.

I am having the exact same problem. Z axis exactly moves down about 10mm and crashes. I ruined countless end mills.

Have you find a solution?
I didn't find a solution other than reducing rapid first run, resetting the program if the tool is not close to where I expect it should be from the top of the workpiece, then we setting the z height if needed.

Offline Azalin

*
  •  181 181
    • View Profile
Re: Strange mach4 behavior
« Reply #5 on: May 05, 2022, 09:02:29 AM »
It is unbelievable that Mach4 has weird bugs like this.

I tested almost 20 Mach4 versions and here are my findings.

4385 good
4524 good
4543 good
4559 good
4566 good
4563 good
4580 good
4582 good

4584 bad
4596 bad
4682 bad
4744 bad

As you can see this problem occurs in build 4584 and persists. 4582 and previous builds are good.