niSwitch Get Relay Position Returns Error With Status Code -200202

Updated Apr 18, 2018

Reported In

Hardware

  • PXIe-2527

Driver

  • NI-SWITCH

Issue Details

I'm using a PXIe-2527 and trying to implement the niSwitch Get Relay Position function. I am giving it an input of ch0, but it mentions this is not a valid name. How can I read the position (open or closed) of this channel?

Solution

This function is meant to take inputs to the names of relays, not channels. Different switch modules have different names for relays, so refer to the specification sheet of your specific device to find a hardware diagram of the relay you want to check. The PXIe-2527 has no relays named ch0, thus the error. If you want to know if all relays for that channel are closed, you will need to check each relay in the path between two connection points using a for loop. 

Additional Information

A programmatic way to turn a channel into a relay is to pass in the incremented value of channel number (since index is 1 indexed and channel numbers are 0 indexed) as the index to the Get Relay Name VI . The output (relay name) should then be passed into the Get Relay Position function. 

WAS THIS ARTICLE HELPFUL?

Not Helpful