I think the idea of using a memory chip and a dedicated controller as a good idea, but I do not think you need to go that mad with the memory as you simply use this as a buffer.
Windows is not gonna give that huge of a delay and even with a small buffer it could handle a delay of a few seconds if not more from the serial or USB port.
With the printer port you are switching Clock lines and direction lines and a small glitch will make the motors run noisey or even pause for a second here and there.
But with the printer port you are sending every pulse of the Step Clock.
Based on the threads and motors I use on my frame, the motors are 1.8 degree with 200 pulses 1 revolution and I use a 3mm thread, so in 1/8 mode then we are talking 533.333 pulses to move it 1mm.
So to move 100mm we are talking over 50,000 pulses over a time period depending on what speed we want to move the motors.
You can now see why Windows has problems.
But the same is not for USB or Serial as all you are doing is sending a command that will tell the Pic Chip to send 50,000 pulses with the pause between steps to get your speed.
So for this example telling your machine to move 100mm via USB or Serial, you are pretty well guaranteed you will not get a glitch or a pause.
The only pause you will get is the time between commands being sent.
The USB buffer has a 64byte buffer and even using this small buffer correctly you can hardly see any pause at all, if any because while the motor is moving the next command is already in the Q.
Now using a small memory chip that is less than $5.00 you can have 540672 bytes of memory that can be shifted in and out of the Pic chip at 256bytes at a time.
You now have a huge buffer, even if you stick to the standard basic Gcode.
G00X000000Y000000Z000000
(resolution of 000.000)
Say 24 bytes for each command that will cover a small enough resolution for most people and you could buffer over 22000 lines at a time.
If you wanted to make sure that you had no interuption at all then the nice thing about these memory chips is that you can read and write 256bytes at a time to each page. So now you could use two low cost Pic Chips, one would sit there collecting data and filling up the buffer and the other would be dedicated to reading the next gcode translating it and moving the motors.
Regards
Sean.
__________________ ********************
http://www.cncdudez.co.uk
Last edited by CLaNZeR; 12-07-2005 at 07:41 AM.
|