05-25-2016 04:35 AM
Hello everyone,
I need help in collecting the data from a counter input. I have a flow sensor that creates a frequency output up to 600 Hz. I connected it to one counter input on my DAQ device, and in Labview I connected the DAQ assistant to a waveform graph in a while-loop. When I run it, it runs till it is out of samples and then gives error 200284 and then shows the frequency over time on the graph.
However, I would like to see the frequency over time in real time on the graph while it runs, and I also want to have it run continuously until I hit the stop button. Can someone explain how this is done?
Best regards,
Allard
Solved! Go to Solution.
05-25-2016 04:46 AM
Allard,
it would help if you post what you currently have.
I fear that you configured a finite acquisition in the DAQ Assistent, which is not capable to do what you want.
You might want to dig into DAQmx and review examples to understand how to implement contiuous acquisitions which can provide the feature you are looking for...
Norbert
05-25-2016 05:43 AM
Attached is the file of what I currently have. In the same file I also tried to get it to work with DAQmx based on some examples I found, but I have no idea how to get it working.
Allard
05-31-2016 04:56 AM
Hello Allard171,
Have you managed to get your application to work? Could you specify what issues are you having?
Cheers,
Mikko
05-31-2016 07:28 AM
Allard,
you stop the acquistion in the loop. Hence you will acquire a single package (of 1000 samples) and then finish acquisition. After this, the loop runs without delay creating 100% CPU load on one core and essentially doing nothing except waiting for the stop button to be pressed.
Learn about shift registers to store the task and put the Stop Task outside the loop. In the loop, modify the stop terminal of the loop itself to stop if the stop button was pressed OR if an error in acquisition occurred.
Your current implementation will wait for 1000 samples and display this in the graph. The next update will completely replace the old plot. Depending on the speed of acquisition, you will get this behavior (@600Hz about once per 2 seconds). You can do the following:
or
Norbert
06-03-2016 05:52 AM
Thanks for the help!
I now use a single sample on demand in a while loop, and there are no issues anymore.
Also, the waveform chart was indeed what I was looking for.