i can not read data from serial
Mostra commenti meno recenti
the program is design as follow:
g=serial('com5')
set(g,'baudrate',38400)
g.inputbuffersize=131072
g.outbuffersize=5120
g.outputbuffersize=5120
g.timeout=30
g.readasyncmode='continuous'
g.bytesavailablefcnmode='byte'
g.bytesavailablefcncount=48
g.terminator='cr'
fopen(g)
fread(g,4,'uint16')
com5 is ready,but
Warning: The specified amount of data was not returned within the Timeout period.
I cannot read the data ,please help me
the parameter of g is:
g
Serial Port Object : Serial-COM5
Communication Settings
Port: COM5
BaudRate: 38400
Terminator: 'LF'
Communication State
Status: open
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 1
2 Commenti
Raju Purohit
il 4 Nov 2012
Most possibly because there isn't any data being received.
Chago Rodriguez
il 15 Mag 2013
MuDondong,
How did you resolved your issue. I have the same problem.
Thanks!
Chago
Risposte (1)
Mu dongdon
il 4 Nov 2012
Categorie
Scopri di più su Data Acquisition Toolbox Supported Hardware in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!