Update a Control While VI is Running

Updated Mar 7, 2018

Reported In

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

I am trying to make a VI that continuously outputs a waveform and write it using DAQmx Write. However, I would like to be able to change the amplitude and frequency of the waveform while the VI is running.

Solution

The placement of a control in your VI can have a big impact on the functionality of your VI. In order to continuously control the amplitude and frequency of a waveform, the respective controls must be placed inside the while loop. As the VI executes, all controls inside the while loop can update their value as the loop iterates. In contrast, changes to controls before the while loop can only be read the next time the VI executes. 

Here is an example of incorporating a control inside the while loop and writing with DAQmx Write :

WAS THIS ARTICLE HELPFUL?

Not Helpful