I'm probably not the best person to answer, but I think you should use an array of type 'VISA resourse name' and let your loop decide with autoindexing. It's a small array so passing it around shouldn't cause too much trouble.
I don't think you can build a 'VISA resouce name' from strings. Therefore I think the array is your best bet. The caveat is that I haven't done this before so take it for what it's worth. 🙂
Since the PC I'm running/developing on has a couple of Com ports itself, I want to first do a VISA Find Resource to get the list of all my Com ports. The plan is to somehow determine which ones are in the PXI chassis (probably, I'll have to open and read some identifier to validate) and to configure only those.
My question is how do I convert the find list array of strings (returned by VISA Find Resource), into an array of VISA Resource Name that I can then pass into my auto-indexing loop?
That worked great. Thanks.
I'm having another problem now. I wire the array into the for-loop with auto index, but within the loop, I want to configure Com Ports 1 & 2, write to port 1 and read from port 2 - in this particular test, 1-2 are connected to each other, as are 3-4, 5-6, 7-8), then move to the next set of com ports 3-4. I don't know if the for-loop is the best way to go about what I want to do, but how do I pass in the array, auto-index, and access the current and next values in the array?
Message Edited by Dennis Knutson on 07-27-2006 11:57 AM
Back to this issue, and I am still struggling to get the proper outputs.
I use the VISA FIND RESOURCE to get a nice list of serial ports, however all I really want is the connect USB devices.
One problem is that the list of instruments does not tell me which com ports are active.
Rather than figure out how to decipher these instrument codes, it seems better to just get com port numbers.
When I use a VISA IO control, I can refresh list and see all serial ports, with some icon beside the ones that are connected.
However, I cannot seem to find a property node that gives me this list displayed in the IO dropdown list.
Any examples available, that show how to get these "connected" USB ports?