11-04-2010 08:50 AM
I wish to output three waveforms - each will need to be dynamic in frequency and amplitude. I currently use the Simulate Signal express vi which works in so far as I get the waves output however they are not fully continuous. On the oscilloscope I see a number of full wave cycles (depending on the sampling I think), then the signal drops to zero for a short time, and then the next bundle of waves pass through.
I need a continuous wave, which will update in realtime when I edit frequency and amplitude. What is the best way of simulating these signals so that they will be fully continuous and dynamic?
Many thanks to anyone who tries to help!
James
11-05-2010 05:16 AM
Hello James,
When work with the Simulate Signal Express VI, you configure the frequency of the signal, but also the rate at which data points are generated and the number of sample. Configuring the right settings in the menu should improve the signal. I have attached a screenshot with the relevant areas highlighted.
Express VIs are a great way to start working quickly. However, this ease of use sometimes reduces the control you have over the operation itself. Depending on how a While Loop is running with the Express VI, the other code for Analog Generation could be stuttering because not enough, or too many, samples are provided for it.
I have found a VI in the Example Finder which performs Analog Output from a repeating waveform. This uses lower level VIs for all generation which should reduce all the Express VI overhead.
1. Run LabVIEW
2. In the main menu, navigate to 'Help'->'Find Examples'
3. Under the 'Browse' tab, navigate to 'Hardware Input and Output'->'DAQmx'->'Analog Generation'->'Voltage'
4. Open the example VI 'Cont Gen Voltage Wfm-Int Clk.vi'
5. Change the 'Physical Channels' on the Front Panel to your own card and run the code.
If the glitches still appear with this example, then there will be more debugging options.
Best Regards,
11-05-2010 05:33 AM
Thanks for your input. I have now solved the problem, the stuttering was due to a complex case structure in the while loop which allowed me to control when a single one of the outputs was active. I have changed this to a more simple structure based on the Elapsed Time vi.
I'm not too happy using so many express VI's as I feel as though they are not as efficient, but at present the VI does what it is supposed to so I think I will leave it as it is unless some other problems crop up.
Again, thanks for you help.