11-07-2014 08:00 AM
Hi,
I'm using fgen with a 5402.
Setting Idle/Wait Behavior/Idle/Wait seem to have no effect.
I am using a DC offset, does that override?
Basically I want to stat at 0V, generate a waveform with a DC offset, then go back to 0V.
Macd
11-09-2014 09:13 PM
Idle Behavior is for the digital data going into the DAC, not for the analog path (gain/offset). This is probably what you are seeing. Can you confirm?
11-10-2014 05:15 AM
When I set an offset of say 1V and an amplitude of .2V the output goes to 1V and I get a .2V PP waveform around 1V. When I stop it it, the out put stays at 1V.
It never transitions back to 0V.
Mac
11-10-2014 12:09 PM
Yes, this is expected and correct behavior. Offset is added to the analog signal. What goes to 0 is the digital output from the DAC. If what you need is for the signal to go to 0 V, then set analog Offset to 0 V, and use an arbitrary function where the offset is added digitally.
11-10-2014 12:17 PM
So, if I understand, you mean to use something like the create waveform vi's to generate a data table with the offset.
That means controlling the gain of the 5402 to get the desired amplitude, right?
11-10-2014 01:34 PM
Your device is a Function Generator, not an Arbitrary Waveform Generator. Use this:
http://zone.ni.com/reference/en-XX/help/370524P-01/fgencref/cvinifgen_defineuserstandardwaveform/
11-10-2014 02:24 PM
Ok, so that still needs to get the waveform data from somewhere.
I'm confused. 😕
11-10-2014 02:36 PM
Defines a user waveform for use in either Standard Function or Frequency List output mode.
To select the waveform, set the waveform parameter to NIFGEN_VAL_WFM_USER with either the niFgen_ConfigureStandardWaveform or the niFgen_CreateFreqList function.
The waveform data must be scaled between -1.0 and 1.0. Use the amplitude parameter in the niFgen_ConfigureStandardWaveform function to generate different output voltages.
You will use this function to specify what one period of the function to be generated. The data needs to be between -1.0 and 1.0. In your case, you will pass in a single cycle of a waveform between 0.0 and 1.0 which will be scaled and downloaded to the device. Then you can play with the analog Amplitude attribute in order to change the amplitude of the waveform, but leave offset alone.
Does this help? My advice is you try some of this out so you get an idea of what I'm talking about.
11-11-2014 05:22 AM
I don't think I'm expressing myself well.
You not in your comment after the pasted documentation: "you will pass in a single cycle of a waveform "
My question at this point is how to generate that data that looks like this:
(The wiggle at the top would really be a sine or sawtooth, etc. not my free hand above.)