Labview with Pololu 6ch micro servo controller

So I am trying to use Laview to control the servos with the Pololu servo controller. I can get everything to work with the control center, however for my project at school it’s a requirement to get it to work w/ Labview. So far I have the code generating a PWM, the values I got from the control center however when the program runs it doesn’t seem to communicate with the board. Here’s a picture of the current code, any help is greatly appreciated.


Are you talking about the Micro Maestro 6-Channel USB Servo Controller?

Try setting the serial mode to “USB Dual Port”. Then make sure that Labview is connecting to the Command Port, not the TTL Port.

I don’t know much about Labview, so could you please explain what you expect that code to do, and what it actually does? It looks like you are sending a square wave to a serial port; what is that supposed to do? I don’t see any code there that actually assembles the bytes of a serial command according to the protocol specified in the Maestro User’s Guide; where is the code that does that? Is there any way you can get Labview to report the actual byte values that it sent on the serial port?

–David

In the Simulate Signal tool for Labview all the bytes are assembled there, from your reply I think bytes are not being assembles properly according to the protocol(yes it is the Micro Maestro board). I’m going to try to fix that bytes and make sure its being read as a COM not TTL. I will post w/ updates as I get them

I’m not sure exactly what approach you were taking here, but I’m afraid the VI you’re showing doesn’t do anything except generate a plot of a square wave where you control the duty cycle. You shouldn’t need to do any waveform generation to control your servos though, that’s what the Micro Maestro does!

That’s the VISA serial port configuration bock you have your square wave tied to, which only configures and opens a serial port (it doesn’t actually write data to it). I can’t see what terminal you have your square-wave tied to, but it looks like it’s maybe setting the baud rate or the timeout. I’m also not sure what you were going for by connecting the error output of the VISA block to the conditional test of your while loop, except that it’s the only thing making the loop run (and for that you could just use a constant).

To proceed, I would recommend you look into these three areas in order (your teachers/classmates, this forum and Google will help):

  1. Serial communication in general.
  2. Packet construction and serial port communication in LabView.
  3. One of the three serial protocols supported by the MicroMaestro, described in the User’s Guide.

Good luck, and let us know if you have any specific questions.

-Adam

Adam
I tied the theh wave to the baud rate in an attempt to contol the size of the wave going to the board. I see what your saying about not needing to generating a PWM as the board already generates it. What I’m trying to do is control the signal to control the servos via the wave generator. I checked the serial settings on teh board and inputed those into the VISA serial port and it does recognize which COM port the board is connected to. I guess the real question is how do I write data to that port, I will ask my classmates and google it. Any suggestions would be helpful though

There is an example of controlling the Pololu SMC03A motor controller from LabView in this thread, which you might find helpful.

-Adam

You’re in luck, I just finished a project using the Maestro 6 with LabVIEW. The vi calls the Maestro in serial mini SSC mode. Attached is a simple vi written in LabVIEW 2009 to get you going. You will need LV2009 or better to open it. I’ll attach a picture in case you need to recreate it for an earlier version.

Woops, the extension vi is not allowed on this forum.
You will have to recreate the vi from the picture.

Have fun!

-john


Hello,
I have updated the permissions to allow .vi files. Could you try posting it again? If that does not work, you should be able to upload it as a zip.

-Paul

Here is the example LabVIEW vi for the Maestro 6.
You guys did a nice job on the Maestro 6.

Thanks,

-jm
Maestro 6 SCC Servo Example.vi (14.2 KB)

I wish I had seen this earlier, but again thanks alot it really helps.

could some one tell me if the driver you were talking about (NI-VISA) is free and where I can get it.

VISA (Virtual Instrument Software Architecture) drivers are not free, but they come with LabView and a variety of other National Instruments software packages. You can read some cryptic information about them here.

-Adam

Hello everyone,
I have a Mini Maestro 24 and I am trying to use the “Maestro 6 SSC Servo example.vi”. I have checked my “Servo command port” (COM3 and Baud rate: 9600) so I set up the same in the Labview, I also have chosen the USB chained in the Maestro Control Center. After doing that I have run the program but the servo does not move and the green led does not flicker, looks like it doesn´t get any signal. If I change the COM port to Controller TTL Port the green led flickers but the servo doesn´t move.
The Controller works perfectly using the Maestro control center; therefore I do not know if I am missing something. Any help is greatly appreciated.
Thanks
Jagoba

Hello,

To debug this more, you should probably unplug everything from your Maestro except the USB cable, run your LabView program, and tell us what ALL of the LEDs are doing in detail. The yellow LED will double-blink if it gets a command to set a servo position. Also, run the Maestro Control Center at the same time as your LabView program and pay attention to the sliders on the status tab to determine whether any servos positions are being set.

-Paul

Hello,
I plug only the USB in my maestro and the green led is shining constantly while the yellow led is blinking slowly (more or less one per second). I have setup VISA and Controller Command Port the same and I have chosen the USB chained in the Maestro Control Center.
I run LabView but the maestro´s leds do exactly the same (green led constant and yellow led blinking slowly). I run the Maestro Control Center at the same time as the LabView program and the green led stars blinking fast and the yellow led is blinking slowly (more or less one per second). On the status tab the sliders didn´t change anything (the same position as when the Maestro Control Center is reset).
I have tried before the Pololu USB 16 servo in the same PC, and deleting the command 0xAA from the LabView´s example, it worked fine. I don´t know where is the problem.

I have a similar situation, please were you able to resolve the problem of no response from the micro? LabVIEW can’t find the COM port, even when it’s active on Serial Transmitter.

Many thanks,

Hello,

Are you saying that you cannot even select the COM port in LabView? Have you tried change the COM port for your Maestro to COM3 in the device manager?

-Paul

Hello.

The way you phrased this concerns me. Only one program can access a COM port at a time, so if you are connected using the Pololu Serial Transmitter utility, you will not be able to connect with LabVIEW. Can you make sure nothing is using the COM port before you try connecting?

- Ben