The Shop > Electronics & IC Programing
Motion Controller Design
sparky961:
--- Quote from: Imagineering on December 13, 2015, 02:30:03 AM ---I think, and I may very much be wrong, that a CNC Controller such as Mach3, utilises an Algorithm which calculates the required speed for each Stepper Motor concurrently to finish moving at the same Point at the same time.
Evidence or Documentation I have neither.
--- End quote ---
This would definitely be the easiest way to do it, and the way I've been trying to get working for .... well, far too long without satisfactory results. Mach3, as I know it, is for the most part an open loop controller. There may be some objections to this but even on the forum there are plenty of references to this fact. It is also designed primarily with stepper motor systems in mind. My goal is a well-functioning servo system.
Despite the ease of figuring out motion ahead of time and trusting that it will happen as commanded, I'm not that optimistic. I want to make a system that knows when something goes wrong and either tries to correct it or aborts. Lofty goals, I know.
--- Quote from: chipenter on December 13, 2015, 03:31:14 AM ---Have a look at Arduino it's open source with lots of articals , Mine is a fairly old computer and the com port baud rate is 19200 a second , so from one instruction to the next is a not notisable by eye .
--- End quote ---
My latest development platform has been a trio of Teensy3.0 boards. They are tied into the mess of Arduino commercialization and oversimplification but perhaps without some of the hype (micro rant = off). I've been thoroughly impressed with their capability for such a small package and form factor but have run into a wall with the limitations of USB latency. Not to mention the difficulty of synchronizing multiple axes due to my modular approach. This is why I've begun to favour the central controller that knows what each axis is doing and is able to control each of them "simultaneously".
My development efforts haven't been in vain though. I have a great base for playing with USB controlling external hardware and controlling the position of one servo with encoder feedback..... but this doesn't get me to the finish line: full synchronization of 3 or 4 axes.
sparky961:
--- Quote from: PekkaNF on December 13, 2015, 12:00:49 PM ---You need to google a bit more this article has few concepts at the begining:
http://www.hsmworks.com/docs/hsmworks/2012/en/#StrategyMultiAxisContour
...
Bit like a journey. It's good to to have a plan, but if you follow your initial plan very carefully eyes shut, you are on ditch pretty soon.
--- End quote ---
Good info. Also a good analogy for my past development efforts. I think it's time to take a slightly different path. (Pun intended).
Joules:
Linuxcnc communicates step direction signals in parallel, so all axis can move in harmony no timing problems in that aspect. USB to step direction usually buffers the serial data, then presents it also in parallel. Fancy controllers and servo systems are more complex/expensive and outside my comfort zone.
sparky961:
Any suggestions for a development environment for my next creative push? My current thought is to divide the system into 2 processors.
The first doesn't have any timing critical responsibilities and would handle all the mundane stuff like user IO, display, external communication, storage, etc. A high powered off-the shelf solution like Raspberry/Banana Pi or maybe an Arduino SBC would be cost effective and well suited.
For the second one the choice is a bit harder. I'm thinking 200+ MHz clock speed to get the kind of cycle times I'll need for very fine-grain control of motion. It will need to be all from scratch or run a good RTOS - no fancy operating systems using up cycles on this one. IO will be quite extensive with an estimated 100 digital I/O pins, though not all of them are time critical. Some sort of simple MUX or BUS could be devised for the slow signals. I'd prefer, however, to limit external components even if this means overkill on the processor.
Characteristics that could sway me toward a particular uC or board:
- Motorola/Freescale architecture (familiarity)
- Arduino (slight familiarity, ubiquity - seems to be all the rage, but for how long?)
- Hardware quadrature decoders
- Hardware PWM or D/A
- Existing reference designs
I'm using 6 axes as a basis for design but I'd be very pleased if I were to have success with 3 and thrilled with full coordinated motion of 4 axes. That's going to be how I proceed with the software/firmware but I'd rather not have the hardware impede future development. On the same note by the time I get to that point there's going to be much better hardware around so I might just ignore the other axes. Oh, and really - who the heck has a 6 axis machine to play with?
Working block diagram attached. Did I miss anything obvious?
MrSleepy:
Smoothie is the open source motion controller firmware for Arm cortex cpus (originally a grbl port)... which runs on the smoothie board
A basic description of how it decodes gcode and creates and plans moves is here...
http://smoothieware.org/howitworks
the source code is available on github
https://github.com/Smoothieware/Smoothieware/archive/edge.zip
Rob
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version