Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Oct 16, 2005
Messages
3
Location
SG
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.
 
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

Back
Top