Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Matlab timeout problem (controlling humanoid robot)

Status
Not open for further replies.

kien123

Electrical
Oct 16, 2005
3
I'm using matlab to control a humanoid comprise of 12 Dynamixel 113 motors. Sometimes I got this error message:

??? Error using ==> serial.fwrite
A timeout occurred during the write operation.

Error in ==> version4_1>sendtomotor at 157
fwrite(s,char(txbuf));

This irritating problem happens not at an exact time interval, sometimes it occurs when I begin to execute the program, sometimes it occurs in the middle or in the end.
Sometimes the program works perfectly, but after that I try to re-run, the problem occurs again.
I try to set the timeout period for the serial port, but it doesn't help.

Btw, I'm using the USB to RS485 serial converter to execute the program.

Anyone encounters this problem before? Wat should be the problem?

Thank you.
 
Replies continue below

Recommended for you

I had a similar problem when using a USB to serial converter. Solved it by writing asynchronously to the port.
Code:
fwrite(serialObj,output,'async')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor