Noxious Posted May 5, 2007 Report Posted May 5, 2007 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? Quote
TG Posted May 5, 2007 Report Posted May 5, 2007 ....... 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 Quote
Noxious Posted May 5, 2007 Author Report Posted May 5, 2007 Thanks a bunch, sometimes you just need someone to point out (what should have been obvious) to you. I will update this if/when I get it working. Quote
Noxious Posted May 9, 2007 Author Report Posted May 9, 2007 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... Quote
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.