Effacer les filtres
Effacer les filtres

fread doesn't work

2 vues (au cours des 30 derniers jours)
Gianmarco
Gianmarco le 13 Nov 2013
Hi, I tried to use fread with the little script in the 'help fread' in matlab, using my active COM but I get an error!
s = serial('COM3');
fopen(s);
fprintf(s, 'Curve?');
data = fread(s, 512);
The error is:
Warning: Unsuccessful read: The specified amount of data was not returned within the Timeout period.

Réponses (1)

David Sanchez
David Sanchez le 13 Nov 2013
You are trying to read data that are not available yet. Try with fscanf.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by