Simulating a Switch

NI Switches

Simulating a Switch

Simulate a switch using NI-SWITCH or Measurement & Automation Explorer (MAX) to develop, modify, and/or test an application without hardware. Using a simulated switch to test an application eliminates the risk of hardware damage. Additionally, you can use a simulated switch to evaluate an NI product for which you do not have hardware.

Tip  As with an installed and configured switch, you can use the Switch Soft Front Panel to test the basic functionality of a simulated switch and troubleshoot an application.

NI-SWITCH

Complete the following steps to create and configure a simulated switch using NI-SWITCH:

  1. Run the niSwitch Initialize With Topology VI or the niSwitch_InitWithTopology function.
  2. Set the simulate parameter to Yes/true to ignore the resource name.
  3. Specify the topology of the switch in the topology parameter. Refer to the switch module in Devices for a list of valid topology names.

Alternatively, you can run the niSwitch Initialize With Options VI or the niSwitch_InitWithOptions function.

MAX

Refer to the NI-DAQmx Simulated Devices topic in the Measurement & Automation Explorer Help for NI-DAQmx for detailed instructions about creating simulated switches.