From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW command for controlling H/L Select Relay on 2503 Multiplexer

Solved!
Go to solution

Although the first image below is somewhat ambiguous, I believe the single pole double throw switches labeled "H/L SEL" and "1-Wire" circled in red are drawn in the "open" position because all the other switches on the entire diagram are drawn in their "open" state.  Also, the 1x48 topology in NI Max, is the only topology that changes the state of the "1-Wire" switch from open to "closed" as shown in the second diagram.  Closing the "1-Wire" switch enables the positive side of relays 0-23.  But in order to use the negative side of relays 0-23 (essentially 24-47 of the 48 switches available in 1x48 topology), the "H/L SEL" switch must be closed.    What LabVIEW command can I use to close the "H/L SEL" switch?

 

NI 2503 Switch ArchitectureNI 2503 Switch Architecture

 

2503 Multiplexer in the 1-Wire 48x1 Topology

2503_1-Wire 48x1 Mux2503_1-Wire 48x1 Mux

0 Kudos
Message 1 of 4
(724 Views)

You need to know the relay number "Kx" and you can use the niSwitch APIs to control a relay by name.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 4
(722 Views)

I know how to change the state of numbered channels.  I'm asking how to change the state of the H/L SEL relay (see red circles in schematic diagram).

0 Kudos
Message 3 of 4
(654 Views)
Solution
Accepted by topic author skinnedknuckles

Here are a few realizations that helped me figure it out.

 

  1. It's essential to understand the difference between channels and relays.
  2. Channels are like end points or nodes that exist on either side of a relay
  3. A relay is the switch between the channels that can be opened or closed.
  4. This distinction is confused by the fact that some Multiplexers (2503) use the same name for channels and relays (see PXI 2503 image below).
  5. This may explain why other Multiplexers (2527) use the prefix "ch" for channels and the prefix "k" for relays (see PXI 2527 image below).
  6. The H/L SEL relay can be controlled with software but only if you use the correct spelling and case in the text of your command ("hlselect" rather than "H/L SEL" as shown in the schematic diagram).  The correct case and spelling of channel and relay names can be found using NI SWITCH soft front panel (launched from NI MAX) or by calling the "Get Chan Name" or "Get Relay Name" functions in software as I did to generate the list below.
  7. You can make connections across your multiplexer with software commands but you must remember that some functions require channel names as input arguments and other functions require relay names. 
  8. If you're failing to make a connection between to channels check the schematic diagram and see if there is an intermediate connection (or relay) that needs another command to complete the connection.

Channel and Relay names obtained by softwareChannel and Relay names obtained by software

 

You can get Relay and channel names from schematic diagrams but their case and spelling may not work in the text of software commands.

relay and channel namesrelay and channel names

 

Open NI MAX and expand the "Devices and Interfaces" node and the "PXI" node below it.  Select a Multiplexer and click on the "Test Panels" button shown in the image below.  This should open the NI SWITCH soft front panel if it is installed. 

 

Launching NI SWITCH soft front panel from NI MAXLaunching NI SWITCH soft front panel from NI MAX

 

The two tabs named "Schematic" and "Relay" will show the Channel and Relay names respectively including the exact spelling to use when sending software commands to the multiplexers.  Depending on the multiplexer and topology selected, you may not be able to see all of the channel names until you scroll down to the bottom of the list.  To see the default position of the Relays, click on the "Reset" button in NI MAX shown in the image above.  After resetting, the "Relay" tab will show the default position of all relays.

 

Getting the Relay and Channel names from NI SWITCH soft front panelGetting the Relay and Channel names from NI SWITCH soft front panel

You should be able to find example code to control relays and to make connections at the file locations shown below. These helped me figure out how channels and relays work and how to control them with my own software.  Connecting your devices by making connections is simpler because intermediate relays are sometimes closed automatically based on the channels you select.  Making connections by controlling individual relays offers higher flexibility but you must take responsibility for all intermediate relays needed to complete a connection.  Like many things in life, higher flexibility adds complexity and responsibility.

 

C:\Program Files (x86)\National Instruments\LabVIEW 2020\examples\instr\niSwitch\Switch - Controlling an Individual Relay (NI-SWITCH)

 

C:\Program Files (x86)\National Instruments\LabVIEW 2020\examples\instr\niSwitch\Switch - Making Connections on a Switch (NI-SWITCH)

Message 4 of 4
(589 Views)