This VI generates a sine wave for which the frequency and amplitude can be dynamically modified using NI-DAQmx with support for LabVIEW NXG.
By updating the frequency and amplitude controls within the While loop, they can be modified while the VI is running. In order to create a smooth transition from one frequency to another or one amplitude to another, an incomplete sine wave must be modified with an appended section so that the resulting wave after each iteration of the while loop ends at the x-axis.
Steps to Implement or Execute Code:
1. Select a Physical Output Channel from an Analog Output device.
2. Run the VI.
3. Change frequency and amplitude as desired.
4. Click Stop to stop the VI.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.