The Secret Combination to Unlocking AutomationDirect Stepper Motors in LabVIEW

I was working on a radiation leakage test system trying to control a STP-DRV-4850 motor designed to spin an array of D-tect sensors around a unit under test.  I was able to spin the motor using AutomationDirect's utility program, SureStep Pro and everything was looking good, until I tried to send the motor controller serial commands from LabVIEW.

After beating my head against the wall for the greater part of an hour, I finally turned to the Internets for wisdom.  I had exhausted all the usual serial communication suspects:

Read the manual?  Check.
COM port?  Check.
Baud rate?  Check, 9600.
Command format?  Check, working in SureStep Pro.
Reread the manual?  Check.
Termination on writes?  Check, carriage return.

No matter what I tried, I could not get this motor to turn.  I had talked with countless instruments over serial and considered myself an expert.  And now my customer was looking over my shoulder, expecting to see magic.

The first few Google hits covered the usual issues (see above) and I began to despair.  After resorting to the second page of hits (who goes there?) I hit gold with an obscure post on the NI forums from 2011.  Apparently lmtis (Jim) had run into the same problem and went to the effort of hooking up a USB bus monitor.

When AutomationDirect's utility, SureStep Pro, connects serially to motors, it first sends an "HR" command.  I quickly tried it, and sure enough, everything started working.

I'm still not sure what "HR" stands for, but it is the "open sesame" of the STP-DRV world.  And after six years it still hasn't made it into the manual (SCL Commands for STP-DRV-4850 and STP-DRV-80100 Step Motor Drives).

Secret command

Robert Mortensen

Principal Systems Engineer, President

After starting his career at National Instruments supporting, teaching and developing LabVIEW, Robert Mortensen decided he liked using LabVIEW more than making it. So he left NI and worked for integration companies Moore Good Ideas and VPI Engineering while honing his LabVIEW skills and extensive LabVIEW experience and a desire to use his business training, he founded Endigit in 2011. The name Endigit is a compilation of the concepts of engineering and the digital world. It encompasses Robert’s vision for a solid company providing quality services and products.

After years of taking second place, Robert is a three time champion (2016, 2017 & 2018) in the World’s Fastest LabVIEW Programmer challenge held yearly at NIWeek.

Comments

Ryan Smith

January 17th, 2020 at 2:00 pm

Hello, thank you for posting your solution for Labview control of the the Automation Direct stepper, this is very helpful. Did you find the serial communication link to be stable over time? I have had issues with this on other steppers. Also, I'm wondering if you could please share an example VI of your code for sending commands and receiving data from the motor? The number of bits to read can sometimes be tricky to get right, and it is nice to know how others solve the problem. Thanks in advance! -Ryan

Add new comment