Here are some files Mike Green put together some years ago that were for 3 axis, 1, 1/2, 1/4, 1/16 CNC control. Some variations included encoder use where the output steps were compared with encoder count, and would stop the machine if the steps were not accurate within X steps. I used these for years until I finally replaced the controller all together. Honestly, I do not recall what was the final set of files that made up the working system, most of Mikes work is very documented though, and may help out with what you guys are doing.
As far as ramping as Ken mentioned, that is a complex issue on CNC's. For other situations where ramping/decel is required on single or multi axis projects that wouldn't really require all moves to be precisely sync'd, I have some Spin code that works well for multi axis operation that I use on my pick and place, so that the moves are all ramped and decel'd with no regard for perfect sync. So, on cutting parts it would not work. If there is an interest I can post it separate.
Also, I can't recall if these were for driving a stepper driver IC (step/Dir only), or if they drove prop pins for bipolar sequencing.
I just grabbed a bunch of files and through in a zip, you would have to sort through these to make sense of it.
Post Edited (Todd Chapman) : 12/14/2009 3:24:42 PM GMT
I was working on a PASM driver for a stepper motor over the weekend and considered adding acceleration and deceleration modes -- is this a desirable feature?
It all depends what you want to do but for CNC or applications where you want high performance acceleration and deceleration are very desirable. The speeds you can achieve from stand still are much lower than those you can reach after smooth acceleration. Also stopping dead from high speed might mean lost steps and heavy loads (like a router gantry) will not appreciate it mechanically.
Doesn't the CNC software generally take care of ramping up and down? I can see that as an issue for a stand-alone system but a PC controlled system would have accel/decel in the output already I would think.
This is the issue I was trying to highlight a "stepper motor object" can mean a lot of things. I always use commercial drives, I use the propeller for stand alone pulse generation, those talking about g-code interpretation do too.
Comments
I would find a simple Gcode program very helpful in some projects I have been working with.
I'd like to see this too
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Rudy's CNC Freeware·· http://www.enter.net/~schleinkofer
Yes Graham, it is interpolative , 5 axis motion.
If this looks like a good object for the exchange, I'll post it there.
Ken
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
" Anything worth doing... is worth overdoing. "
··············································· ( R.A.H. )
····································
As far as ramping as Ken mentioned, that is a complex issue on CNC's. For other situations where ramping/decel is required on single or multi axis projects that wouldn't really require all moves to be precisely sync'd, I have some Spin code that works well for multi axis operation that I use on my pick and place, so that the moves are all ramped and decel'd with no regard for perfect sync. So, on cutting parts it would not work. If there is an interest I can post it separate.
Also, I can't recall if these were for driving a stepper driver IC (step/Dir only), or if they drove prop pins for bipolar sequencing.
I just grabbed a bunch of files and through in a zip, you would have to sort through these to make sense of it.
Post Edited (Todd Chapman) : 12/14/2009 3:24:42 PM GMT
It all depends what you want to do but for CNC or applications where you want high performance acceleration and deceleration are very desirable. The speeds you can achieve from stand still are much lower than those you can reach after smooth acceleration. Also stopping dead from high speed might mean lost steps and heavy loads (like a router gantry) will not appreciate it mechanically.
Cheers,
Graham
Graham