Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DSA C++ API for NI4461

Hi,
 
I have several testers using the NI-4551 card running a Visual C++ application that uses the DSA C++ API to run a Swept Sine wave test.
 
According to NI, the NI-4551 has end-of-life'd and should be replaced by the NI-4461 card.  However, the NI-4461 card is not supported by the DSA libraries.
 
What options do I have?
 
Thanks.
0 Kudos
Message 1 of 10
(5,092 Views)
 

Hi NF1,

From my understanding you are currently using NI-4551 and NI-DSA in your application and would like to know what will change if you move to NI-4461.  You are correct that the NI-4551 has reached its end of life and the recommended replacement is the NI-4461.  The hardware driver that supports NI-4461 is DAQmx.  If you upgraded your application to use the NI-4461 you would have to use the DAQmx function calls to write your application.  This would be the most notable change.

You can download the DAQmx driver for free online at this link.  The driver will include example programs written in C++.  See the DAQmx Readme for the path to the examples.  If you have XP, you can find the DAQmx read me by going to Start>>Programs>>National Instruments>>NI-DAQ>>NI-DAQ  Readme.

I hope this helps!

Regards,

Ima
Applications Engineer
National Instruments
LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
0 Kudos
Message 2 of 10
(5,059 Views)

Hi Ima,

I've taken a look at the DAQmx API and the functionality doesn't seem to include the same ability as the DSA API -- e.g. functions to run a Swept Sine wave analysis and getting magnitude and phase plot responses.  The DAQmx drivers just have basic functions to configure, read, write, etc to the NI4461. 

For the NI4551 card, I use the legacy/traditional DAQ C++ drivers and the DSA C++ drivers.  The DAQmx driver just replaces the legacy/traditional DAQ drivers, but I have not found an equivalent DSA driver upgrade for the NI4461.

Thanks,

Nia

0 Kudos
Message 3 of 10
(5,050 Views)
Hi Ima,
 
Is there a library that supports the NI4461 card that is equivalent to the DSA C++ API that supported the NI4551 card?
 
About a year or so I contacted NI about this issue and was told there wasn't, but I was hoping that since then something may have been developed.
 
If not, I was told that NI could provide a dll that I could call from a Visual C++ application.  Would this be possible?  Specifically I need to run a Swept Sine Test with custom test frequencies, and get the Mag and Phase data.  Ideally the dll would have the same flexibility as the current DSA API functions.
 
 
Thanks,
Nia
0 Kudos
Message 4 of 10
(5,023 Views)

Hi Nia,

You are correct that DAQmx replaces traditional NI-DAQ.  NI-DSA and the old DSA boards are different from NI-DAQmx and the new DSA boards because computers became fast enough to do signal processing in software.  For this reason, the newer DSA boards no longer do on board signal processing.  The new boards focus on acquiring data and the signal processing is now done in software.  The Sound and Vibration toolkit(SVT) was created to do signal processing in software.  This decision was made to benefit customers because it is much easier to upgrade software than hardware. 

That being said, for you to do complex signal processing, you will need Sound and vibration toolkit or measurement suite.  The toolkit is made for LabVIEW.  The measurement suite comes with a Sound and Vibration Assistant that is a stand alone, interactive program that allows you to do signal processing.

In regards to your question, can a LabVIEW DLL containing SVT VI’s be called from C++ project, I do believe this is a possibility.  You would probably need to purchase the SVT and you can follow this Knowledge Base article on how to call a LabVIEW DLL in your C++ project.

I hope this helps!

Regards,

Ima
Applications Engineer
National Instruments
LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
0 Kudos
Message 5 of 10
(5,018 Views)
Hi Ima,
 
From my perspective, I now need to purchase Labview and the Sound & Vibration kit in order to get the same functionality out of the NI4461 card that I got for free from the NI4551 card and the free DSA libraries.
 
I have about 10 testers that use the NI4551 card and the only reason we need to look into the NI4461 card at all is because the NI4551 card end-of-lifed.
 
Would it be possible for NI to provide me with a custom dll that I could use before I decide to buy something that I got for free before? 
 
Thanks,
Nia 
 
0 Kudos
Message 6 of 10
(4,990 Views)
 

We have DLLs for many of the audio measurement functions for C++ as well as systems engineering expertise to help you in the transition.    We have multi-tone, THD+N and other DLLS.   It is possible to build a DLL out of the SVT functions and export the measurements that you need.Send me an overview of your application and the functionality that you are looking for and I would be happy to help. 

0 Kudos
Message 7 of 10
(4,976 Views)

Hi Kurt,

The tester runs a Swept Sine Test and calculates the natural frequency and resonant rise of the DUT using the magnitude and phase data from the SweptFreqAxis MAGVIEW and UNWRPHASEVIEW.  A list of custom test frequencies is used to run the test.  Each station is able to run a number of different products that require different custom test frequencies, amplitudes, and number of test frequencies.  When a different product is selected, the card is automatically reconfigured by the program. 

As the swept sine test is run, the program polls the card to retrieve the Magnitude data so that the Magnitude plot can be drawn real-time.  If real-time data retrieval is not possible, that's ok.

The test also sends a DC voltage to the DUT to determine its DC gain.  However, I think this part of the test can be done using the existing DAQmx library.

These DSA functions are called :

NIDSA_init(resourceName, IDQuery, resetFlag, &DSAsession);
NIDSA_error_message(DSAsession, rc, errorMessage);
NIDSA_configure_dsa_mode(DSAsession, mode=SWPSINE_MODE);
NIDSA_configure_swept_sine_source(DSAsession, amplitude, autoLevelEnable=0, autoLevelChannel=1, idealRef=1, refLowerDeviationdB=-3, refUpperDeviationdB=3, maxLevel=10, rampingEnable=0, rampingRate=1);
NIDSA_configure_swept_sine(DSAsession, startFrequency, stopFrequency, numberOfSteps, repeat=0, linLog=1, sweepMode=2, autoMaxStep=512, fastThresholddB=1, slowThresholddB=6);
NIDSA_configure_swept_sine_custom(DSAsession, numberOfSteps, pTestFrequencies);
NIDSA_get_swept_sine_status(DSAsession, &sweepStatus, &measurementError, &overload);
NIDSA_set_input_voltage_range(DSAsession, channel, range=VRANGE_10V);
NIDSA_set_input_coupling(DSAsession, channel, coupling=COUP_DC);
NIDSA_configure_source(DSAsession, sourceOn, type);
NIDSA_configure_sine_source(DSAsession, freq1, amp1, freq2, amp2, dcOffset);
NIDSA_check_new_measurement(DSAsession, newMeasurementFlag);
NIDSA_get_measurement_length(DSAsession, type, 0, pNumMeasurements, &realOrComplex);
NIDSA_read_measurement(DSAsession, type, startIndex, numMeasurements-startIndex, view, dbState=DBON, pkrmsUnits=PEAKUNIT, phaseUnits=DEGREES, &x0, &dx, fMeasurements);
NIDSA_close(DSAsession);

The hardware setup is pretty straightforward :

Analog Ouput Ch 0 --> Amplifier IN / DUT input
Analog Input Ch 0 --> Current Probe Output / DUT current input
Analog Input Ch 1 --> Capacitance Probe Output / DUT response

Ideally, as many of the configuration and test parameters as possible would be input parameters to the dll functions so that if the config or test needs to be changed the dll doesn't need to be modified or there don't need to be multiple dll's running.  At minimum, the number of test frequencies, array of custom test frequencies, and amplitude would need to be input parameters.

Thanks,

Nia

0 Kudos
Message 8 of 10
(4,962 Views)
The Sound and Vibration Toolkit for LabVIEW includes a shipping example called sweptsine-daqmx.vi.   You can use this with TestStand.   If you don't want to use LabVIEW or aren't working in a TestStand environment, we can look at the effort required to build a DLL out of the Sound and Vibration toolkit functions and export the measurements as you outline.  
 
This VI performs a swept sine measurement to obtain the frequency response of the device under test (DUT). You specify the source and measurement parameters, and the swept sine VIs handle all the DAQ-specific control required to perform the measurement. You have direct control over the source, input, averaging, and display parameters. You can view the time records of the acquired stimulus and response signals.
 
Feel free to contact me direct with more details about the number of systems you need to upgrade.
0 Kudos
Message 9 of 10
(4,954 Views)
Hi Kurt,

I tried contacting you directly with more details using the email address in your post, but have not received a reply.  Did you receive my email?

Thanks,
Nia


Message Edited by NF1 on 01-31-2008 11:16 AM
0 Kudos
Message 10 of 10
(4,857 Views)