05-12-2010 10:51 AM
hey guys,
how can i release a visa connection without stoping the vi?
the whole vi is in the loop to trap any event from boolean controls. one of the boolean control is to stop
visa connection to release the connection on whatever connected to that visa resources. take note, the whole structure didnt use event structure, it uses a loop.
i am using the visa close vi (from ni lv) to close the connection.
but its not working, it didnt release the connection.
Solved! Go to Solution.
05-12-2010 11:04 AM
What hardware are you controlling, and what do you mean by "it didnt release the connection"? That you aren't able to estabilish a new connection? Or that your hardware still have the "remote" flag active?
Just trying to figure out what is wrong.
Regards
05-12-2010 11:11 AM
i have my com1 connected to i2c interface...
i just want to release the connection (visa connection) without stoping the program.
05-12-2010 11:14 AM
...strange, I'd expect the resource to be released by using VISA close.
Can you post your VI?
05-12-2010 11:19 AM
attached is the sample vi similar to the actual vi.
see attached.
05-12-2010 11:27 AM
Please post the actual VI, not only a jpg (case and stacked sequences are not accessible).
But something is wrong even in the jpg: I won't use local variables to initialize controls...
05-12-2010 11:35 AM
see attached...a sample vi, similar to actual application vi.
we will not debate on using local variables to initialize controls.
we'll focus on why CLOSE VISA vi doesnt release the connection
05-12-2010 12:31 PM
What do you mean by "it didn't release the connection"
I tried your code and it seemed to work as I expected with HyperTerminal.
If I opened the port with your VI "Start" button, then HyperTerminal could not open the com port.
Then when I closed the port with your VI "Stop" button, then HyperTerminal was able to open the com port.
I can switch back and forth between your VI and HyperTerminal opening and closeing the com port. Getting an error message if the other has it opened. Closeing it port and then being able to open it with the other.
Omar
05-12-2010 12:52 PM
Yeah, your right, its working now also...
i dont know what did happen, i been playing around with it this morning and it didnt release the connection.
now it works fine.
thanks Omar for your time.
Xdaf,
thank you for your time.