12-21-2012 06:08 PM
Hey Guys,
I need your generous help in making the sine wave run steadly for 20 minutes on top of ramp. I tried hard to make it run for 20 mintues but keept of failing all the time. the attached VI only shows that the sine wave is running for 1 sec. Please help if you can.
I am using Labview 2010 for this.
12-21-2012 06:25 PM
Use a while loop on block diagram. You can place a stop button on front panel to stop the while loop. For loop can be inside the while loop. May want to look at some example under DAQmx that gets shipped.
12-21-2012 06:50 PM
I tried while loop too but still the same result.
12-21-2012 07:04 PM - edited 12-21-2012 07:06 PM
My deadlines for this project is about to be over, some tips for making it happen will be higly appreciated. some modification to my original VI is required
12-21-2012 08:32 PM - edited 12-21-2012 09:46 PM
I don't know what "on top" means, but you appending the signals (ramp and sine) so they will run sequentially. Don't you want to add them?
Why can't you generate the entire waveform once outside the loop, and then just send it to the AO?
(Sorry, I don't have DAQmx installed, so I cannot look at at your output configuration.)
12-21-2012 08:55 PM
Your simulate signal is set for 2000 samples at 1000 Hz. So that is only 2 seconds worth of data. Now you have it in a For Loop that runs 10 times. But that is pointless. It isn't creating 10 times the data, it is calculating the same data over and over 10 times and in the end outputing the data from the last iteration, that 2 seconds worth of sine waveform.
If you want 20 minutes of sinewave, then use a much larger number of samples 1.2 million should do it.(1000 * 60 * 20). Get rid of the For Loop.
12-22-2012 04:54 PM - edited 12-22-2012 05:00 PM
The for loop that i have in there is just a test which is useless. Can you be a bit clear about the another approach? I tried to generate this signal in oscilloscope using DAQ but as you said it is giving me a signal that ramps up and the sinusoidal stays for only 2 sec and ramps down.
How can I modify the same VI to make the sinusoidal run for 20 minutes? The Stimulate Sine signal only will not allow 1.2 million samples. The max. number of samples are 100,000.
Thanks in advance
12-22-2012 05:11 PM - edited 12-22-2012 05:15 PM
Hey altenbach,
My bad for writing on top of ramp. I want the voltage to ramp for 30 sec for some amplitude(say 2 ) and hold it at that amplitude and throw in sinusoidal at the same amplitude which will run continuously for about 20 minutes and than will ramp down. As the VI shows. The for loop in there is just a testing.
This current VI throws in sinusoidal for only 2 second. I tried different approaches to make it run for 20 minutes but keept on failing.
12-22-2012 08:12 PM
Look at the attached.
There are ramp functions for the ramps, and a sine function for the sine wave. With math functions, and not messing with the express VI's which can hide a lot of things, just work with arrays and then use the waveform datatype.
12-23-2012 08:12 PM
Hey RavensFan,
I will run this signal in the oscilloscope and will let you know. Thanks for being so helpful