LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA Sine Wave Generator - how to control the amplitude?

HI,

 

I am using dual axis galvano mirrors to scan the sample in raster pattern.

I would like to generate a sin wave with varying amplitudes. lets say i have a list of amplitudes 10, 5 , 2 ,1 .i would like to generate a sine wave with these amplitudes at 250 hz.

 

I need to give generated sine wave to the DAQ.

 

how can I do this ? 

0 Kudos
Message 1 of 7
(3,529 Views)

Need more information about the DAQ you are using.

In Case of 6363 receives normalized signal and has an option of amplitude. This way when you insert the SINE signal you must insert a NORMALIZED signal [-1: 1] into the DAQ in the program and on the output DAQ amplifies it by the value you predefined in the variable.

 

[-1: 1] -> [-5: 5] For Amplitude = 5

 

Hope this helps or are you looking for actual code?

0 Kudos
Message 2 of 7
(3,512 Views)

make a 1-sine and multiply the value by the amplitude

0 Kudos
Message 3 of 7
(3,509 Views)

By default, the Express VI is configured to be "full scale".  So just apply a divider to get the amplitude you actually want.  Alternatively, you could change the settings so the amplitude is 1 and then you apply a multiplier.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(3,505 Views)

I am using Ni 6361 USB DAQ.

 

I have attached the Vi which I have made. now have to give generated sine wave with varying amplitude range between +-10 V so I can control the mirrors to scan the sample in raster pattern.

 

mirrors configured to rotate 0,8V/1 degree.

 

 

In second attachment How can I give the varying values of amplitude from the array to the function generator? 

Download All
0 Kudos
Message 5 of 7
(3,499 Views)

@mi wrote:

In second attachment How can I give the varying values of amplitude from the array to the function generator? 


Move the Function Generator and the DAQmx Write into the inner FOR loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 7
(3,482 Views)

Hi, 

 

I did what you suggested,

 

so just check the VI which I have attached,

In first attachment, I have configured multiple channel via DAQ create channel ,so in total I am using two AO and two AI.

 

In second attachment, I am using two AI physical channel for two channel and same two AO?

 

I made changed in both so please let me if something is wrong 

 

 

 

Download All
0 Kudos
Message 7 of 7
(3,470 Views)