05-13-2022 09:57 AM
Hello all!
I am just starting to learn LabView - sorry if I missed something, but some intensive Googling and trying didn't help unfortunately...
We want to send a square wave through a NI DAQ device (BNC-2090) to the oscilloscope. However each time we enter a new frequency or amplitude (manually or with increment and decrement buttons), it doesn't update the waveform. We have to stop the program and run it again to see the changes.
To simplify the problem, I tried just a simple program like this and the frequency and amplitude values are updated and the graph each time is replotted without the need to stop and start.
However when I try to include DAQ writing in the loop, it doesn't work or stops updating. I tried multiple variations of this:
I have also tried opening the Example VI for continuous analog output (from Help-> find examples) and put everything in a while loop and that didn't work either.
In some similar looking questions this is suggested as the solution: Update Multiple Analog Output DAQmx Channels On-The-Fly - NI Community , however, when I download the example VIs they don't seem to work - no wave is plotted.
Any suggestions on why the above don't work would be greatly appreciated!
Thank you!
05-13-2022 11:21 AM
You definitely don't want to call "stop task" immediately after starting the task. You also do not want the task creation and clearing inside the loop. The last block diagram looks closer to what you want, but I would add a wait in there so it takes a break between all the DAQmx writes.
Are you reading any errors? That might explain why your waveform graph is empty. Also check that autoscaling is turned on.
You mention a BNC device, but that's actually just a breakout board. Are you using a PCI-6110 card, as your last block diagram suggests?