Return to site

Automatically Finding DAQmx Devices

· test,daqmx,test system

I've recently written code that automatically finds DAQmx devices and I thought this example was helpful.

My own version of the code is a little simpler.

My use case is a little different as well. In TestStand, in PreUUTLoop, I like to check that all of my equipment is there. I call the above code for every DAQmx device and then save the Device Name into a FileGlobal for other steps to use in the future. One caveat is that my code makes an assumption that there's only one of any given product; use the first code as a template for finding multiple instances of a product.

I have seen other test systems where there are procedures to always give special names for every device and then the test code checks that those device names work. I think that's a fine way to things as well.

Some ways one could improve these examples:

  • Get the serial number for each product (I like adding the serial numbers to the test report so that we have a record attached to every unit as to how it was tested.)
  • Check the slot number (for CompactDAQ, PCI, PXI)
  • Use something other than a straight String equals function so that it's a little more forgiving for developers who may not capitalize correctly.  (e.g. search the ProductType for "9201" rather than ensuring it's equal to "NI 9201".
All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OKSubscriptions powered by Strikingly