grbl / 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
5.42k stars 3.04k forks source link

Will grbl have X-axis data overflow? #1848

Open CHTUZKI opened 9 months ago

CHTUZKI commented 9 months ago

HI.

I have a very uncommon requirement where I want to use grbl to control my turntable (similar to CNC's A-axis). My turntable can be understood as CNC's A-axis, and I want to use grbl's X-axis to drive this motor. The special thing is that my turntable will keep rotating and won't stop. If I use grbl to drive it, I'm worried that the X-axis data of grbl will overflow. Will this happen?

breiler commented 9 months ago

I don't know this for certain, but that sounds likely.

The position is stored as a number of steps taken for each axis and is stored as a int32 with a value from -2147483648 to 2147483647. (https://github.com/grbl/grbl/blob/master/grbl/system.h#L77)

So with a configuration of 100 steps per millimeter your machine would have a range from -21Km to 21Km.