G28.1 in macro forever stuck

If you think you've found a bug post it here.

G28.1 in macro forever stuck

Postby johu » Tue May 04, 2021 3:45 pm

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!
Attachments
M20910.txt
Modified CheckHome macro
(4.93 KiB) Downloaded 478 times
johu
 
Posts: 35
Joined: Fri Jan 08, 2021 3:57 pm

Re: G28.1 in macro forever stuck

Postby dezsoe » Tue May 04, 2021 5:19 pm

Yes, it blocks, because the M20910 presses the apply settings button which you must not do while cycle is started.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: G28.1 in macro forever stuck

Postby johu » Tue May 04, 2021 6:55 pm

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...
johu
 
Posts: 35
Joined: Fri Jan 08, 2021 3:57 pm

Re: G28.1 in macro forever stuck

Postby dezsoe » Tue May 04, 2021 8:07 pm

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. :)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: G28.1 in macro forever stuck

Postby johu » Tue May 04, 2021 8:29 pm

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.
johu
 
Posts: 35
Joined: Fri Jan 08, 2021 3:57 pm


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 12 guests