High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Error while reading Relay position

Hi,
 
I am using NI Switch 2569. Its initialized properly. When I try to read the status(open or close) of realy using niSwitch_GetRelayPosition(), an error is returned.
I dont know whats the problem, because I feel I am passing the correct parameters to it..
 
I am using it as ;- switchError = niSwitch_GetRelayPosition(vi, "ch0", &relayPosition);
where vi was obtained after niSwitch_InitWithTopology().
 
Thanks & Regards!!!
Vineet Shukla
0 Kudos
Message 1 of 2
(6,004 Views)

Good afternoon Vineet,

Thanks for contacting National Instruments with your issue, we'll try our best to resolve it for you as quickly and efficiently as possible.

It looks like the reason why you're getting an error is you're referring to a terminal (i.e. "ch0") rather than the actual relay.  If you open up your NI Switches Help and in the Contents Tab browse to Devices > NI PXI-2569 and then select the Hardware Diagram, you'll see that for every pair of terminals there is an actual relay name.  So for the Ch0 to Com0 connection, the terminal actually being closed is called K0. 

So if you what to determine the relay position for a specific connection, you'll have to pass the corresponding actual relay name to niSwitch_GetRelayPosition.  In this case, K0 should do it.

Best of luck with your project.

Sincerely,

Minh Tran

Applications Engineering
National Instruments

Message 2 of 2
(5,997 Views)