LabVIEW Development Best Practices Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurement Utility Controller for TestStand

Download link: Measurement Utility page and download (download the VIPC file attached to that page)

Please follow the step-by-step instructions at the end of this post for how to get this example working.

This is an initial prototype of an alternative controller for the Measurement Utility that provides a TestStand interface for the measurement abstraction layer.  I am posting this early version to gauge reaction and interest to this type of approach - I want to hear if this is useful and how/if it would be employed.

The goal of this system continues to be to make it as simple as possible to add functionality to an existing system through plugin layers that abstract pieces of a system that are subject to the most amount of changes.  The same template that is installed by the Measurement Utility is used to define a new measurement strategy, which will use abstract hardware interfaces.  Both new meausrements and new hardware devices are plugins that can be loaded by the framework at run-time.  For more information please visit the Meausrement Utility download page or read: Designing a LabVIEW Measurement System with Multiple Layers of Abstraction.

This particular controller provides a very simple interface that is to be called from TestStand.  Shown below are the VIs that would be called from test steps in LabVIEW (an example Test Sequence is included to showcase how).

2013-11-20_21-58-54.png

Which in TestStand looks something like this (this is an included example):

2013-11-20_22-06-32.png

Though the API appears to be synchronous (ie: 'Run Measurement' will block until a result is returned), it still uses a messaging scheme to send commands to and from a running background process (ie: the controller). Commands that must return data (such as 'Run Measurement') encapsulte an un-named queue into the message, wihch is sent to the controller.  The controller handles that message by launching a measurement (or enqueueing it until the resources are available).  When the measurement returns results to the controller, those are then retuned to this API using the unique queue reference.

This simple API is designed to make creating highly-parallel tests very simple (think parallel test steps in TestStand).  The wire that flows between these mehtods is effectively a 'reference' to the running actor (to call it a 'pipe' would be more technically accurate). As a result, this wire can easily be branched to parallel test sequences that can dispatch run commands simultaneously.  The Controller will receive all of these and dispatch measurements as quickly as the necessary resources are available.  Unlike a reference, the data the actor acts upon (ie: available hardware and their settings) is safely encapsalted by the running actor, thereby mitigating the risk associated with delicate timing issues and deadlock that can occur if using a reference directly to data.

The screenshot below is of an included example that illustrates how this API can be used to parallelize message commands. 

2013-11-20_22-03-54.png

Installing required Software

  1. Ensure LabVIEW 2015 and TestStand 2014 are installed
  2. Download and install the Measurement Utility (the vipc file)
  3. (Optional) Download and install the sample hardware and meaurement plugins from the Measurement Utility Page (2x zip files)
  4. Download and install the vip file attached to this page
  5. When installation is complete, select the option to Open Examples
  6. Launch the example sequence file
  7. You will need to change the default search path in TestStand to include the TestStand public directory
    1. In TestStand, select 'Configure >> Search Directories'
    2. Add 'C:\Users\Public\Documents\National Instruments\TestStand'
    3. Select 'Search Subdirectories'
    4. Click OK
  8. You will need to change the execution system from the run-time to the ADE (the VIs are source-only)
    1. In TestStand, select 'Configure > Adapters'
    2. Select LabVIEW and click 'Configure'
    3. Change the radio button to 'LabVIEW Development System'

Setting up the measurements

The measurements that are in the sample sequence file will give you an error that the device is invalid if you attempt to run the sequence without following these additional steps:

  1. Ensure you have sample meausrements and hardware installed on your system (2 options):
  2. Click on the 'Start Controller' step (note that the dialog appears behind TestStand right now - it's a known issue we're working on)
  3. Add the locaiton where Measurements are installed
  4. Add the locaiton where Hardware is installed
  5. Click OK
  6. Click on a measurement and selct 'Configure Measurement'

Known Issues

  • The dialogs that are invoked appear behind TestStand and are not brought to the foreground
  • The load time the first time they're invoked is long with no dialog to the user
Elijah Kerry
NI Director, Software Community
Contributors