08-03-2023 03:56 PM
I am currently using LabVIEW and TestStand 2017 along with Switch Executive and I'm having the following issue:
Any variation of disconnect to be used with Switch Executive results in Error -2904 "The route doesn't exist" even though I use the same Route Specification for Connecting said route and it works fine. I'm sure there must be some error that I'm making as I am no expert on these products and I am mostly teaching myself. I am trying to control switches in a simple single threaded TestStand sequence where I am trying to connect and disconnect a number of routes between a combination of Crosspoint Matrices and Multiplexers. I began with a simple VI (pictured below) which used NISE Connect and Disconnect VI which I thought could just be used to both connect and disconnect with a single VI for simplicity. This method works fine to Connect a route, but if I put the same Route in Disconnect Specification, I get the Error. I then tried to use the NISE Disconnect VI as well with the same result. Finally, I tried to use the switching options within a teststand step to interface with switch executive directly, with no VI. Same result. To be clear I use a given route specification for example "PSUtoDMM1Ch0" and it works when I connect the route, but every attempt at disconnecting the route with the same specification results in an error. I assume I must have made some mistake configuring my Virtual Device? I have no idea what that would be though. I am at a complete loss and any help would be much appreciated.
Solved! Go to Solution.
08-04-2023 05:55 AM - edited 08-04-2023 05:55 AM
The "niSE Connect And Disconnect.vi" evaluates the "Disconnection Specification" first and then the "Connection Specification". This is because the "Disconnect Specification" is meant to allow you to disconnect prior connections, before connecting the "Connection Specification", in one call. See here for more info: niSE Connect And Disconnect VI - NI. Because you have no prior connection, the -2904 error is expected. If you are only wanting to connect something and then immediately disconnect it, please call the "niSE Connect.vi" followed by the "niSE Disconnect.vi". You can try this out using the installed LabVIEW examples: Using NI Switch Executive in LabVIEW - NI
08-04-2023 08:31 AM
Thank you for the response Brian.
I had understood that this was the main use case for the Connect and Disconnect VI, however I had thought that it would also work for my use case. It is helpful to know that I was mistaken in thinking that, and thank you for the explanation. However, later on in my post I went on to say how I get the same error when simply using the NISE Disconnect VI and also when using Switching Step options directly in TestStand. I will include a screenshot of the connection which works and the disconnect that produces the error in both cases. The only thought I've had since then is this: Could it be that I have to remove the Close Session Sub VI? This could be totally off, but as I said I'm at a loss so I'm considering everything.
Connection:
Disconnection 1:
Disconnection 2:
08-04-2023 09:21 AM
Yes, the switch may be getting reset (relays all opened) if a new session is made. Can you run the Switch Executive Debug Panel and then generate the -2904 error? What does the debug panel log show for session operations?
08-04-2023 01:02 PM
Thank you. The Closing Session/Opening new session for each connection/disconnection was the issue.