I am using switch executive from with in Teststand to connect matrix & relay routes , for one test I need to control a relay of same switch virtual device from labview. I cannot open another session as already in use by switch executive in teststand. Whether there is any option available to achieve this?
None that I know of...
But to me it makes sense, the session is not allowed to be accessed from different locations
To me, requiring an action like this is an error in test setup / methodology
i haven tried it but i would like to think that you could get the switch executive session reference from teststand and then pass the Testand "context" to labview and get the reference to control a switch for sure.
NI Switch Executive (NISE) supports using two sessions to the same virtual device in a single Windows process (i.e. use the built-in TestStand Switching Step Properties and also using the LabVIEW Runtime Engine Adapter to execute a code module that calls the NISE API).
NISE does not support using two sessions to the same virtual switch device in two or more WIndows processes (i.e. using the built-in TestStand Switching Step Properties and also using the LabVIEW Development System Adapter to execute a code module that calls the NISE API).
If you attempt to use two sessions to the same virtual switch device in two or more Windows processes, the following behavior is expected:
A few options to workaround the above-mentioned behavior:
In the TestStand process, you can close the virtual device session created for a virtual device named “SwitchExecutiveExample“ using the following expression in each execution that uses the virtual device:
In the code module, use the NISE API in the code module language to close the virtual device session.
Another note that I forgot to mention, depending on the version/bitness of TestStand and NI Switch Executive you are using, this may be important: http://zone.ni.com/reference/en-XX/help/370052P-01/tsfundamentals/infotopics/64nise/
Can you please write example sequence for below steps. Do you have an idea whether "Switch connect channels" vi can also be used ?