Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Can´t connect to Relay Module in PXI after Reset

Hello!
I have a PXI-1033 and a relay module (PXI-2564). It work perfect if I turn everything on and run my c program.  The problem is if I of some reason turn the standby button off and wait for a few seconds and then turn it on my C application can´t control the relays? I need to reboot the PC and then it works properly again. If I look in MAX everything is ok.
 
So my question is why cant I control my relays when I have turn rthe PXI off just for a few seconds?
 
My second question is if it´s possible to read the possition of the relay? and how do I do that in C?
 
 
//Anders
0 Kudos
Message 1 of 6
(7,814 Views)

ollsoninc:

The switch driver treats the switch as being in an unknown state if you bring it back from a PXI chassis standby.  You should be able to go into MAX and reset the switch to return it to a known state.  If this fails to work, then most likely the MXI bridge may need to be disabled and then renabled before attempting to reset the switch.  You can do this step from the OS device manager.  The bridge shows up under System Devices -> PCI-to-PCI bridge.

You can call the niswitch.h function called niSwitch_GetRelayPosition() from your C program to get the position of a relay.  The header file is located under C:\Program Files\IVI\Include\.

Brian

0 Kudos
Message 2 of 6
(7,804 Views)

Ok.. thanks!

But I need to do the reset from my visual C application is that possible?

//Anders

0 Kudos
Message 3 of 6
(7,772 Views)

olssoninc:

Yes, you can call niSwitch_reset() to reset the switch from your C program. The function is located in niswitch.h.

Brian

0 Kudos
Message 4 of 6
(7,767 Views)

It is not working with niSwitch_reset()... I have to disable the bridge in my system device.

I must reset the bridge from my C application.

 

//Anders 

 

0 Kudos
Message 5 of 6
(7,759 Views)

olssoninc:

Programmatic disable and re-enable of the bridge is not trivial.  You'll need to call into the operating system to make this happen.  Here are some references that may be helpful:

http://msdn2.microsoft.com/en-us/ms791235.aspx

http://www.experts-exchange.com/Programming/Wireless_Programming/802_11x_Dev/Q_22028057.html

 

Brian

0 Kudos
Message 6 of 6
(7,753 Views)