Live data capturing AND recording from NI dynamometer in app
4 次查看(过去 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!