The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: serial I/O: How to make sure that fprintf() is successful
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 22
Registered: 4/19/12
serial I/O: How to make sure that fprintf() is successful
Posted: Aug 21, 2013 4:48 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


When writing to a serial object, I use

fprintf(serialObject, command);

How do I make sure that this operation is successful. It doesn't return anything. When I tried:

count = fprintf(serialObject, command);,

For this, I get an error saying "Too many output arguments".

Most of the times, my first command works, but there are occasions where this fails, so I would like to ensure the success of this write operation.

Any ideas?


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.