Hi Daniel,
Before LV6.1 there was LV5.1 In LV5.1 the way to Spedify a resource was to use a string control with correct VIsa Resource Class identifier. For eg. "GPIB0::11" or "ASRL1::INSTR". With Introduction of VISA Resource Name Control and linking with MAX, These names are Available from Pull Down List and Can be Aliased, meaning ASRL1 which is Serial Port 1 can be called COM1 and so on. However the old method still works with all 6.1 Controls. Only thing is you have to make sure you Dont Conflict the Class Names ie Use "GPIB::.." instead of "ASRL..." when addressing Serial Port VI's.
To solve your Problem I would Build a Menu ring with COM1 to COM4 in the Pull Down List.
Next, If I use the Traditonal Serial Port VI wich accepts the Integer as Seria
l Port #. I just Wire the Menu Ring to this VI.(Remember COM1 is 0, COM2 is 1 for this VI)
If I use VISA Config Serial Post. I build an Array Constant with Corresponding VISA Class Names So in our case a String Array Constant of 4 elements "ASRL1::INST" to "ASRL4::INST". I Use Index Array Function With the Index Wired to my Menu Ring. The Array Input Terminal Wired to the Array Constant. The Output of this Array will be correct Visa Class Name Based on slection of my Menu Ring. I can Wire this as Input to my VISA Config Serial Port Vi.
I have attached a Small VI to Illustrate this.
Drawback: You must Predefine what Ports you will Want to Use. Basically you define all the cases.
I hope this Answers your Q!
Good Luck
Mache
Good Luck!
Mache