Is There A Way To Programmatically Activate Offline Mode In TestStand And Select The Offline Simulated Instrument System Configuration File?

Updated Oct 18, 2024

Reported In

Software

  • TestStand
  • TestStand Semiconductor Module

Issue Details

I am currently following this flow Test Stand -> Semiconductor Module -> Enable Offline Mode -> Select System Configuration File to enable the offline mode in TestStand Semiconductor Module (TSM) .Is there a way to programmatically do this?

I am currently using the ''Call executable'' Step to call the 'National.Instruments.Semiconductor.OfflineModeAPITool.exe', but is this something possible using the Call executable step?

Solution

The easiest way to do this is with the the Offline Mode API Tool located here: C:\Program Files (x86)\National Instruments\Shared\OfflineMode\NationalInstruments.Semiconductor.OfflineModeAPITool.exe

You can call this tool from the command line and pass either of the following arguments:

  • /enter <path to offline config file>

  • /leave

For example, to use the offline config file from the Accelerometer example, the call would look like this: .\NationalInstruments.Semiconductor.OfflineModeAPITool.exe /enter "C:\Users\Public\Documents\National Instruments\TestStand 2021 (64-bit)\Examples\NI_SemiconductorModule\Accelerometer\LabVIEW\OfflineModeSystemConfigurationForAccelerometerExample.offlinecfg"

Note that the /leave option does not require a path to an offline config file.

To automate this from TestStand, the Call Executable step type  is the right approach. That step type is effectively the same as using a command prompt, and there is a way to pass command line arguments to the executable.