eeWill -
Very few instument drivers can truely allow you to open separate sessions in two different processes for an instrument because each process contains information about the instrument state and this state is typically stored with the session in the DLLs memory space for each process. In addition, if you pass a session from one process to another, the session may not be valid in the second process. As instrument drivers attempt to boost performance by caching state information and protect hardware, the drivers may become for strict. I believe the NI switch drivers prevent you from getting into this problematic state by limiting the access to a driver to a single process, so when you attempt to open a session using a TestStand step and then attempt to open or use an instrument from a LabVIEW VI running in the LabVIEW development environment, you are now using two processes.
Your best options are:
1) Select either TestStand or LabVIEW to do your switching operations, not both.
2) Use both TestStand and LabVIEW to do switching operations, but ensure that you close a process session before attempting to open a session in another process.
3) Use TestStand switching, but in LabVIEW you can use TestStand's switching by passing a sequence context to LabVIEW VIs, and execute TestStand expressions against the context, i.e. context.AsPropertyObject.EvaluateEx(). The expression language supports basic switching operations like SwitchConnect, SwitchDisconnect, SwitchFindRoute, etc. Even though these function are called from LabVIEW, the operations actual occur in the TestStand process because it it executed using the TestStand API.
4) I do not suggest this one, but you can mix both TestStand and LabVIEW if you only use the LabVIEW 7.x or later runtime when performing switching operations. This works because the LabVIEW runtime is loaded under the TestStand process, however this prevents you from performing mixed switching operations when debugging TestStand called VIs in the LabVIEW developement environment.
Hope that this clarifies the issue.
Message Edited by Scott Richardson on 06-13-2005 09:44 AM
Scott Richardson
https://testeract.com