Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital and Analog Gain in the Script mode

Solved!
Go to solution

Hello.

 

The module 5422 can change the voltage Vp-p in the range of -6 to +6 V.

But when I use the Property Node - Digital Gain, after setting the 1.1 V and return to its previous value (1.0 V) occurs the next error:

 

Error -250035.png

 

And during the generation of a signal with an amplitude of 1.1 V the signal very distorted.

In niFgen Configure Arbitrary Waveform VI there is a parameter Gain to control the normalized signal (as I understand). Is there something similar for the Script mode?

 

niFgen Configure Arbitrary Waveform VI.png

 

How to access the Analog Gain?

And in general, how to correctly use the digital and analog gain in the Script mode?

I apologize for possible errors, but the example is not completed yet.

 

Max O. 

Engineer and software developer,

TeSLa.

0 Kudos
Message 1 of 18
(7,646 Views)
Solution
Accepted by topic author max_i

Hi max_i,

 

From the help file for the Digital Gain property:

 

"Specifies a factor by which the signal generator digitally multiplies generated data before converting it to an analog signal in the DAC. For a digital gain greater than 1.0, the product of digital gain times the generated data must be inside the range ±1.0 (assuming floating point data). If the product exceeds these limits, the signal generator clips the output signal, and an error results."

 

The digital gain requires that the data still be normalized from -1 to 1V.  The "Scale" output of the "Normalize Waveform.vi" here is generally larger than 1, which causes this 250035 error.  If you are looking for the property analogous to the "Gain" input on the "Configure Arbitrary Waveform.vi", I would recommend using the "Gain" property found under the "Arbitrary Waveform" tab in the property node.

 

From looking at your code, it looks like you are trying to generate some pretty standard waveforms (sine signals).  Is that going to change in the future to more complex waveforms?  If not, I would recommend looking at one of the examples in the LabVIEW example finder, I find "Fgen Basic Arb Sequence" to be fairly useful.  If you want to do scripting as well, I'd recommend the "Fgen Arb Script" example.

 

 

Thanks,

 

David B

National Instruments

Applications Engineer

 

 

0 Kudos
Message 2 of 18
(7,631 Views)

Hi, dbell0971.

Thanks a lot for the explain!

 

You mean this property:

 

Gain.png


But it can use in the Script mode?
Requires the generation Waveform only in the Script mode.

What about the Analog Gain?

 

Regards,

 

Max O.

Engineer and software developer,

TeSLa.

0 Kudos
Message 3 of 18
(7,629 Views)

Hi max_i,

 

This property can be used in script mode.  Also, if you read the help files for this gain property and for the "configure arbitrary waveform.vi", you will find that the "gain" input on the VI has the same description as the gain property listed here.  I believe that this is the property you are looking for.

 

Thanks,

 

David B

National Instruments

Applications Engineer

0 Kudos
Message 4 of 18
(7,612 Views)

Hi David,

 

Thanks for the help!
This property is works.

 

Regards,

Max O.
Engineer and software developer,
TeSLa.

0 Kudos
Message 5 of 18
(7,604 Views)

Great, hope your development continues to go well!

0 Kudos
Message 6 of 18
(7,591 Views)

Hi David,

 

There are a few questions.

Gain of the signal from the 3 V and higher leads to distortions.
Please say, why this is happening and how it can be avoided?

 

Gain 6 V.png

 

Thanks,

 

Max O.

Engineer and software developer,

TeSLa.

0 Kudos
Message 7 of 18
(7,588 Views)

Hi max_i,

 

Can you include the voltage levels of the time signal analysis?

 

Thanks,

 

David B

National Instruments

Applications Engineer

0 Kudos
Message 8 of 18
(7,581 Views)

Hi David,

 

I'm sorry!
What did you mean by the "voltage levels"?
Scope Measure?
Thanks,

Max O.
Engineer and software developer,
TeSLa.

0 Kudos
Message 9 of 18
(7,568 Views)

Hi Max_i,

 

The first graph does not have any scale, making it hard to troubleshoot.  Can you include a scale for it?

 

Thanks,

 

David B

National Instruments

Applications Engineer

0 Kudos
Message 10 of 18
(7,563 Views)