LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start / Stop daqmx task

Hi,

 

I use the following VI to continuously acquire signal from my ni mydaq. Inside the while loop I turned the mechanical action of the stop button to "Switch when pressed" . When I stop the while loop, the acquiring task dosn't stop and I still can see the signal on the waveform graph.

How can use a single or two buttons to start and stop the signal acquiring process?

Thanks

Daqmx acquire.png

0 Kudos
Message 1 of 6
(3,343 Views)

Why did you change the mechanical action of the stop button?  Buttons really should be a Latch When Released.

 

How do you know the task wasn't stopped?  Are you getting an error?

 

The graph will just show the last set of data that was acquired, so that doesn't mean anything.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(3,313 Views)

The waveform graph still show the signal playing. and when I connect an indicator it still monitor the acquired signal (not fixed value)

0 Kudos
Message 3 of 6
(3,310 Views)

Then your loop hasn't stopped.  That tells me you are not using the button correctly and/or not even pressing the button.  Again, buttons really should be set to Latch When Released.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(3,276 Views)

How long does it continue to update for?

0 Kudos
Message 5 of 6
(3,265 Views)

@natasftw wrote:

How long does it continue to update for?


1 tenth seconds- or more likely1- tenth seconds after the 1-tenth seconds that remainds of the tenth second acquisition you triggered the button press in , (depending on the mechanical action of the boolean) maybe even forever?

 

Upload the code!


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 6
(3,258 Views)