LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generating a sine wave using PXI 5441

How to generate a sine wave using PXI 5441 (Arbitrary Waveform Generator)?

Can anybody post a vi that generates a sine wave with frequency at a user defined frequencies.

Thanks in advance.

 

0 Kudos
Message 1 of 6
(3,354 Views)

There is an example in Help>Find Examples>Modular Instruments>NI FGEN>Standard Function Generation>FGEN Function Generation.vi

that will hopefully get you started. It's available for the 5441.

 

Hope this helps.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 2 of 6
(3,347 Views)

The vi in the examples generates different types of signals. How to display those signals on the front panels. How and where to include graph. I cant figure out.

Thanks for replying.

 

 

0 Kudos
Message 3 of 6
(3,303 Views)

Just an idea you can experiment with. In the inner while loop of the aforementioned vi place a waveform chart. Under Functions>>programming>>waveform>>analog waveform>>waveform generation is a vi called Sine Waveform.vi. Use the same controls for the inputs to this vi as in the example and attach the output to the waveform chart. You'll have to experiment with the sampling info input to get it the way you want. (research the sampling info for the 5441). Remember to save this new vi under a different name.

 

Hope this helps.

P.S. Please include the LabVIEW version you are working with and any appropriate toolkits you have access to in your message.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 4 of 6
(3,297 Views)

Thanks for the reply. I am using labview 8.5 and AWG PXI 5441. The vi which i was working on is Fgen Function Generator. It generates different signals like sine, triangular, Ramp up, ramp down, square etc..

My problem is I cant see the signal on the front panel. I mean display. I know its generating the signal. How to display the signal on the front panel. I tried the way mentioned above. It doesnt work. I am attaching the VI.

Thanks in advance.

0 Kudos
Message 5 of 6
(3,246 Views)

Hi Venki,

 

When using an arbitrary waveform or user-defined waveform, you provide the actual waveform you want to generate to the device, so it is easy to also just connect a graph to the waveform and see what it looks like. Unfortunately, when using standard function generation (which is the method used in this example), you are not providing a signal that is created in software. Because the standard function generation is happening on the FGEN and not in software, there is really no way to display the exact signal without measuring it on a scope or some device. You can, however, simulate the signal in software such that the parameters which are given to the FGEN functions are the same parameters that you use to generate a simulated wave. This would be somewhat complex since you can change parameters such as frequency and amplitude on-the-fly, and also you would need separate functions for each of the different signal types available for the FGEN. You would need to place the software waveform generator in your inner loop and have a waveform graph connected to it in the loop as well to display the signal. The main thing to keep in mind is that this will only be a simulated signal and so it may not exactly match what is being generated (this also depends on how you program the simulation to work). Hope this helps,
Daniel S.
National Instruments
0 Kudos
Message 6 of 6
(3,209 Views)