Re: usbdux for control

Hi Tao,

thanks for looking into it. I've changed my code as you suggested, and 
now I also achieve times of around 5 ms. That's stil a long way from 1 
ms though.

I was indeed using two commands simultaneously. I don't think the board 
gets reconfigured every time, because I do get 1 ms performance on both 
input and output simultaneously. The only problem is that the output 
lags by over 20 ms. If the board was reconfigured every time there was a 
switch between read and write then probably neither input nor output 
would behave smoothly (they do now, the output almost exactly matches 
the input, except for the delay).
With the 5 ms approach, the output is only a rough approximation of what 
I send in.

Thanks,
Michael



Tao Geng wrote:

> Hi Michael,
> 
> I have just looked at your code, it seems that it runs two Comedi_command for 
> read and write alternately. I guess, the problem may be that, every time 
> Command is started, it configures the board, this cost many time. I am doing 
> a work similar to yours with this board, that is, controlling a biped robot 
> walking. I use only one Comedi_command to read sensor signals, and use 
> comedi_data_write to output to the board. The servo update rate is about 5ms, 
> which means that, in 5ms, 7 A/D channels are read, and 4 D/A channels are 
> written. I know, this may be not the fastest way to do input and output with 
> this board at the same time, but it is fast enough for my robot. If you are 
> interested, I can send my code to you. And, you can look at the robot walking 
> movies at my page, www.cn.stir.ac.uk/~tgeng/robot 
> Hope to be of help.
> 
> Regards.
> 
> Tao
> 
> 

Received on 2004-10-14Z18:22:14