StepperBoard Class

The "StepperBoard Class" Windows code is a free suite of  VB6 sources which are designed to simplify and standardize communications with Peter Norberg Consulting, Inc. stepper motor controller boards.  It transparently supports the SerRoute subsystem (which allows multiple boards to be connected to one serial port), and allows for a fairly robust method for maintaining synchronization with our products.  It is available both as a direct-link set of Visual Basic 6.0 sources, and as an Active-X component.  As a result, the Active-X version can be called as a 'COM' reference from Visual Studio 2005 based applications. 

We have also released an equivalent version of our StepperBoard class library, rewritten completely using Microsoft Visual C# for the .NET 2.0 (and later) environments.  Please click here for more information.

Please note that this released version of  the library includes a complete manual called StepperBoardClass which documents the entire library; this manual is now installed as part of the standard installation.  Additionally, a copy of the pdf manual is available by clicking this link.

The basic philosophy of the new system is that of "virtualizing" access to the boards.  Instead of having to know how to format each command, the system provides specific high-level entry points which take care of all of the command details, so that the application only needs to know what it wants to do, as opposed to how to do it.  For example, to draw an arc under the NCStepper firmware, you would have to send the following serial stream (maintaining correct synchronization throughout):

  • 25B       -- set "Begin arc angle" to 25 "degroids"
  • 64C       -- Draw 64 line segments
  • 4D         -- Each line segment is 4 "degroids"
  • 64X       -- Center point X is 64
  • 642Y      -- Center point Y is 642
  • 1000A   -- Length of arc is 1000, and draw the arc

You would then have to wait for the arc to complete before you sent your next command.  Under the beta code (using the NCStepper.cls source), the above becomes:

    DrawArc(64, 642, 1000, 25, 64, 4)

and the code includes flags for whether auto-wait is performed, as well as providing for standard "complete test" functions to test for motion done.

The system is fundamentally 2-level.  A base class, "StepperBoard.cls", is created (either by you or automatically by the system) which takes care of all of the low level communications and common error processing.  Your interaction with this class is usually limited to creating it and telling it what com port to use.  You then create as many firmware-specific classes as you have boards connected to that serial line, and tell each of those classes how use the base StepperBoard class to talk to the given board.  From then on, you only use the class associated with a given board to do the actual work.  The "StepperBoard" class is only referenced again when you destroy the classes.

As with all of our sample code, there is no warranty of any form associated with this library -- use it at your own risk!

Always "uninstall" any prior version of our code ('UniversalStepper' or 'StepperBoard') before installing a new version!  The "uninstall features" item is installed on your start menu as part of the standard install.  On XP systems, this can be found under "UniversalStepper->Uninstall Features" or "StepperBoard->Uninstall Features".  On all systems, it can be found in the "Add or Remove Programs" applet (also called "Programs and Features" under Vista) within the Windows Control Panel.  This is the best way to avoid incorrect code being left on your system, and is a more robust method of making certain that the correct Active-X DLL is actually registered with Windows.  If you have modified the sources for your own use, copy them into another directory before doing the uninstall.

Please go to our Downloads page to download the complete system, available only from within the "SetUpStepperBoard.exe" application.