LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is this continuous measurement template asking for the number of samples to save?

Solved!
Go to solution

Hello,

 

I'm quite new to LabVIEW and am trying to produce a VI for long term (weeks to months) continuous measurements of the voltage and temperature of a water electrolyser. 

 

I've been editing the Continuous measurement and logging template for this- but can anyone explain to me why it is that when it comes to logging the data, the template involves asking for the number of samples that need to be saved? (see Log Data.vi as part of the Logging Message Loop.vi)
For continuous acquisition isn't it an endless amount of samples until logging is turned off?

 

My impression so far is that it needs to know how many to save so that it can count down, changing it's logging state to off when the samples left reaches zero- I'm assuming so it doesn't end up trying to log data from an empty queue (would this cause an issue?)

 

I only plan to have logging toggled on and off by the user, not by how much data is available, and I'm not sure we'll ever know how many samples it will be.

So can I remove it, or is it in there for some kind of memory saving or error preventing reason?

 

If it's of any relevance I also don't plan to save to TDMS, just haven't changed it yet

 

Thanks,

Siobhan

 

edit- logging zip alone missing (no so relevant) subvis, so attached whole template too 

0 Kudos
Message 1 of 3
(1,709 Views)
Solution
Accepted by topic author Shiv0921

My guess is that the program doesn't continuously log data so someone doesn't run an example program and fill their hard drive with garbage.

 

In this case, an empty queue shouldn't be an issue because the default timeout of the dequeue operation is -1 meaning it will just sit there until data is available. Even if you want it to eventually timeout you just have to monitor the dequeue's timed out boolean and make sure you don't try to log data if the dequeue operation timed out.

Matt J | National Instruments | CLA
Message 2 of 3
(1,685 Views)

Awesome thanks, didn't want to remove it without understanding why it was there in the first place. I'll carry on without any kind of 'number of samples to save' input then

0 Kudos
Message 3 of 3
(1,629 Views)