Simulating a Switch
- Updated2025-06-06
- 1 minute(s) read
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.
To simulate the NI SwitchBlock, refer to Simulating the NI SwitchBlock in MAX.
NI-SWITCH
Complete the following steps to create and configure a simulated switch using NI-SWITCH:
- Run the niSwitch Initialize With Topology VI or the niSwitch_InitWithTopology function.
- Set the simulate parameter to Yes to ignore the resource name.
- Specify the topology of the switch in the topology name 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.
Note Some devices may not support device simulation from MAX.