09-28-2009 03:42 AM
09-28-2009 08:22 AM - edited 09-28-2009 08:24 AM
If I understand your application correctly, you are opening and closing niSwitch session for every connect you want to make. Please try to limit opening and closing of a session to once per application. Doing so will save you significant amount of time as the initialization is not an inexpensive operation time-wise.
Another benefit from using a single session is that errors like the one you've got (invalid session) should be rare and far apart.
If what you're doing is a single open/close session, and you only loop on switch connects, then yes, you will have to perform a disconnect operation before trying to make the new connection between the same two channels.*
Hope this helps!
* this of course depends on the topology. In general, matrices will allow more than one connection to a row or a column (but still the endpoints must not be the same), while muxes will not. There are no implicit disconnects in a switch session.
09-28-2009 08:00 PM
09-29-2009 08:32 AM