LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to switch between continuous acquisition and single acquisition mode

I use Ni's simple state machine example to build a single acquisition DAQ project. The basic state is that the user clicks the start acquisition button - waveform display - waveform saving TDMS - ends and waits. Now it is necessary to change to continuous acquisition mode. The user clicks start acquisition - waveform display - save TDMS - end acquisition task - start acquisition. The whole project needs to switch between single acquisition and continuous acquisition. Please tell me how to do it.

0 Kudos
Message 1 of 4
(710 Views)

@Comp1ex wrote:

I use Ni's simple state machine example to build a single acquisition DAQ project. The basic state is that the user clicks the start acquisition button - waveform display - waveform saving TDMS - ends and waits. Now it is necessary to change to continuous acquisition mode. The user clicks start acquisition - waveform display - save TDMS - end acquisition task - start acquisition. The whole project needs to switch between single acquisition and continuous acquisition. Please tell me how to do it.


 

How about adding Continuous Acquisition button that latches and when someone clicks button - waveform display - waveform saving TDMS - but then if the button is still true just keep repeating until the button is false, then go back to waiting for a button press

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 4
(694 Views)

You mean, when I choose continuous mode, the start acquisition button is only valid when I press it for the first time, and then the button will be pressed automatically or the value will change in the next acquisition. When the stop button is pressed, everything returns to the waiting state. But how can I realize it? I can't think of how to realize it.

0 Kudos
Message 3 of 4
(655 Views)

Without seeing your code there is not much else I can say. But it sounds like you are using a state machine, so it should be fairly straight forward as every acquisition sequence is the same except at the end you either stop and wait for Start Acquisition to be pressed or you just start another acquisition sequence.

 

In fact you should not even need two buttons.  Think about an oscilloscope it is normally in the continuous acquisition mode and you can select Single Sweep mode.   

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 4
(643 Views)