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: 

Strange Behavior. 2590 Switch and Get relay position vi.

Solved!
Go to solution

I'm trying to read the relay(s) on a PXI2590 1x4 MUX switch so that I fire them only when necessary. I know the names of the relays are MUX01, MUX23 and MUX0123. If I INIT the switch, niConnect Channels, Wait for Debounce, and then Get Relay Position I get a proper reading (Closed or Open). I then call niSwitch Close .vi and the switch remains in this position. 

However if I just call the INIT, niSwitch Get Relay Position and Close vi's seems to reset the switch to some other (default?) value. I've confirmed this behavior using an RF generator and spec analyzer.

Am I doing using these vi's improperly? Should I use the DAQmx driver for this switch instead?

LabVIEW 8.5.1

NI-Switch 3.70.49152

NI-DAQmx 8.7.1f2

NI-PXI-2590

 

 

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 1 of 3
(6,713 Views)
Solution
Accepted by GovBob

Hello GovBob,

 

Correct me if I am mistaken.  First you are calling NI-SWITCH Initialize (not initialize with topology, or initialize with options) and the 'reset device' boolean is unwired? (which means reset = true)

 

Then in one case: calling NI-SWITCH Connect channels, NI-SWITCH Wait for Debounce, NI-SWITCH Get Relay Position, then NI-SWITCH Close (close session, not close relay).  Then physically measuring opens or shorts.

 

In the other case: calling NI-SWITCH Get Relay Position, then NI-SWITCH Close.  Then physically measuring opens or shorts.

 

The results being the second case has all opens (ch0 is connected to com).  This behavior is expected since the 'reset device' flag in any of the Initialize VIs is TRUE if left unwired.  However, if you are physically measuring different values compared to what NI-SWITCH Get Relay Position is returning, then please submit your VIs and a list of steps and measured values for each step.  Hope this helps!

 

-Jordan

Message 2 of 3
(6,704 Views)

Thanks for the reply. Yes the problem was the reset flag during the initialization. Sometimes I can't see the forest for the trees Smiley Wink

 

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 3 of 3
(6,673 Views)