Discrepancy in serial communication from command window vs. Test & Measurement Tool
3 views (last 30 days)
Show older comments
When I create a serial port object using the command window as follows:
device = serial('COM12','BaudRate',9600,'DataBits',8,'Parity','None','Terminator','CR');
it works just fine. But when I try using the exact same settings using the "tmtool" I keep getting the "Timeout" error. So I tried looking the settings in the "Configure" tab in "tmtools" window after I had created and opened the serial object in the command window. I get the following:
For the sake of convenience, here's how it looks like by default:
It appears as though there really no difference between the two when it comes to settings that matter: Baud rate, data bits, parity, and terminator. I did check out the properties which I don't see at default and they don't seem to matter. Can someone please tell me if I'm missing something? Are one of the seemingly unimportant settings making a difference?
By the way, this is a recent problem. I've had no problems using the serial port using "tmtools" in the past. If you're wondering why I care using "tmtools," the reason is that I'm trying to talk to the RS 232 using a Visual C++ forms application. Due to some new hardware, I was forced to migrate from MATLAB to C++. Since I'm no expert on RS 232, I decided I should first debug my problems with RS 232 in MATLAB before moving onto something less convenient.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!