Hello Guest it is March 28, 2024, 06:31:26 PM

Author Topic: Gcode block causing stepper to stall  (Read 1359 times)

0 Members and 1 Guest are viewing this topic.

Gcode block causing stepper to stall
« on: April 01, 2022, 05:25:35 PM »
Hi everyone,

I'm hoping that someone might be able to help be figure out what is going on with my Mach3 milling program, 3D adaptive tool path generated in fusion360.

The adaptive tool path seems to run flawlessly for the first 47865 lines of code but on 47866 it does something weird on what should be a simple straight diagonal move: X-58.484 Y30.804. On this line the Y moves fine but the X stays put, the X stepper making a weird noise like it is hitting its limits. This issue throws the X coords off by 58.484mm. By the time it runs a big linear move on line 47906, it's very obviously in the wrong place.

I have soft limits (I think) correctly set up: before I start the program I set the machine coords to the hard limits of the X,Y and Z axes. I then switch on soft limits and jog until the soft limits come into play, correctly. I've read that maybe something is causing the X stepper to stall, potentially mechanical... but here's the weird thing:

I worked backwards in the code incrementally from 47866, running the program from the start of each block of code: 47865, then 47847, 47804... etc. In this way I managed to narrow down the cause of the issue to the lines of code between 47003 and 47065. If I start the program AFTER 47065 then everything up to and including 47866 runs fine. But if I run from BEFORE 47003, the stalling/limits issue happens. I've tried running this at different feedrates, restarting mach3, re-posting the gcode - but the problem persists.

So I'm thinking it is most likely a gcode/mach3 settings issue rather than anything mechanical. Does that sound right?

Can anyone help me figure out what is going on?

Thanks in advance to anyone who reads this!

Full code file is here: https://drive.google.com/file/d/1O8e...ew?usp=sharing
Re: Gcode block causing stepper to stall
« Reply #1 on: April 01, 2022, 07:17:04 PM »
Tried to view the code but it apparently doesn't exist. Can you screen shot the code that is giving you trouble and the 30 or so lines before and after so it can be looked at?
Re: Gcode block causing stepper to stall
« Reply #2 on: April 02, 2022, 03:13:55 AM »
Thanks a lot.

Try this: https://drive.google.com/file/d/1ssG97vztjlW3qWB-CHwpsjZ14GGshiM6/view?usp=sharing

The block of code that is causing the issue is here:

G3 X31.582 Y-39.527 I-0.219 J-1.158 F800.
X31.305 Y-40.246 I0.9 J-0.76 F791.
G1 Y-40.384
X31.308 Y-40.459
X31.37 Y-40.596
X31.467 Y-40.711
X31.584 Y-40.804
X31.716 Y-40.875
X31.858 Y-40.925
X32.006 Y-40.948
X32.156 Y-40.952
X32.441 Y-40.882
X32.7 Y-40.746
X32.92 Y-40.551
X33.086 Y-40.31
X33.19 Y-40.036
X33.226 Y-39.745
G3 X32.924 Y-39.319 I-0.475 J-0.017
G1 X32.813 Y-39.282
X32.7 Y-39.256
G3 X31.58 Y-39.664 I-0.208 J-1.169 F800.
X31.305 Y-40.384 I0.912 J-0.762 F791.
G1 Y-40.486
X31.312 Y-40.636
X31.391 Y-40.763
X31.496 Y-40.87
X31.619 Y-40.956
X31.755 Y-41.019
X31.899 Y-41.062
X32.048 Y-41.079
X32.198 Y-41.077
X32.473 Y-41.
X32.723 Y-40.862
X32.933 Y-40.668
X33.093 Y-40.431
X33.192 Y-40.163
X33.226 Y-39.879
G3 X32.944 Y-39.462 I-0.475 J-0.017
X32.702 Y-39.384 I-0.474 J-1.065
X31.585 Y-39.768 I-0.232 J-1.142 F800.
X31.305 Y-40.486 I0.885 J-0.759 F791.
G1 Y-40.624
X31.308 Y-40.699
X31.361 Y-40.84
X31.455 Y-40.957
X31.572 Y-41.051
X31.703 Y-41.124
X31.844 Y-41.175
X31.991 Y-41.203
X32.141 Y-41.209
X32.429 Y-41.143
X32.692 Y-41.009
X32.915 Y-40.815
X33.084 Y-40.573
X33.19 Y-40.297
X33.226 Y-40.004
G3 X32.936 Y-39.583 I-0.475 J-0.017
G1 X32.82 Y-39.542
X32.701 Y-39.512
G3 X31.583 Y-39.905 I-0.223 J-1.153 F800.
X31.305 Y-40.624 I0.896 J-0.76 F791.
Re: Gcode block causing stepper to stall
« Reply #3 on: April 03, 2022, 05:00:17 AM »
Hi Steve, thanks for your help. Think I've got a solution.

In case anyone else has this stalling axis issue on a dual-axis rapid move: In the Adaptive toolpath settings under Linking there is a High Feedrate Mode option, I changed this from Preserve Rapid Movement to Preserve Single Axis Rapid Movement, and changed the High Feedrate value to something different to the regular feedrate (799 vs 791). Not sure why that worked, but it did. No more stalling!
Re: Gcode block causing stepper to stall
« Reply #4 on: April 03, 2022, 05:54:12 AM »
Good news. Glad it's fixed.