05-11-2020 12:13 PM - edited 05-11-2020 12:25 PM
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
Solved! Go to Solution.
05-11-2020 02:12 PM
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.
05-12-2020 03:32 AM
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