gnea / grbl

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino
https://github.com/gnea/grbl/wiki
Other
4.03k stars 1.6k forks source link

grbl disconnecting/freezing at random places in a job #833

Open crazyxangel opened 4 years ago

crazyxangel commented 4 years ago

at first i thought it might be EMI so i made sure to get a shielded usb cable with ferrites at both ends no dice so i disconnected my entire machine and plugged it into my desktop pc and tried again so just UGS connected to a genuine arduino uno with nothing attached to the pins the issue persists so i tried CNCjs maybe UGS was acting up but CNCjs had the exact same issue then i tried it out with UGS and an arduino due running G2core with the same type of shielded cable and this ran just fine for multiple programs for multiple hours

zeevy commented 4 years ago

May be you exceeded the max step rate of 30khz

crazyxangel commented 4 years ago

how can i check if this is the case? does this happen with plenty of small movements? and how would i fix this

zeevy commented 4 years ago

https://github.com/gnea/grbl/issues/815 Check this

crazyxangel commented 4 years ago

that shouldnt be it then i have 40steps/mm with 5000 steps/min i mean i'll reduce it to 2000 steps/min and try it out like that but it should still be way below the limit

zeevy commented 4 years ago

You can post your machine settings to get more help

crazyxangel commented 4 years ago

$0 | 10 | Step pulse time $1 | 25 | Step idle delay $2 | 0 | Step pulse invert $3 | 0 | Step direction invert $4 | 0 | Invert step enable pin $5 | 0 | Invert limit pins $6 | 0 | Invert probe pin $10 | 1 | Status report options $11 | 0.010 | Junction deviation $12 | 0.002 | Arc tolerance $13 | 0 | Report in inches $20 | 0 | Soft limits enable $21 | 0 | Hard limits enable $22 | 0 | Homing cycle enable $23 | 0 | Homing direction invert $24 | 25.000 | Homing locate feed rate $25 | 500.000 | Homing search seek rate $26 | 250 | Homing switch debounce delay $27 | 1.000 | Homing switch pull-off distance $30 | 1000 | Maximum spindle speed $31 | 0 | Minimum spindle speed $32 | 0 | Laser-mode enable $100 | 40.000 | X-axis travel resolution $101 | 40.000 | Y-axis travel resolution $102 | 800.000 | Z-axis travel resolution $110 | 5000.000 | X-axis maximum rate $111 | 5000.000 | Y-axis maximum rate $112 | 500.000 | Z-axis maximum rate $120 | 1000.000 | X-axis acceleration $121 | 1000.000 | Y-axis acceleration $122 | 1000.000 | Z-axis acceleration $130 | 200.000 | X-axis maximum travel $131 | 200.000 | Y-axis maximum travel $132 | 200.000 | Z-axis maximum travel

zeevy commented 4 years ago

I think it will excede 30k when both x and y are moved with G0 command (in such case your mm/min becomes around 7k

crazyxangel commented 4 years ago

hmm i'll just try running it at 2500 then see if it holds up like that i'll let you know in a couple hours

crazyxangel commented 4 years ago

on ugs it still froze (but the entire ugs program froze so still waiting to see if cncjs works well)

crazyxangel commented 4 years ago

CNCjs has been running for an hour now without issue probably too early to say it is all fixed but its working way better than before thanks for the advice bout the max mm/min @zeevy will keep testing CNCjs trough the night/tomorrow and close if all goes well

abdset commented 4 years ago

This issue have nothing to do with UGS or GRBL but hardware side issue:

btw: your acceleration is too high for 5000 mm/min (i recommand to lower $120, $121 and $122 values).

crazyxangel commented 4 years ago

I'm literally running the arduino without anything connected to it like I stated in the issue itself I am also using a shielded USB cable as also stated in the issue so I highly doubt my motor drivers psu's nor my cables have anything to do with it seeing as they are disconnected laying in the garage while it is just the naked arduino connected to my computer that is displaying this issue

abdset commented 4 years ago

"connected to my computer" Are you using rasbery PI or a PC ?

crazyxangel commented 4 years ago

the issue persisted on both raspberry pi and my desktop pc

abdset commented 4 years ago

The issue persist, then its usb cable or ........... Are you using a clone version of arduino ? Many people report bugs on a cloned arduino. You said the error shows up even when using only arduino with the PC when nothing else is connected, then the only possible causes i see is the usb cable or the arduino itself. I also have seen some people reflash the arduino bootloader to fix connexion issues, you may try that.

abdset commented 4 years ago

Check this: https://github.com/gnea/grbl/wiki/Known-Issues