Live data capturing AND recording from NI dynamometer in app
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi everyone,
as I'm embarking on quite a large project, and am new to this side of MATLAB, I wanna make sure I take the correct road from the get go.
The goal is to have a MATLAB app that displays a live plot of dynamometer force data (NI and connected directly to the pc), AND incrementaly storing that data in a global variable. As in, I want to plot the dyno data as it comes in, but also store it for later use.
Currently, I am stuck, as I can either live plot OR store it, but not both simultaneously.
That said, I have been looking into background v foregorund and 'readwrite' stuff, but I'm kind of lost there. Any pointers would be great!
Thanks.
댓글 수: 3
Walter Roberson
2022년 8월 6일
The space requirement would be... let's see... making some wild guesses...
I speculate that you will want a precision at least as high as 0.1 rpm, and that you might want to measure more than 6553 rpm, so I speculate that you might not be able to pack the readings into 2 bytes... but maybe you can
format long g
sample_rate = 25000;
number_of_dynamometers = 2; %?
samples_per_dynamometer = 3; %? X Y Z
bytes_per_sample = 4;
run_time = 30 * 60; %seconds
bytes_per_second = sample_rate * number_of_dynamometers * samples_per_dynamometer * bytes_per_sample
bytes_per_run = bytes_per_second * run_time
Gb_per_run = round(bytes_per_run / 2^30,1)
... that would be quite do-able. You could pre-allocate for the largest expected run, or you could use https://www.mathworks.com/matlabcentral/fileexchange/8334-incremental-growth-of-an-array-revisited?s_tid=srchtitle
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Acquisition Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!