From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

swept sine with ramping amplitude on NI 5411

I need to generate a sweeping sinusoid starting at 1 volt p-p, 1 kHz ending at 12 volts p-p, 12 kHz and impose a second sweeping sinusoid starting at 4 volts p-p, 12 kHz ending at 2 volts p-p, 72 kHz. The sweep time is required to be between 1 to 5 minutes; repeated for 2 hours. How can I do this using LabView and the NI 5411 arb card?
0 Kudos
Message 1 of 17
(10,039 Views)
Hi Voda,

1) Make sure the load driven by the arb card is high impeadance so you can get the 12V p-p you need.

2) Figure out how many samples you need in each period when the signal gets up to 12kHz. Use this as your sample rate.

3) Use the sample rate from #2 to figure out how many samples are in "1 to 5 minutes". Make sure the arb board has this much memory. If not, buy more, or re-eval work in step #2.

4) Create the entire 1-5 minutes of output values and load it into the arb-board.

5) Start the arb board in continuous generation mode.

6) After 2 hours, stop the board.

This answer is intended to give you a general idea of how to do what you have asked. If you more specific questions, please reply to this answer or post another question to this
list.

Just trying to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 17
(10,032 Views)
See my answer to your other posting.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 17
(10,031 Views)
Dear Yoda,

Thank you very much for using the National Instruments Developer Zone.

The most efficient way of performing the operation you need, the sweeping sinusoid
with variable amplitude is to use the NI-5411 in a operation mode called "Arbitrary Sequence"
only the NI-5411 supports this mode because it is a arbitrary waveform generator, this option
is not valid for the NI-5401 because it only supports DDS mode.

The Idea of the "Arbitrary Sequence" is that you can download to the memory of the card diferent
waveforms and then define the order in which the waveforms will be generated and also to control
many loops of the waveform will be generated for each cycle. You can also define Markers for
each sequence meaning that the teh ARB will generate an output trigger for each new sequence that initiates.

You have also program the "Trigger Mode" that will allow you to generate the signal for
the specific time you need. The best trigger mode for this application is "Continuous Trigger Mode"
The board after receiving the trigger will generate the waveforms continuously in sequence until
you halt the generation.

The general idea of the necessary coding would be the following:

1 - Initialize the board - niFgen Initialize.vi
2 - Create the Waveforms

For this stage the scale of the waveforms will define the amplitude and the number
of points of the stage will define the frequency of the waveform, remember that there
is a minimum of 256 points per stage and the number of points must be multiple of 8.

As the board operates at a single update rate the number of points that you use to define a single
period will define the frequency of this specific segment. For example, if I need a specific sequence to be
a 352 Hz sinusoidal waveform and I am using an update rate of 40 Mhz, the number of points that I need
to use to define the period is 40,000,000/352 = 113636.36 points in that case you would need to use 113636 point
to define the period and the waveform would have 352.001126 Hz what is pretty good.

You can load up to 5000 different segments or stages to the device's memory but you can use
only 292 links, so for example if you want to sweep from 10 to 1000 Hz the maximum number of steps
that you would get is 292 providing a frequency increment of 3.39 Hz.

3 - Load the waveforms to the memory - If you have LabVIEW use the function niFgen APP Load Bin16 Waveforms.vi
If you are using a Text-based programming Language
niFgen_ClearArbMemory - To clear the ARB Memory
niFgen_CreateBinary16ArbWaveform - To create the Waveforms in the memory

4 - Create the Arbitrary Sequencies with the Waveforms loaded in the board's memory

5 - Initiate the generation

6 - Close when generation is finished


This process is a little bit complex because the amplitude change information will be associated with
the scale of the loaded waveform and being so the user does not have to worry about changing the
amplitudes along with the frequency sweep.

Another possible option is simply to configure the board to generate a sinusoidal signal continuously
and then change the frequency and amplitude on the fly using properties modes.
Definetely this is not recommended because it will introduce singularities or discontinuities in your
signal but it can be acceptable if sweeping frequency is low, for example doing the whole sweeping in 1 to 5
minutes, and is is not necessary to change the frequency or amplitude constantly or rapidly.

The LabVIEW example "niFgen Arb Sequence Example.vi" that is installed with the NI-FGEN driver is a very good
example to understand the process of creating ARB sequence aplications.

Best Regards,

Omar De Andrade
Applications Engineer - Computer Based Instruments
www.ni.com/support
0 Kudos
Message 4 of 17
(10,031 Views)
Dear Yoda,

Thank you very much for using the National Instruments Developer Zone.

The most efficient way of performing the operation you need, the sweeping sinusoid
with variable amplitude is to use the NI-5411 in a operation mode called "Arbitrary Sequence"
only the NI-5411 supports this mode because it is a arbitrary waveform generator, this option
is not valid for the NI-5401 because it only supports DDS mode.

The Idea of the "Arbitrary Sequence" is that you can download to the memory of the card diferent
waveforms and then define the order in which the waveforms will be generated and also to control
many loops of the waveform will be generated for each cycle. You can also define Markers for
each sequence meaning that the teh ARB will generate an output trigger for each new sequence that initiates.

You have also program the "Trigger Mode" that will allow you to generate the signal for
the specific time you need. The best trigger mode for this application is "Continuous Trigger Mode"
The board after receiving the trigger will generate the waveforms continuously in sequence until
you halt the generation.

The general idea of the necessary coding would be the following:

1 - Initialize the board - niFgen Initialize.vi
2 - Create the Waveforms

For this stage the scale of the waveforms will define the amplitude and the number
of points of the stage will define the frequency of the waveform, remember that there
is a minimum of 256 points per stage and the number of points must be multiple of 8.

As the board operates at a single update rate the number of points that you use to define a single
period will define the frequency of this specific segment. For example, if I need a specific sequence to be
a 352 Hz sinusoidal waveform and I am using an update rate of 40 Mhz, the number of points that I need
to use to define the period is 40,000,000/352 = 113636.36 points in that case you would need to use 113636 point
to define the period and the waveform would have 352.001126 Hz what is pretty good.

You can load up to 5000 different segments or stages to the device's memory but you can use
only 292 links, so for example if you want to sweep from 10 to 1000 Hz the maximum number of steps
that you would get is 292 providing a frequency increment of 3.39 Hz.

3 - Load the waveforms to the memory - If you have LabVIEW use the function niFgen APP Load Bin16 Waveforms.vi
If you are using a Text-based programming Language
niFgen_ClearArbMemory - To clear the ARB Memory
niFgen_CreateBinary16ArbWaveform - To create the Waveforms in the memory

4 - Create the Arbitrary Sequencies with the Waveforms loaded in the board's memory

5 - Initiate the generation

6 - Close when generation is finished


This process is a little bit complex because the amplitude change information will be associated with
the scale of the loaded waveform and being so the user does not have to worry about changing the
amplitudes along with the frequency sweep.

Another possible option is simply to configure the board to generate a sinusoidal signal continuously
and then change the frequency and amplitude on the fly using properties modes.
Definetely this is not recommended because it will introduce singularities or discontinuities in your
signal but it can be acceptable if sweeping frequency is low, for example doing the whole sweeping in 1 to 5
minutes, and is is not necessary to change the frequency or amplitude constantly or rapidly.

The LabVIEW example "niFgen Arb Sequence Example.vi" that is installed with the NI-FGEN driver is a very good
example to understand the process of creating ARB sequence aplications.


Best Regards,
Omar De Andrade
Applications Engineer - National Instruments
0 Kudos
Message 5 of 17
(10,031 Views)

Hi,

 

I am using PXI 5401 to generate a constant frequency sine with a amplitude sweep.Im using the property node to sweep amplitude.The amplitude sweep works,but I see that the signal goes to zero/resets randomly.

Any alternative suggestions to avoid the reset?

 

Regards

kmh

0 Kudos
Message 6 of 17
(9,630 Views)
Hi kmh

The "random" zeroes likely occur when the change in amplitude causes a mechanical relay to switch inside the NI 5401 in order to select a different amplifier/attenuator analog path setting. Using a 5401, there is no good way to change the amplitude of a signal on-the-fly (while generation is in progress) without getting these type of glitches.

Using one of the newer function generators (NI 5402 or NI 5406), you can use the Digital Gain property, which allow you to multiply the digital data going to your DAC, giving you the ability to change amplitude without the glitches inherent in changing analog path configuration (at the expense of DAC resolution, of course).

Hope this helps!

Marcos Kirsch
Signal Generators SW R&D
Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 7 of 17
(9,622 Views)
Hi,
 
That is sad!We cant afford another signal generator now!
 
I basically need to record time waveforms as the voltage amplitude of a constant frequency sine is swept.
Is there any way I can circumvent the problem to realise my objective?
 
Many Thanks
 
Regards
kmh
0 Kudos
Message 8 of 17
(9,620 Views)
If you can get your hands on an Arbitrary Function Generator, you could use Arb Sequence Mode and generate a sequence of sequentially larger sine waves. With a 5401, I can't think of a way around the problem.

Perhaps someone else has more ideas?

Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 9 of 17
(9,614 Views)
Hi,
 
Can I use the user-defined waveform mode on the PXI 5401 to generate my ramped amplitude sine waveform?
 
Regards
 
kmh
0 Kudos
Message 10 of 17
(9,594 Views)