PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

ni 2593 disconnect path in 1 bank only

Hi,

 

I have a system that requires I perform a disconnect on a NI2593 set in the Dual 8x1 mode but only on 1 bank.

 

Here is an example of what I am trying to do.  Say on Bank 0, ch2 is connected to com0, and on Bank 1, ch10 is connected to com1.  I need to be able to disconnect only the connection on Bank 0 (or Bank 1) but not both at the same time as happens when I use the niSwitch_DisconnectAll().  Reason I need to use this function is that it does not assume any prior knowledge of connections, it just clears what connections are present and returns the card back to a state with all paths open.

 

In my test system I have the need to keep the connections made on one Bank while clearing the connections on the other.  I just have not found a way to do this without storing the last connections made so I can recall that and use it to clear the path.  This is not an option unfortunately in my system.  And clearing the whole card is not either.  I need to keep the connection on the second Bank intact while clearing the connections on the 1st Bank.

 

Thanks

0 Kudos
Message 1 of 5
(5,442 Views)

Hi delsescaux,

 

Without any prior knowledge of the connections made, storing and recalling your connections is the only way to reset a single bank.  If your test is repetitious, then we might have some options to consider, but from your explanation, I gather that it is not.

 

0 Kudos
Message 2 of 5
(5,430 Views)

Thanks for the reply.

 

I was wondering when I look at the MAX test panel for the 2593 it shows connections that exist on the card in bank 1 and 2 without prior knowledge, how is this done?  Or are you reading all possible connections to find one that is valid?

 

I was hoping that there was a query command that would return the current connection without having to store the last connection information made on the card bank.

 

Thanks

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

The test panels check the driver layer, where information about existing paths is stored.  After digging around a bit, I have found a couple of methods for accessing that info.

 

The first requires Switch Executive, but presents the best approach -- as you said, a query.  Included in the Switch Executive API is a function called niSE Get All Connections that will return any connected routes in a given session.

 

The second technique is exactly your second thought -- checking each individual connection.  In the NI-SWITCH API, the niSwitch Can Connect Channels VI returns a path capability that will indicate the existence of an established path.  Implemented in a for loop, you could iterate through all channels on the bank.

 

We could pick out the connected channel using this second approach and explicitly disconnect it.  But for the sake of performance, it would be slightly more efficient to use brute force.  We could just use the niSwitch Disconnect Channels VI to explicitly open all channels on a bank.

0 Kudos
Message 4 of 5
(5,407 Views)

Thanks for your quick reply

 

Since I am using LabWindows/CVI and it seems that the function you provided in the first method is a LabView it will not work for my case.  But the second is what I found to work just fine.  I am using the PXI-2593 card and since it only allows for a single connection to a port from another I found that by scanning in a FOR loop through all channels with connecitons to the output (COM-0, or COM-1 also when in Dual 8x1 mode) I can detect the connection that is currently active but since I am calling the disconnect it provides the conneciton information and then disconnects it all in the same call.  I can then drop out of the FOR loop once I detect the connection to help save some time by not checking the other channels since I already know I have found the channel connected to the output.

 

Thanks again..  We can consider this closed 🙂

0 Kudos
Message 5 of 5
(5,403 Views)