02-17-2016 02:16 PM - edited 02-17-2016 02:19 PM
You could do this if you don't mind your DAQmx buffer filling up while it's frozen. In addition, you could add code to check whether freeze is changing value and start/stop acquisition accordingly. Or you could change your acquisition type to be On Demand instead of continuous.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
02-17-2016 02:24 PM
I'm running labview 2012 and can't view the snippet 😞
02-17-2016 02:29 PM
I'm currently dling 2015.
02-17-2016 02:31 PM - edited 02-17-2016 02:32 PM
I see, attached I've made a VI which more addresses your problem - Pause Acquisition (2012). You will want to put your acquisition code in the ["",Default] case of the case structure. I've also included the Freeze Updates VI for your info.
Edit: I don't mean it addresses it more than James, I meant it addresses it more than my previous "Freeze Panel" suggestion 🙂
02-17-2016 02:38 PM
I'm looking at James' vi from another machine. James, in the case stucture...under the true case...it has a ms timer with 100ms constant and the graph leads straight to the measurements VI. So, this stops aquisition and passes what's left in the graph buffer to the measurements VI? How much data does it save?
I'm about to look through yours too Greg.
Thank you guys for the help. I do appreciate it.
02-17-2016 02:38 PM - edited 02-17-2016 02:40 PM
Here's my snippet in 2012 form.
@glskinner84 wrote:I'm looking at James' vi from another machine. James, in the case stucture...under the true case...it has a ms timer with 100ms constant and the graph leads straight to the measurements VI. So, this stops aquisition and passes what's left in the graph buffer to the measurements VI? How much data does it save?
I'm about to look through yours too Greg.
Thank you guys for the help. I do appreciate it.
It's not a graph buffer, it's the graph itself. Since you're writing new data to the graph every time, you're overwriting the previous graph data. This writes the same data that is showing on the graph and since the acquisition is in the other case, the graph isn't changing.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
02-17-2016 02:39 PM
The Waveform graph local variable in James' VI will give you what was last sent to the waveform graph.
02-17-2016 02:53 PM
You guys are awesome. James solution works perfectly...my only complaint is the time it takes for the graph to stop...it seems like once I hit the Freeze button it refreshes the graph once more before stopping...but if I turn the source off and push the Freeze button at the same time, I get my decay.
Greg, your P/C version will come in use later...when I'm building on this program to take automatic readings...I need to get a AO first though.
02-17-2016 02:55 PM
Also, what if I run into buffering problems?
02-17-2016 02:56 PM - edited 02-17-2016 02:57 PM
It will freeze after the current loop finishes acquiring data. This is the nature of you reading a certain number of data points. If you wanted to update faster, you would probably have to use a chart instead and pull smaller groups of samples.
For buffer issues, change your acquisition type to On Demand instead of Continuous. This will work for you as long as you dont care about a sample or two disappearing between each loop.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'