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.1k stars 1.61k forks source link

overload detection #687

Closed alejandro-anv closed 5 years ago

alejandro-anv commented 5 years ago

When working as CNC, is there any way to add an external sensor that informs grbl that feed rate is too fast and motor is overloading? If not, can you point me to the part of the code that I can modify for adding this behavior?

The idea is that if the material is hard, the motion should be slower. A sensor can detect this and the software can modulate the speed acording to this mesurement (may be analog or digital on/off overload detected).

terjeio commented 5 years ago

Use Trinamic drivers and stallGuard2 load measurements as input to feed override?

alejandro-anv commented 5 years ago

Use Trinamic drivers and stallGuard2 load measurements as input to feed override?

The hardware is not the problem. I need a way to change the speed in grbl.

My question is if there is already a way for altering the speed inside grbl or where in the code can I insert such change (i.e. multiply by a factor).

langwadt commented 5 years ago

feed override, you can see how it is done in serial.c line 167-171

terjeio commented 5 years ago

I wrote "input to feed override" -> plan_update_velocity_profile_parameters() in planner.c