How do I update data through serial port?
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Instrument Control Toolbox Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!