Serial Warning - Unable to Read Any Data
These remedies apply to the case when you receive no data and you get this warning message:
'serial' unable to read any data
When using the Serial interface for:
Reading ASCII (text) data using the
fscanf
,fgets
, orfgetl
functionsReading binary data using the
fread
functionReading binblock data using the
binblockread
function
these are possible causes and remedies:
Cause | Solution |
---|---|
An invalid command was sent to the device, so there is a problem reading the response to the command. | Check your device manual for proper command formatting. |
Your device is connected to an incorrect serial port. | Verify that your device is connected to the specified port. It must
match the port you specify when you create the serial
object. For information about specifying the port, see serial . |
An incorrect write terminator was sent to the instrument before attempting to read data, so there is no data to read. | Verify that the Terminator property is set to the
value required by your device. |
Your device is not configured to send data on the serial port. | Verify the device communication settings. For more information about communication settings, see Create Serial Port Object and Configure Serial Port Communication Settings. |
More Troubleshooting Help
For more information about troubleshooting the Serial interface, including supported platforms, adaptor requirements, configuration and connection, and other troubleshooting tips, see Troubleshooting Serial Port Interface.