RS485 communication in matlab
27 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Toke Søltoft
am 2 Sep. 2014
Beantwortet: Toke Søltoft
am 2 Sep. 2014
Does matlab support RS485 support via com port? If so, I can't find any guide to how it works.
I have tried this code, but it does not work. If I send the numbers through realterm n RS485, it works fine.
s = serial('COM3','BaudRate',38400);
set(s,'StopBits',1);
set(s,'DataBits',8);
fopen(s);
fprintf(s,'2 7 2 2 255 255 255 248');
fwrite(s,'2 7 2 2 255 255 255 248');
fclose(s)
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Low-Level File I/O finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!