Micro serial servo controller

The Mini SSC II mode is very simple to use, so it might be better to start with, but it also limits you to basic servo operation (8-bit position resolution, full speed motion). Pololu mode is definitely more complicated to use, but has some interesting extra features like higher resolution position commands (which may or may not make a difference to your servos) and smooth speed reduction (which might come in handy for smoother motion).

I would suggest starting with the simpler Mini SSC II protocol. Once you have it working you may find that its all you need, but if you decide you want to try the Pololu protocol features it’s not a big jump from one to the other. I think you’ll find that the real hard part is getting LabView reading the Joystick, building serial strings, and talking to the com port properly. You might want to look at this post, which has a nice simple and clean example of how to run a Pololu servo controller from LabView.

The file “NumtoStr_SubVI.vi” shows you how to build Mini SSC II protocol serial strings out of byte-values. Building a string of byte-valued characters is usually a big stumbling block, as LabView tends to output data as plain-text ASCII bytes (which is NOT what your servo controller wants). If you use this sub-VI, or something like it in your setup, you can switch between the two communication protocols by editing it, without making any changes to the rest of your VIs. The file “ak servo test3.vi” makes use of the string-generating sub-VI, but also shows you how to configure and open a com port, build byte-valued strings from numeric controls and constants, and write your byte-valued strings to the com port.

I would recommend increasing the “Wait Until Next ms Multiple” delay in the servo test3 VI from 10ms to at least 20ms. The servo control signals are generated every 20ms, so with the shorter delay, the program is sending out updated serial commands twice as fast as the servo controller will actually react to them! You might want to push this up further to 50ms or even 100ms, just to keep your serial traffic down. With only a 10ms delay, and three bytes per command, this program is sending out updates almost as fast as the 9600 bps baud rate will allow. If you switch to Pololu mode, which uses longer strings, be sure to increase this delay, or the baud rate (up to 57600 bps in Pololu mode), or both.

-Adam