| Home | DesignFOIL | Purchase | Testimonials | Videos | Links/CNC | News | Fiction | Contact | Airfoil Primer |

| LINKS | STEPPER MOTOR CONTROLLERS |



Serial Port Communication Via Visual Basic

Motor Control

There are two types of motors you can use for robots and automation mechanisms: servo and stepper. Servo motors move until a mechanically attached feedback system tells it to stop. Stepper motors turn a very small angle for each "step" that you tell it to move. For stepper motors, you must either "trust" that both the number of commanded steps and per-step-angle are accountable, or you must provide a separate method to measure if the motor has turned far enough. I've found two control boards that plug into a PC serial port that can be used to control stepper motors. They are made by Pontech and RMV.

Serial-port control of stepper controller external boards with Visual Basic is easy once you see these demos. Throughout my work with these boards, I've learned a great deal about stepper motor motion control with the PC and microcontrollers; digital and analog I/O as well. One such project used an STP100 board from Pontech and an ST400-NT board from RMV, both of which are very affordable and clever devices.

The Demos are at the bottom of this page, but I recommend reading all of this text first!

See what one of my happy customers said:
"John, your VB program for the RMV Controller works great! The source code is well documented and helpful getting results quickly for a VB user as my self. Thanks again!"
Pete Thomas, Purchased RMV Demo/Source in Summer of 2004


Visual Basic Examples For...

Pontech STP100: From QuickBasic To VisualBasic

Back in the old days of QuickBasic, the Pontech board was painfully easy to program. However, it is another beast to set it up in Visual Basic. And the problem has nothing to do with the Pontech board itself, but with the fact that Microsoft didn't find it necessary to include the COM port in VisualBasic! Stop the presses! That's right, unlike QB where you can open a COM port like a file, VB makes it a special control and doesn't include it in any version below "Professional" Visual Basic. To control the Pontech STP100 board from VB, you need at least the Professional version of VisualBasic which DOES include a COM control, but not by default. You have to bring it in after the fact. Once you observe the dumb-bell basics of talking-to and reading-from the COM port in VisualBasic, you will be amazed at how very easy it is. The demo shows you everything EXCEPT changing the main board communication settings. Why? Let me explain with an example: If you magically convince an English friend to talk and listen only in German, then he won't understand a word you say after that as you blab away in English. Equally..... if you "accidently" change the buadrate ON the board, it will no longer listen to you at the old buadrate and all hell breaks loose. Funny how that happens.

RMV ST400-NT: Snatching Visual Basic Victory from the Jaws of C++ Agony

Yes, C++ is very elegant and "real" programmers use it exclusively. But when you're trying to pound out a code that works, works well, and has a simple user-interface, you just can't beat VisualBasic. Unfortunately, the demo for the RMV ST400-NT board is all in cryptic C++. I spent several months converting their C++ declarations into VB code so that I could control the board from VisualBasic. This demo shows how to CONTROL THE MOTORS, singly or as a group, and by joystick!!! But it does not show you how to do the digital I/O or analog Input. A demo for THAT stuff will be coming soon; it is much more advanced. NOTE: The RMV demo doesn't use standard VB COM port communication commands. Instead it uses function calls to the RMV DLL file; the proper setup of which is why the source code CD I'm selling is so valuable to the beginning programmer.

Tech Support & Disclaimer

DreeseCode Software alone will provide basic email support for these demos. Pontech and RMV have no responsibility or liability to support, answer questions, or even talk to you about these... and they won't! USE THESE PROGRAMS AT YOUR OWN RISK! USE THEM RESPONSIBLY! THESE DEMOS are provided AS IS without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. In no event shall DreeseCode Software or any DreeseCode Software employees be liable for any damages whatsoever including direct, indirect, incidental, consequential, physical, loss of business profits or special damages, even if DreeseCode Software has been advised of the possibility of such damages.

VISUAL BASIC DEMO CODE FOR SALE:

I've written two demo programs; one for the Pontech board and one for the RMV board. Each is for sale for $49. When you buy the software, you also get the source code.

To obtain the latest Demo software for either the Pontech STP100 or the RMV400NT board, send me an email at jdreese@dreesecode.com. I will email you the entire installation (about a 2MB file).

For DEMO and SAFETY purposes, the allowed motor amperages have been limited to 100mA. If you would like the complete VB source code for these demos, each one is available on CDROM (within the USA, web delivery everywhere else) from sales@dreesecode.com for only $49. PayPal payment (to ebay@dreesecode.com) is fine. Personally, to learn the absolute basics of VB COM port control I would have gladly paid $500 for these if they existed before!


Programming Guide

Click here to download my custom VisualBasic Programming Guide for the RMV ST400NT board