Page 1 of 1

G28.1 in macro forever stuck

PostPosted: Tue May 04, 2021 3:45 pm
by johu
Hi there,

I'm doing a repeatability test for my Y axis.
I'm using the "CheckHome" M20910 macro from here

The nc-code i'm running is the following:
Code: Select all
F12000
S12000
M3
G54
G1 Y100 X0 Z-1
G1 Y200 X100 Z-10

G1 Y100 X0 Z-1
G1 Y200 X100 Z-10

G1 Y100 X0 Z-1
G1 Y200 X100  Z-10

G1 Y100 X0 Z-1
G1 Y200 X100 Z-10

G1 Y100 X0 Z-1
G1 Y200 X100 Z-10
M5
G4 P250

G1 Y5
M20910
M47


The problem is that UCCNC code execution completely blocks during the M20910 execution.
I added some Logging lines to trace the point of failure.
After a few cycles, it seems UCCNC get's stuk while executing the "G28.1 Y5" code.

[edit]
The "Y-axis Homed" led goes off, so it seems the "G28.1 Y5" code starts, but sometimes get's stuck.

Anyone has an idea why this happens?

After pressing the FEED HOLD and CYCLE STOP button, sometimes the X-axis moves to the hard-limit, thus passing the endswitch. This should NEVER happen!

Re: G28.1 in macro forever stuck

PostPosted: Tue May 04, 2021 5:19 pm
by dezsoe
Yes, it blocks, because the M20910 presses the apply settings button which you must not do while cycle is started.

Re: G28.1 in macro forever stuck

PostPosted: Tue May 04, 2021 6:55 pm
by johu
dezsoe wrote:Yes, it blocks, because the M20910 presses the apply settings button which you must not do while cycle is started.


OK... are you saying the M20910 macro should never be called from within a NC-program? In other words only from the MDI?
I guess the M20910 macro was created by you (dezsoe).
Is there way to apply the settings and make it work from within a program?

If not, then a "cycle start check" may be an improvement for the macro...

Re: G28.1 in macro forever stuck

PostPosted: Tue May 04, 2021 8:07 pm
by dezsoe
Those macros are more than 3 years old and you're the first who wanted to run them form g-code. I think I leave them as they are. :)

Re: G28.1 in macro forever stuck

PostPosted: Tue May 04, 2021 8:29 pm
by johu
I understand they are 3 years old, but they are still very usefull :D

I don't understand that during a verbose logging the part around the "exec.Callbutton(168)" seems to run smoothly, and during the "exec.Code("G28.1......" the code hangs around every 2~5 cycles.
To my observations it's not from the apply button, but really from the "G28.1" code execution.

This is confirmed when I replace the exec.Code("G28.1 Y5") code with a exec.Code("G1 Y50").
In this case the macro runs at least 50 times (then I stopped it) without problems.