Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Pololu serial 8 servo control using Labview

Hi, 

 

I am trying to use a pololu serial 8 servo controller to control 8 servos using labview.  The controller itself comes with software to send commands to use it.  I am essentially trying to replicate that system, but just have it where I am sending a 5 byte command.  The command format requires that i send the 0x80 0x01 0x02 the next two commands are the ones I want to change, the first being the servo number the next being its position.  The command is being sent over the serial port.  I have also attached the vi that I am trying to get to work.  I assume there is an error in the way I am trying to send the commands to the controller.  any help would be greatly appreciated.

Download All
0 Kudos
Message 1 of 5
(4,290 Views)

Hi hyperons,

 

Instead of an array that you are converting to a string, why not just concatenate string commands together and send a string to the device?  That way you can just simply send the text without any conversion that may complicate things.  Give this a try and let me know if you have any further questions!

| Zach J. | Systems Engineer, HIL and Test Cells | National Instruments |
0 Kudos
Message 2 of 5
(4,260 Views)

Your command constant contained much more data than displayed. Intention?

 

I made a small mod that also read the port

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 3 of 5
(4,240 Views)

I included a dial, on every change it will send the new position ... try on own risk

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 5
(4,236 Views)

Hi,

 

I found that I was sending the commands wrong.  I had to put the commands into an array, using decimal numbers, and then convert that to a string to send over the serial port.  I am having issues now though of not being able to command all the servo's simultaneously.  I have a power supply that can go up to 30 amps so I assume that is not the issue.  I can control two servos simultaneously, but I am not able to control more than that, I was wondering if there was an error in the way I am sending the commands.  I have done it as just having 2 strings of the commands, then concatenating them and then sending that over the serial port. I am wondering if anyone has had any similar type problems as this

 

thanks

0 Kudos
Message 5 of 5
(4,213 Views)