How do I update data through serial port?
Ältere Kommentare anzeigen
I would like to get input data through serial communication instead of 'for' sentence to provide input variables.
For example,
I opened 2 serial port and communicated serial data through following code.
Computer 1.
s=serial('COM7')
fopen(s)
while(1)
fwrite(s,[0 90 180 270 360]) %pusai(i) input
end
computer 2.
s=serial('COM8')
fopen(s)
a=fread(s)
Like above, computer 2 gets the 'a' serial data having [0 90 180 270 360].
I would like to get the data [0 90 180 270 360] on real-time(continuously) through serial data communication.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Instrument Control Toolbox Supported Hardware finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!