DanaFosmer.com
  • Test Engineering
  • Electrical Engineering
  • Projects and Code
  • Archives
  • About

TestStand - Instrument Handles Update

3/7/2017

0 Comments

 
​I wanted to add something related to my last post. Since I wrote those posts on TestStand I have been through a lot of pain with TestStand and have gained a lot of new experience. The source of the pain has been trying to deploy some TestStand systems into our manufacturing environment. I ran into a problem with the specific technique of providing an alias to an instrument and using it in a deployed system.
 
The situation was I was building TestStand systems in the office and testing the installation on my computers there. I then had to deploy these systems in our manufacturing plant onto computers that were new and newly baselined. As you may know, it can be difficult to test a deployment on a system that has previously had software installed on it. If you uninstall things get left behind and it’s not always possible to easily create a restore point. I’m sure there are solutions to this problem, but I have not dealt with that yet.
 
My test sequence required me to assign an alias to a Keysight instrument in NI-MAX, but MAX was not recognizing the instrument after the deployment. I had installed the Keysight connection expert software and VISA drivers, but I suspect some NI instrument driver didn’t get included in my installation. The main problem is if MAX does not recognize the instrument, there is no way I can assign an alias to it. That means my deployment doesn’t work and I have to install TestStand to modify the sequence file, or I have to rebuild the deployment with the new changes. Well, I didn’t like doing this and found a simple way to avoid having to assign an alias to every instrument I assign.
 
LabVIEW includes a VI called “Find VISA Resource.” See Figure. The Keysight instrument. I wrote a little wrapper VI around this VI to search for the correct instrument, but search in a generic way related to the specific instrument instance (the serial number).
Picture
Figure 1. Example of using "Find VISA Resource" VI.
​If I open up the Keysight (Agilent) Connection Expert software I can see the format of the VISA address and this matches the format string I’m inputting to the Find VISA Resource VI. The string is basically this format for all USB instruments, but the key here is that this instrument’s serial number always starts with “MY” including that plus the search question mark plus wild card should keep this code from finding the wrong instrument. Plus, I don’t expect any other Aglient instruments to be connected to this system. 
Picture
Figure 2. Screenshot from Agilent connection expert - shows VISA address string for USB instrument.
I feel this is a good fix for having to provide an alias in NI MAX. However, I have noticed that this will not work with NI hardware like a DAQmx usb instrument. It shows up like this.
Picture
Figure 3. Example of DAQmx in NI-MAX.
​From what I read here DAQmx does not use at resource string scheme like other instruments. This page and example shows to use this NI-ModInst tool. I have not used it for real, but just looking at it quickly it appears to only find PXI instrument. It is not seeing my USB DAQmx instrument.
Picture
Figure 4. Location of NI-ModInst tool.
Picture
Figure 5. Instrument options that ModInst provides - PXI instruments.
Digging a little more a DAQmx device name can be found with the DAQmx System Property Node. See here.
 
Here is how to get to it and you can see it returns the device name alias. 
Picture
Figure 6. Location of DAQmx System Property Node.
Picture
Figure 7. Use the DAQmx property node to get the device name.
​What you can do with this is make this VI contain a control with the name and send this into TestStand as a variable. All set.
0 Comments

    Archives

    December 2022
    September 2018
    March 2017
    March 2016
    October 2014
    March 2014
    August 2013
    July 2013
    August 2011
    July 2011
    February 2011
    November 2010
    October 2010
    August 2010
    June 2010
    February 2010
    January 2010

    Categories

    All
    Hardware Characterization
    Labview
    Projects
    Python
    Quality
    Test Fundamentals
    Test Hardware
    TestStand

    RSS Feed

    View my profile on LinkedIn
  • Test Engineering
  • Electrical Engineering
  • Projects and Code
  • Archives
  • About