LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

having difficulty making sine wave run for long time(20 minutes) in my attached VI.

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.

 

 

 

0 Kudos
Message 1 of 13
(4,057 Views)

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.

*************************************************
CLD
*************************************************
0 Kudos
Message 2 of 13
(4,054 Views)

I tried while loop too but still the same result.

0 Kudos
Message 3 of 13
(4,047 Views)

 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

0 Kudos
Message 4 of 13
(4,044 Views)

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.)

0 Kudos
Message 5 of 13
(4,033 Views)

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.

0 Kudos
Message 6 of 13
(4,030 Views)

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

0 Kudos
Message 7 of 13
(4,011 Views)

Hey

0 Kudos
Message 8 of 13
(3,993 Views)

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.

0 Kudos
Message 9 of 13
(3,978 Views)

Hey 

0 Kudos
Message 10 of 13
(3,953 Views)