continue data collection from serial Matlab
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi everyone,
I have a device connected to my laptop by USB (COM3). The device sends data with a sample time of 2 Hz, so every 0.5s
this is what i have so far:
clear all
close all
clc
fclose('all'); % close all open files
delete(instrfindall); % Reset Com Port
delete(timerfindall); % Delete Timers
%% Create a serial object
board = serial('COM3', 'BaudRate', 38400, 'DataBits',8);
fopen(board);
record(board,'on');
fscanf(board)
----> and this is the result:
"09:18",1483.91,-2.07,-1.79,67.7,1.412,-0.61,-0.29,88.5,0.939,"" (this is what the device sends every 0.5s)
But what I want is to continuesly get the data from the device so i can real-time plot each value in a graph for instance.
could someone help me out for i am stuck for al while
Many thanks!!
greets
Paul
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Target Computer Setup에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!