LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generating swept sine wave

Hello

I want to generate following functions in LabVIEW. Can somebody help? User crontrols start and stop parameters which are time, amp, and freq ect..

Thanks

Swept Sine Wave

            Start & Stop Time

            Start & Stop Amplitude

            Start & Stop Frequency (rad/sec)

            Exponent (varies frequency during sweep)

Step

            Start Time

            Start Amplitude

 

Pulse

            Start Time

            Stop Time

            Start Amplitude

Doublet

            Start Time

            Stop Time

            Start Amplitude (half the time the amplitude is positive and half the time the amplitude is negative)

0 Kudos
Message 1 of 16
(4,551 Views)
suni,

I'm curious as to what your end goal for these functions are.  What will you be using these generated functions for?  What version of LabVIEW are you running?  Additionally I have a few questions about each of the four functions you are wanting to generate.

Swept Sine Wave -
Are you just wanting a frequency sweep, or also an amplitude sweep?  Is the exponent how much the frequency sweeps by?  What is the sweep rate - etc.  For the start-stop amplitude, will the amplitude grow/shrink?

Step -
Are you wanting to just generate a step function starting at your set amplitude and keep increasing (like a voltage?).  How much will this increase by?  Or will this be a Sine wave that just appears as steps rather than a smooth wave?

Pulse -
Is this just one digital pulse?  Is the start amplitude just the amplitude of the pulse (how many volts) ?

Doublet -
I am not sure exactly what you are wanting on this one, I am unfortunately not familiar with what this is.


What have you done so far to generate these?  There are sine wave generation VIs and you can change the inputs as the program is running.  Let me know exactly where you are stuck and I will be able to assist you better.
Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
Message 2 of 16
(4,517 Views)

Hi

So far i have created thease waveforms using labview code. I am going to attatched the whole vi for you to take a look. In my vi i have daqmx to aquire 4 external signals. And i am creating my own functions which i call them (PTI- programable test input like pulse ans swept sine wave). I am using loop iteration count compare for time in my pti generation. But is there way to develop thease in exact time. I ment right now when i create a pulse, width of pulse is not exactly the same as i specified. Lets say i want to have pulse exactly .01sec. is there way to do that? Thanks

Download All
0 Kudos
Message 3 of 16
(4,394 Views)
Sorry i forgot to add the main vi in my previous reply. here are the both of them.
Download All
0 Kudos
Message 4 of 16
(4,393 Views)

suni,

 

You could try an independant while loop for this.  I guess I do not fully understand where your problem exists.  Are you talking about the Simulate Arbitrary Signal express VI in the case structure?

Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
Message 5 of 16
(4,373 Views)

Thanks for the reply. Is there a way to start two parallel while loops at the same time? Like you said i moved my PTI generation code to a seperate while loop. I used local varable to to get data from pti to  the other loop. But i cant seem to get simulation time syncronized. My goal is to create pti as same as the daqmx samples the external signal. i set daqmx  to 100s/s and 100samples for cahnnel. is there way to get the same sampling rate for the pti also? I want to syncronize these. Thanks

0 Kudos
Message 6 of 16
(4,359 Views)

suni,

 

Your best bet will be to have some timing VIs or look into some synchronization options for your application.  I would search the forums and LabVIEW Examples for aspects of this.

Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
Message 7 of 16
(4,340 Views)

Hi

I created local variable for pti to get data into to the other loop. But it seems like local varable is not  updaiting at the same time . is this normal for local variable?

Download All
0 Kudos
Message 8 of 16
(4,334 Views)

suni,

 

You should create a smaller piece of code that has a similar architecture to yours, and have a local variable set up the same as you do here.  If you run this on highlight execution you will see what is happening.  The value will be written to the Local Variable as soon as that portion of the code executes.  If this is being read in a different loop, it may read the value before or after you write to it, or it might possibly read significantly slower to miss data points, or significantly faster to duplicate data points.

Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
Message 9 of 16
(4,310 Views)

Thanks for the reply. Like you said when i read local variable in another while loop data points kept on missing for operation? Is there any way i can avoid this?

 

0 Kudos
Message 10 of 16
(4,286 Views)