VB6, & Phase output programming
Posted by
pyroware@x...
on 1999-05-27 13:09:51 UTC
More on the Arrick MD2 and the custom programming I am doing for it...
The Arrick MD2 uses software which writes to the parallel port, setting the bits to energise the phases of a unipolar motor in the proper sequence. An array of 8, 4-bit binary sequences is written to the port, motor zero being least significant, and motor 1 the most significant 4 bits, to create half-step motion. The MD2 software is impressive but was written when the DOS 386 machine ruled. I ported a bit of the code but mostly wrote it from scratch using VB4, an interpreted p-code. Performance was better than the MD-2 DOS code, but I was still not thriled with top speeds.
I recently installed VB6 pro, which compiles to native machine code. The same VB4 code, properly compiled by VB6, at least quintupled the top speed... in fact, I have to go in and massage some delay loops to slow it down. Everyone says the cooperative multitasking will cause lost steps and poor performance. I haven't seen it yet.
Anyway, just a heads up to anyone using VB, get the version which properly compiles. Structured, compiled VB is easily on par with C/Cpp as a high-level language.
Kurt
The Arrick MD2 uses software which writes to the parallel port, setting the bits to energise the phases of a unipolar motor in the proper sequence. An array of 8, 4-bit binary sequences is written to the port, motor zero being least significant, and motor 1 the most significant 4 bits, to create half-step motion. The MD2 software is impressive but was written when the DOS 386 machine ruled. I ported a bit of the code but mostly wrote it from scratch using VB4, an interpreted p-code. Performance was better than the MD-2 DOS code, but I was still not thriled with top speeds.
I recently installed VB6 pro, which compiles to native machine code. The same VB4 code, properly compiled by VB6, at least quintupled the top speed... in fact, I have to go in and massage some delay loops to slow it down. Everyone says the cooperative multitasking will cause lost steps and poor performance. I haven't seen it yet.
Anyway, just a heads up to anyone using VB, get the version which properly compiles. Structured, compiled VB is easily on par with C/Cpp as a high-level language.
Kurt
Discussion Thread
pyroware@x...
1999-05-27 13:09:51 UTC
VB6, & Phase output programming
Charles Gallo
1999-05-27 15:28:27 UTC
Re: VB6, & Phase output programming