From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with Timed Loops and DAQ assistant: 5 second signal generator.

Hello all,

 

I am new to labview (I only have 40 or so tutorials under my belt as of now) and I need some help with my 5 second signal generator VI. The VI is supposed to generate a sinusoid at a certain frequency for 5 seconds, and then iterate to a new frequency which is just the sum of the previous frequency and some frequency iteration value (I am using a shift register to do this) and display a new signal at that frequency for 5 seconds, and so on and so forth. My problem is is that when I hook my o-scope to my output port on myDAQ (Ao0), I do not see the signal for 5 seconds. I am trying to use a timed loop and I don't really understand how it works. Furthermore I am contunually plauged by this Error 200290. I have tried to follow the trouble shooting steps but I can't seem to get it to work when I set the DAQ assistant to continuous generation mode. 

 

Thank you.

Download All
0 Kudos
Message 1 of 2
(2,264 Views)

Hi Josh,

 

You do not need to be using a Timed Loop. Timed Loops should only be used if you are running on a real time operating system. It would be best to use the DAQmx functions rather than a DAQ Assistant. Start with the Voltage (non-regeneration) - Continuous Output example and manipulate that to do what you need. Realize that as you change the frequency of the output sine wave, the resolution will change, as the sample rate of the device will remain constant. I might try replacing the while loop with a for loop around the signal generator and DAQmx Write and generating 5 seconds worth of samples in the signal generator.

 

This white paper is an excellent resource for learning how to use DAQmx functions.

Steven Gloor
Staff Customer Engineer - CTA, CLD
0 Kudos
Message 2 of 2
(2,202 Views)