Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I query the NI5411 if it's busy generating a waveform?

Lets say I output a arb waveform with the NI5411 (burst count = 1). It's a waveform that is quite short, and I want the program to wait until it's finished before I continue with other waveforms. I can set a timer in windows that waits (NumberOfSamples/SampleFreq) but its a bit inaccurate. Is there a way to check if the NI5411 has finished its waveform generation?
0 Kudos
Message 1 of 6
(7,176 Views)
PM-5411,

You can use the function
ViStatus niFgen_IsDone (ViSession vi,ViBoolean* done);
to query the 5411 to determine if the waveform generation is finished.

This function will exist regardless of the ADE you are using to program in. Are you using LabVIEW or C?

Hope this helps.

Kevin R
Applications Engineer
National Instruments
Message 2 of 6
(7,176 Views)
Hi Kroth,

That would be what I'm looking for, but I can't find that function. I'm using C, and I searched the whole include directory for any header file with that function prototype but I got no matches.

The lib I am using is VXIpnp\WinNT\lib\msc\niFgen.lib.
Does it exists in the nifgen_32.dll? Where can I find documentation about that DLL?

Thanks

P
0 Kudos
Message 3 of 6
(7,176 Views)
P,

The file should be defined in niFgen.h. What version of NIFGEN are you using? Sounds like you have an older version. The new version will store .h files under C:\Program Files\IVI\Include\ and lib under C:\Program Files\IVI\Lib\msc\
This was a change from VXIPnp\WinNT when IVI version 2.0 was released.

You can download the latest version of NIFGEN from:
http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BE600709777?opendocument

The documentation for all the function calls in the DLL will be installed when you install the driver.

After Installation look for the help file under:
Start >> Programs>> National Instruments >> NI-FGEN >> Documentation >> NI Signal Sources Help

Hope this helps.

Kevin R
0 Kudos
Message 4 of 6
(7,176 Views)
It turned out I had a very old nifgen package. I updated it and found the function in a included help file. I belive this solves my problem.
Actually, the sw engineer that originally wrote the code for our NI5411 application said that it was/is not possible to check wether NI5411 is busy or not... He had an old version of nifgen too... 😃

Thanks a lot!
0 Kudos
Message 5 of 6
(7,176 Views)
Unfortunately, this function only works with the new NI PXI-5421 Arbitrary Waveform Module. The hardware architecture of the NI 5401, NI 5411, and NI 5431 does not provide for a method of checking when generation has been completed.

The best way to answer the original question for a NI 5411 is to generate a marker signal on the last sample of the waveform, and use a digital module and software event determine when the waveform is done. The marker signal is a pulse 8 samples wide.

Jerry L
National Instruments
0 Kudos
Message 6 of 6
(7,176 Views)