×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Matlab timeout problem (controlling humanoid robot)

Matlab timeout problem (controlling humanoid robot)

Matlab timeout problem (controlling humanoid robot)

(OP)
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.

RE: Matlab timeout problem (controlling humanoid robot)

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')

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources