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.

Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Get relay position (multiple) with NI-Switch

Hello All,

 

  Working with NI-Switch again to configure multiplexer instrument cards, and noticed a difference between NI-Switch and DAQmx-Switches.  Could someone tell me how to configure the NI-Switch function "get relay position" for multiple relays?  The DAQmx Switches equivalent to this functiion can accomplish it, but I don't see how to do it with NI-Switch.  Please advise.  Thanks.

 

GSinMN

0 Kudos
Message 1 of 3
(5,784 Views)

GSinMN,

 

Unfortunatly, you are unable to call multiple relays using this NI-SWITCH function. Instead try to call this in a for loop. There is a KnowledgeBase Article about this, Get Relay Position, which states "You will have to call this VI repeatedly to get the relay position of multiple relays. To return all relay positions with one call, you can use DAQmx Switch Get Relay Position.vi from the NI-DAQmx API."

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 2 of 3
(5,777 Views)

Hello Frank,

 

  Thaks for letting me know.  I suspected as much.  I did actually already try the DAQmx version to get the position of all relays, but you can't mix handles/references between the two APIs.  Thanks again.

 

GSinMN

0 Kudos
Message 3 of 3
(5,766 Views)