You can use Instrument Control Toolbox™ to communicate with NI-Switch instruments. For example, you can control a relay box such as the NI PXI-2586 10-channel relay switch.
This feature is available through the Instrument Control Toolbox Support Package for NI-Switch Hardware. Using this installation process, you download and install the following file(s) on your host computer
MATLAB® Instrument Driver for NI-Switch support
National Instruments® NI-Switch driver file
Example that shows how to control an NI-Switch relay switch
You can use this support package only on a host computer running a version of 64-bit Windows® that Instrument Control Toolbox supports.
Installing the Support Package
To install the Instrument Control Toolbox Support Package for NI-Switch Hardware:
On the MATLAB Home tab, in the Environment section, click Add-Ons > Get Hardware Support Packages.
In the Add-On Explorer, scroll to the Hardware Support Packages section, and click show all to find your support package.
To uninstall support packages:
On the MATLAB Home tab, in the Environment section, click Add-Ons > Manage Add-Ons.
To update existing support packages:
On the MATLAB Home tab, in the Environment section, click Add-Ons > Check for Updates > Hardware Support Packages.
For more information about using Add-On Explorer, see Get and Manage Add-Ons (MATLAB).