06-23-2016 10:26 AM
If it's a port shutdown issue, probably not. Try to avoid prematurely exiting the app because that won't allow for proper cleanup of the connections, unless that situation is specifically handled.
Maybe you could try calling VISA Close VI from within Labview before executing your app. I don't know if Labview would be able to close a connection that it wasn't responsible for in the first place but it might be worth a shot.
06-23-2016 10:31 AM
@aputman wrote:If it's a port shutdown issue, probably not. Try to avoid prematurely exiting the app because that won't allow for proper cleanup of the connections, unless that situation is specifically handled.
Maybe you could try calling VISA Close VI from within Labview before executing your app. I don't know if Labview would be able to close a connection that it wasn't responsible for in the first place but it might be worth a shot.
There is an...
Options >>> Environment >>> Automatically Close VISA Sessions
that could help with that idea.
Ben
06-23-2016 10:38 AM
@aputman wrote:If it's a port shutdown issue, probably not. Try to avoid prematurely exiting the app because that won't allow for proper cleanup of the connections, unless that situation is specifically handled.
Maybe you could try calling VISA Close VI from within Labview before executing your app. I don't know if Labview would be able to close a connection that it wasn't responsible for in the first place but it might be worth a shot.
I don't think that will work as LabVIEW did not open the port. So the port is probably locked and nither LabVIEW or VISA will be able to access it to close it.
06-23-2016 10:44 AM
@RTSLVU wrote:
@aputman wrote:If it's a port shutdown issue, probably not. Try to avoid prematurely exiting the app because that won't allow for proper cleanup of the connections, unless that situation is specifically handled.
Maybe you could try calling VISA Close VI from within Labview before executing your app. I don't know if Labview would be able to close a connection that it wasn't responsible for in the first place but it might be worth a shot.
I don't think that will work as LabVIEW did not open the port. So the port is probably locked and nither LabVIEW or VISA will be able to access it to close it.
That's what I assume as well. It was a long shot.
06-23-2016 11:13 AM
I got it working now and it was a stupid fix.... we had "wait until completion?" set to true, "cmd" goint into the "command line" input, "C:\" going into the "working directory" input and then made a control going into the "standard input" input. from the front panel we would type our commands into the standard input control and after we would type in the commands, we would hit enter while still in the control, and then hit run. So all we did was add a new line after our commands and now it works fine? It is possible that i originally had a new line in my original code when it was working perfectly and then I went in and deleted it thinking that i was cleaning up my vi. But the problem has been solved. Add a new line after the commands and everything is fine. Thanks for the help and suggestions guys!
p.s. we tried closing the port with a close VISA function and like you guys said, it was a long shot and it failed.