stilts Posted February 14, 2009 Report Share Posted February 14, 2009 I'm planning on using a queued message handler to facilitate RS-232 reads & writes. I'd like to handle each action (configuring serial port, reading, writing, closing VISA session) by a different case in the case structure. I have two questions related to this: 1) Must I use the "VISA resource name out" on the configure/read/write functions to keep the VISA session open? The LabVIEW help mentions using this output as a way to maintain dataflow from one VISA function to the next, but it doesn't explicitly say that it's required to keep the session open. It would be nice if I didn't have to use this because I'd only need a node for the resource name on the left side of my while loop, not the right. 2) Assuming I am required to connect "VISA resource name out," would I be able to use the close VISA session function in one of my case structure cases, or would I need to place this function outside the while loop? Thanks for your help Quote Link to comment
jdunham Posted February 15, 2009 Report Share Posted February 15, 2009 QUOTE (stilts @ Feb 13 2009, 02:08 PM) 1) Must I use the "VISA resource name out" on the configure/read/write functions to keep the VISA session open? The LabVIEW help mentions using this output as a way to maintain dataflow from one VISA function to the next, but it doesn't explicitly say that it's required to keep the session open. No. The Visa Resource is just a reference to a session. The value on the wire refers to the open session. The output is just there for your convenience. Only running Visa Close or terminating your VIs can close the session. (the latter only works if you have some optional setting turned on). QUOTE (stilts) 2) Assuming I am required to connect "VISA resource name out," would I be able to use the close VISA session function in one of my case structure cases, or would I need to place this function outside the while loop? You can close the session anywhere you like, though I think the session may automatically open itself if you run one of your other cases after calling close. Close is still useful so that other programs may take control of the port. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.