Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

5402 idle/wait behavior

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

0 Kudos
Message 1 of 9
(6,088 Views)

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?

Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 2 of 9
(6,054 Views)

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

0 Kudos
Message 3 of 9
(6,047 Views)

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.

Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 4 of 9
(6,035 Views)

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?

 

 

0 Kudos
Message 5 of 9
(6,032 Views)

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/

Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 6 of 9
(6,023 Views)

Ok, so that still needs to get the waveform data from somewhere.

 

I'm confused. 😕

0 Kudos
Message 7 of 9
(6,019 Views)

niFgen_DefineUserStandardWaveform

ViStatus niFgen_DefineUserStandardWaveform (ViSession vi, ViConstString channelName, ViInt32 waveformSize, ViReal64[] waveformDataArray);

Purpose

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.

Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 8 of 9
(6,015 Views)

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:

Capture.PNG

(The wiggle at the top would really be a sine or sawtooth, etc. not my free hand above.)

 

 

 

 

0 Kudos
Message 9 of 9
(6,001 Views)