Duplicate an NI Switch Executive Virtual Device

Updated Aug 20, 2021



  • Switch Executive
  • Measurement & Automation Explorer (MAX)

NI Switch Executive simplifies switch system configuration and increases test performance through the creation of Virtual Devices. An NI Switch Executive Virtual Device contains the configuration information about a switching system, holding definitions and configurations for the switches, channels, hardwires, buses, exclusions, routes, and route groups associated with your switching configuration. To further simplify configuration and decrease development time when multiple identical configurations are required, an NI Switch Executive Virtual Device can be duplicated.

Duplicating A Switch Configuration

When two or more identical NI Switch Executive configurations are required, you can create a single configuration and then duplicate it for one or more additional switches. The following twelve-step procedure requires Microsoft Excel and uses two simulated PXI-2527 switches for illustration.

While Measurement & Automation Explorer (MAX) is open:

  1. Verify that both PXI-switches are listed under DAQmx Devices.
  1. Verify IVI information has been created for both PXI-2527s.

*Note: This happens automatically when a module is added to an NI Switch Executive Virtual Device. If IVI information (driver session, logical name, hardware asset) hasn't been created for one or more switches you wish to use, create a Virtual Device and use that switch module. You can choose to delete that Virtual Device and the IVI information will remain.
  1. Set up the NI Switch Executive Virtual Device for the first switch (i.e. 2527A). Save the Virtual Device.
  1. Right-click on the configured NI Switch Executive Virtual Device you wish to duplicate (i.e. SwitchConfiguration2527A). Select Export to create an .xml file.

  2. Right-click on NI Switch Executive Virtual Devices and select to Create New NI Switch Executive Virtual Device...

  3. Import the .xml file and name it accordingly (i.e. SwitchConfiguration2527B). The Virtual Device will still point to the original switch (i.e. 2527A_ivi).
  1. Once the new configuration has been created, go ahead and close MAX.

After closing MAX:

  1. Export the NI Switch Executive Virtual Device to Excel using the Switch Executive Excel example GenerateExcelReport.xls. The example should open an Excel workbook (i.e. Book1.xls). This example installs by default to C:\Program Files\National Instruments\Switch Executive\Examples\Excel. You can also similarly navigate to this example through the Windows Start Menu.

  1. Use Find and Replace to change the logical name of the first switch to the logical name of the second (i.e. 2527A_ivi to 2527B_ivi). Verify this has been done for every tab (worksheet) of the workbook.
  1. Change the name of the NI Switch Executive Virtual Device (i.e. from SwitchConfiguration2527A to SwitchConfiguration2527B) located in cell A1 of every worksheet.
  1. Import to the NI Switch Executive Virtual Device named SwitchConfiguration2527B in MAX using the Switch Executive Excel example ImportFromExcel.xls.
  1. Reopen MAX. If you want, you can remove original switch from the duplicate configuration (i.e. remove 2527A from SwitchConfiguration2527B). Click on the + to show the devices under the duplicate configuration, right-click the orignal switch (i.e. 2527A_ivi), and select Remove IVI Switch. Select Validate... to verify the configuration works perfectly.