For Programmers: Free Programming Magazines  


Home > Archive > Matlab > April 2005 > Serial port Response too slow in Matlab









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Serial port Response too slow in Matlab
Adam

2005-04-25, 4:02 pm

I am having a problem controlling a servo from matlab.
when I send the position data to the servo there is a half second delay
before the servo responds. I have writen a simple controlling program
in basic and the servo responds imediately. Is this a problem with some
setting on the serial port object in matlab. or is matlab just this
slow to send the data out of the serial port? Is the only solution to
write a mex file that opens and controls the port and call that from
matlab. If anyone knows a solution to this problem please let me know.

Brad Phelan

2005-04-25, 4:02 pm

Adam wrote:
> I am having a problem controlling a servo from matlab.
> when I send the position data to the servo there is a half second delay
> before the servo responds.


Are you sure that you are flushing the serial buffer after you write
your data. I'm just taking a guess that that may be a problem.

Brad Phelan
http://xtargets.com
Adam

2005-04-26, 4:04 pm

Thanks alot I think that is it.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com