How to read from serial port with matlab (timeout problem) ?
11 次查看(过去 30 天)
显示 更早的评论
Dear all,
I want write/read to/from a serial port with matlab, to communicate with a trinamic step motor. I checked that I properly write to the port with port monitor software, but nothing comes out of the port when I attempt to read from it (I just get a timeout, even if I change the time out time to 20 sec). I've looked into the trinamic documentation, but the example they provide (a simple fread) doesn't work.
The point is I manage to read from the port with a Labview "VISA read" VI, but I can't match what this VI does with matlab... And because I'm a rookie when it comes serial port communication, I don't even know where to start...
Any suggestions ?
Thanks !
0 个评论
回答(2 个)
Anusha B
2015-3-17
The cause of the issue may be similar what is mentioned in this link:
One way to check this can be to see if you can read and write to serial port of any other hardware device using MATLAB.
Hope this helps.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Instrument Connection and Communication 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!