Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

NIDAQmx: how to programmatically run a self-test on a device?

Under MAX, I can run a diagnostic self-test for each of my devices. Is there some way I can programmatically do the same test in my application (e.g. on startup?) I'm using Visual C and the NI-DAQmx ANSI C develeopment environment.
0 Kudos
Message 1 of 4
(5,072 Views)
There is no DAQmx function call to explicitly run a self-test as Measurement & Automation Explorer does. However, the DAQmx functions will return an error code if the device is not working properly. You can trap the errors with the function DAQmxErrChk() or use DAQmxGetErrorString() to convert an error number to a meaningful error message.
0 Kudos
Message 2 of 4
(5,060 Views)
This answear is bit older, so is it still valid?

I need exactly the same.
I need to run Self-test on NIDAQmx devices from VC++
0 Kudos
Message 3 of 4
(4,525 Views)

Hi michal,

There is still no simple self-test function in the DAQmx API. I agree with Alan that the best way would be to use error handling to see if the system is functional. If communication with your device cannot be established, it will end the program and it will let you know what went wrong (which is what you probably want).

Regards,

Kent

0 Kudos
Message 4 of 4
(4,496 Views)