Jump to content

VISA Resource Handling


Noxious

Recommended Posts

So, I need to open, write and read from x number of serial ports, where x is a user defined number from 1 - 16. The first step is initializing the ports (baud, timeout, etc.), is there an easy way to do this using clusters or looping from 1-x incrementing the VISA Resource var somehow (loop from VISA Resource 1 - VISA Resource x)?

I am trying to develop an easy what to handle this varying set of VISA resource references so when I go and read/write to these ports it isn't so time consuming and ugly.

Any Ideas?

Link to comment

....... is there an easy way to do this using clusters or looping from 1-x incrementing the VISA Resource var somehow (loop from VISA Resource 1 - VISA Resource x)?

Should be a piece of cake

Once you have a handle to any serial Visa resource just treat it like a string then you can edit the contents in your loop ti initialize the other ports.

Coersion works just fine with this method.

John

Link to comment

QUOTE(John Rouse @ May 4 2007, 11:30 AM)

....... is there an easy way to do this using clusters or looping from 1-x incrementing the VISA Resource var somehow (loop from VISA Resource 1 - VISA Resource x)?

Should be a piece of cake

Once you have a handle to any serial Visa resource just treat it like a string then you can edit the contents in your loop ti initialize the other ports.

Coersion works just fine with this method.

John

What exactly do you mean, "have a handle to any Visa resource"? I am still having issues finding an easy solution to this without using local variables for the visa resources. Perhaps you could put together a simple example to help illustrate it?

Thanks...

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
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.