Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to conduct "Self Test" for DAQ card in LabWindows programming at run time

Is there any method by which I can conduct Self test on a given DAQ card by LabWindows programming and get the result at run time?
If No for this question, is there a possiblity to call Self test in MAX through Labwindows program and the get the result at run time (Calling an application in the program)?
 
regards
Sreekantha
0 Kudos
Message 1 of 4
(3,459 Views)

Hello Sreekantha,

There isn't a direct way to call the self-test programmatically, however the self-test is very low level and there are a number of other actions that essentially perform the self-test.  Self-test pretty much checks for communication from the card and to make sure it can correctly identify its model number.  If you are just looking to test the card before you configure a task on the card then I would just skip this step.  If the device can't pass self-test then the code will throw an error when you try to create the task.  I'm not sure of the exact error, but it will be pretty clear that there is an issue--for instance it may say device not found/recognized or that you were unable to establish communication.

If you're looking to perform the self-test without creating a task then I would suggest using either the DAQmxSelfCal function or the DAQmxResetDevice function.  These functions aren't exactly the same as a self-test, but they perform nearly the same actions.

I hope this helps, and if these are not acceptable solutions please post back with more information about your application so that we can figure out a better way to accomplish your goals.

Have a great day!

Brooks
0 Kudos
Message 2 of 4
(3,434 Views)

Hello Brooks,

Thanks a lot for the information.

What exactly I am looking for is, that I would like to have self test executed on this DAQ device on similar lines how other power supplies (they are GPIB devices) perform. For an e.g We have here an HP 6653A, Agilent N6700A power supplies which provide us a  GPIB command "TST?" which would perform self test, of course when this is done power supply resets and on execution of the command, the power supply returns the result as 1: If the test passed or 0: If test failed. Also there is one more GPIB command "SYSERR?" which returns last error which occured and its description in string format to the caller. So I am looking for such function calls even in NI DAQ which can gives more or less equivalent features.

About the self calibration test which you mentioned, I need one more clarification. execution of self calibration would mean that DAQ card is calibrated every time when the command is executed, this would mean all cosntants would vary and would have effect on our application results. This would be an issue right? Also can I know how this self calibration test is similar to self test?

Is it possible to know what is the algorithm(Sequence of operations) implemented in the self test conducted by MAX? Is it possible to call this feature from external application and get the result out by MAX?

regards

Sreekantha S

0 Kudos
Message 3 of 4
(3,425 Views)

Hello Sreekantha,

You are correct, calling the self-calibration every time may not be the best approach.  Instead I would use a DAQmxGetDevProductType to query information from the device.  If you're able to open a session with the device and retrieve information from it then it has essentially passed the same self-test that the Measurement and Automation Explorer implements.  If you check the error status of this function call afterwards you can interpret no error to mean pass and an error to be a fail.

If you're looking for a more through test and you have the LabVIEW Run-Time Engine installed then you could also run the DAQ Diagnostic Utility which actually does a lot of internal routing to actually check the signals.  However, if you want to run this test all cables have to be disconnected from the device which may not be practical if you're doing this during program execution.

Cheers,

Brooks
0 Kudos
Message 4 of 4
(3,408 Views)