11-11-2014 02:44 PM
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
11-11-2014 03:26 PM
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.
11-11-2014 03:29 PM
The waveform graph still show the signal playing. and when I connect an indicator it still monitor the acquired signal (not fixed value)
11-11-2014 05:29 PM
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.
11-11-2014 06:11 PM
How long does it continue to update for?
11-11-2014 07:09 PM - edited 11-11-2014 07:11 PM
@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!