54
« on: August 06, 2009, 05:37:33 PM »
There are two things Mach doing that make it work better than your approach.
The Mach program uses a special driver to allow accurate step motor control, its more tuned for this kind of work than the general purpose Inpout32.dll
I believe Mach buffers step commands at the driver level, meaning that when the Mach application gets blocked for a while by Windows, the driver has a buffer full of commands to work though until the Mach application becomes alive again and fills the buffer back up. This works because the drivers are guaranteed to be serviced at a higher rate than user applications.
Its going to be hard to get accurate step motor control under Windows unless you somehow implement a similar approach. Its doable, but it might be easier for you to use one of the DOS or Linux based real time kernels to implement your program.
If there was a software specification and library available for using the Mach LPT driver it would make the job easier, but I don't think that info is available.
Good luck-
Paul T.