Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Howto Self-Test devices in NI-Max after powercycle

Hello.

 

How can I perform the "Self-Test" functionality from .NET?

 

For some reason I now after every powercycling of the NI9234 rack (both a 9191 and a 9184) I have to open NI MAX, and perform a self test on each device.

 

It takes a while (matter of seconds) the first time after a power cycle, reexecuting the selftest again is vary fast. There seems to be some software checking happening 🙂

 

So - how can I perform this "Self-Test" from C#.

 

Kind regards

0 Kudos
Message 1 of 2
(5,482 Views)

Hi Larover88.

 

It depends on what NI driver you are using. If for instance you are using the DAQmx driver, you can find the documentation here:
SelfTest Method

In order to call the SelfTest method, you need to create a Device.
Device Class

And in order to create a Device you can use the LoadDevice method.
LoadDevice Method

The final code for performing a SelfTest in DAQmx will look like this:

// Self test
Device dev = DaqSystem.Local.LoadDevice("cDAQ1");
dev.SelfTest();

 

Hope this helps.

 

 

Best Regards

Alex E. Munkhaus
Certified LabVIEW Developer (CLD)
System Engineer
0 Kudos
Message 2 of 2
(5,472 Views)