LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fourier Series

First of all, I am a new LabView user. But I am curious about signal conversions. Here is what I want to know whether or not LabView has this function for me to practice.
I have a ramp function starts from 0 to 2, with the amptitude of 2, and I want to convert it to discrete time, then display it on the graph.
I hope someone understands what I am trying to do. Converting from continuous time to discrete time, I know that I have to define how many sample I want to sample in one second.
The bottom line is that I am not sure whether or not LabView has this feature for me to explore!
Thank you very much in advance.

Sonny
0 Kudos
Message 1 of 5
(3,728 Views)
Sonny,

LabVIEW ships with a number of functions for signal generation, including a
ramp, as you request--it's a function called "Ramp Pattern.VI." Also, any
function that you generate on a computer will be discrete time by it's
nature.

If what you want to do is acquire a live, analog signal which is a ramp or
some other arbitrary wave, LabVIEW paired with a data acquisition board is
what you need.

--Sam

> First of all, I am a new LabView user. But I am curious about signal
> conversions. Here is what I want to know whether or not LabView has
> this function for me to practice.
> I have a ramp function starts from 0 to 2, with the amptitude of 2,
> and I want to convert it to discrete time, then display it on the
> graph.
> I hope someone understands w
hat I am trying to do. Converting from
> continuous time to discrete time, I know that I have to define how
> many sample I want to sample in one second.
> The bottom line is that I am not sure whether or not LabView has this
> feature for me to explore!
> Thank you very much in advance.
>
> Sonny
>
0 Kudos
Message 2 of 5
(3,728 Views)
I figured out already. Thank you very much. Now, I would like to make a waveform as I will describe below:
From t=0 to t=2 I have a ramp with amptitude of 2, after t=2 the function is at constant (goes flat) until t=4. From t=4 to t=8 I have a Sine waveform. After t=8 the function will stay constant at amptitude of 2 until t=10.
I also have attached an example of what I just described above.
I tried to make a waveform like I described above by using ramp.vi and impulse.vi and sine.vi. I still didn't get it working.
I am teaching myself with LabView. Now, I am stuck. I hope you can help me out.
Thank you very much.
Sonny
0 Kudos
Message 3 of 5
(3,728 Views)
In my opinion you should look at Arbitrary Waveform Generator.vi, an example shipped with LV. You'll find it in Search Examples >> I/O Interfaces >> Data Acquisition >> Analog Output >> Multiple Point (buffered) Analog Output. This example clarifies the basic steps to perform in order to generate a waveform to an output. Basically they are:
. Configure your output(s)
. Write array of data to output(s)
. Start generation
. Close all resources at the end
Regarding your actual question, the main problem is to build the correct array of data describing the waveform you want to generate.
You cannot write to the card and generate such an output in steps: some time will be spent in passing the new vawe to the card, so the output could sligh
tly different from what you expect.
The simplest way to generate a complex waveform is to pass the complete waveform to the daq card before starting the generation, so that there will be no discontinuity in the generation when pattern changes for example from ramp to steady state and the to sine wave and so on. Ramp, impulse and sine vis can help you to build the correct array to pass to AO Write.vi. For the constant-value parts of your signal, simply fill the corresponding part of the array with the same value.
A more complex way could be to update the pattern to generate while it is being outputted. I STRONGLY recommend you to practice in the first way before starting the second one, even at the cost of reducing the sample/sec output rate if necessary.
Hope this helps
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 5
(3,728 Views)
Here's a Vi that draws the waveform you specified. Hopefully this should get you pointed in the right direction. If not, contact me directly...

Mike

mporter@arielcorp.com

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 5
(3,728 Views)