Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

controlling servos simultaneously

Hi,

 

I am using a pololu serial 8 micro controller to control 8 servos simultaneously.  I am sending commands over the serial port.  The approach is to send a 5 byte decimal array that is converted into a string and then sent using the VISA write function.  The array being converted is [128 1 2 servo num position] ex: [128 1 2 0 0].  If I combine two commands into 1 array i.e. [128 1 2 0 0 128 1 2 1 0] then I can get 2 servos to move simultaneously, but if I try to combine 3 commands in one array the controller doesn't respond.  I have also tried splitting up the arrays and then converting them to strings and then concatenating the string, though I get the same error as before.  I was wondering if anyone has tried something similar to this and was able to get it to work.  I am using a 30 amp power supply so I dont think I have problem where I am drawing too much current if I try and run the servos simultaneously. Attached is a vi I am using.

 

 

0 Kudos
Message 1 of 3
(3,104 Views)

How many bits are you using per query? It could be that you are going over the set limit. Could you verify that for us?

 

Regards,

 

 

Daniel G.
Semiconductor & Wireless
National Instruments
0 Kudos
Message 2 of 3
(3,084 Views)

Hi,

 

I am using the visa serial port, and the inputs I have set are 9600 baud rate, 8 bits, 0 for parity error and 1 stop bit.  Hopefully this is what you were asking about, if not please let me know, I am pretty new to this, so I am not entirely sure if that is what you are asking about.

 

thanks

0 Kudos
Message 3 of 3
(3,071 Views)