To download NI software, including the products shown below, visit ni.com/downloads.
Overview
The attached VIs allows you to control relays on NI switch modules using their unique relay numbers.
Description
These VIs allow relays to operate by number, rather than by the assigned software names. This could be useful to assign relay positions as part of a large array. This is useful for all topologies, but is especially useful for SPDT relays. Both NI-DAQmx and NI-Switch compatible VIs are provided.
Requirements
Software
LabVIEW 2012 (or compatible)
NI Switch Driver 4.6 (or compatible), or DAQmx 9.6 (or compatible)
Hardware
NI switch module
Steps to Implement or Execute Code
Refer to the NI Switches Help for the valid channel names for your switch module.
I/O Connections Overview:
Refer to the NI Switches Getting Started Guide and NI Switches Help for information about connecting signals to your switch module.
Additional Information or References
NI-Switch Example Block Diagram
NI-Switch Open Close Relay by Number Block Diagram
NI-Switch Look Up Relay Number Block Diagram
Note: This page includes switch code written with the switching palette of the NI-DAQmx driver. In the past, you were able to program NI switches with either the NI-DAQmx or NI-SWITCH driver. As of 2015, the NI-DAQmx switching palette is not recommended for new designs and NI strongly recommends using the NI-SWITCH driver for new designs. For more information, please review the following document: What Drivers Can I Use to Program My NI Switch Modules?
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.