Jump to content

"VISA resource name out"


stilts

Recommended Posts

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

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.