Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

Gain and Offset parameters not working as expected in niFgen

I'm having some issues with the gain and offset input parameters to the niFGen function generator. These parameters do not appear to be working as they are documented, and I want to check to make sure that I'm not overlooking anything.

The Gain parameter is supposed to scale the input signal. The input signal is constrained to be between +1 and -1 V. So by using a gain parameter of 1, the output should be +1, -1. Gain of 2 give +2, -2 (V), and so on... however, I am getting output waveform voltage of +/- 1V with a Gain parameter of .5. If I use a Gain parameter of 1, I get an output waveform of +/-2 V. This does not appear to be opperating correctly.

In addition to this issue, the Offset parameter seems constrained to be less than or equal to half of the value of the gain parameter. If I stay within those boundaries for the offset parameter, the output waveform is offset by the correct amount. If I make the offset to be greater than half the gain parameter, I get an error in niTclk and the signal is not generated.

These problems are preventing me from creating a TTL output waveform. I'm using LEDs to transmit wireless signals and I need to drive them with a waveform between 0 to 5V which I cannot achieve due to the above problems/constraints of these parameters.

Any thoughts on what I might be able to try to overcome these issues?
Thanks,
Matt
0 Kudos
Message 1 of 3
(6,690 Views)
By default, the NI-FGEN driver will assume that the load impedance is matched to the output impedance of the signal generator. You probably have the generator connected to a high-impedance load. The driver is assuming that the load is 50 Ohms, and trying to give you the output voltage that you ask for. Since the actual load is high-impedance, you're getting twice the output you want. You can account for this by changing the Load Impedance attribute (under Output Attributes>>Load Impedance in the niFgen property node in LabVIEW, or NIFGEN_ATTR_LOAD_IMPEDANCE in C). If this attribute is set to your actual load impedance, you will get the correct output voltage. Try 10^9 if it's a high-impedance load.

You can solve your other problem by manipulating your data. Set the gain to be 5, but provide data between 0 and +1, instead of -1 and +1. So the generator will be capable of generating +/- 5 V, but you've only given it data points between 0 and +5. This wastes some resolution, but it works around the offset limitation.
0 Kudos
Message 2 of 3
(6,685 Views)
yep. that was the culprit. I spoke with some people at NI support and we were able to pin that down. Thanks for the tip!
0 Kudos
Message 3 of 3
(6,679 Views)