Set Multiple Targets c# via USB

Hello everybody.

I’m new to this forum, but i have been working with my mini meastro for over a year now. I’m trying to use it in a quadrocopter project running c#-
Now i’m trying to improve my update time. I’ve read in some post, that using SetTarget multiple times for many servos can lead to delayed output.

See Set Multiple targets via usb (libusb_submit_transfer)

Is it possible to use set multiple Targets via controlTransfer method?
How can i implement this in c#?

thanks

Peter

Hello, Peter.

Unfortunately, the Maestros do not have a control transfer for setting multiple targets. Your best bet is probably to send commands to the Maestro on its Command Port (one of the virtual COM ports it presents). There is a serial command for setting multiple targets. Be sure to put the Maestro into “USB Dual Port” mode and read the appropriate sections of the user’s guide. You can use the .NET System.IO.Ports.SerialPort class.

–David

Hi

I will try to do it with
libusb_fill_bulk_transfer
as shown in the c example in the mentioned thread. There is a c# wrapper for libusb1-0. Perhaps i can get this to work.

What it the minimum latency i can achive from the time i set the target in my programm until pwm output reacts?

thanks

Peter

The default servo period is 20 ms and the answer depends on when in that period your program chooses to send the command. It should respond within 5-30ms after you send the command.

–David

So when i increase this period via the MaestroControlCenter, the output will be faster? For example i set the period to 5 ms so it will be done in e.g. 5 to 10 ms ?

thanks Peter

Yes, if your servos can handle the faster servo period then that would be a way to get a faster response time from the Maestro. --David