06-28-2010 01:14 PM
I have 5 of the same instruments connected to my program so I have the same proccess happening at the same time for all 5 instruments. I have the 5 serial ports initialized at the beginning and then the 5 processes in the loop happening using subvis since I am doing the same thing for all the instruments and then after the loop the 5 visa close.
I want to be able to turn off the instrument if I want. For example, if I only had 2 instrument I would turn the other 3 off with a switch. I am still learning labview and I can not think of an easy way to do this.
Thanks for the help
06-28-2010 01:27 PM
Connect the swiitch to a case statement.
06-28-2010 01:32 PM
Well I want to be able to display more than just one of the sets of data. I want to be able to turn them all on if I wanted not only 1 at a time. I will not always have 5 instruments connected though so I want to be able to use just 4 or 3 or 2 or 1...
I was just going to put a on off switch for each and put each instrument code in a case statement but I do not know what that will do since the visa serial is outside of the loop.
06-28-2010 01:37 PM
Don't understand your last comment. The instrument code would presumably be the VISA Reads and Writes and would not be outside the loop. The VISA Resource would simply be passed through the case statement when the instrument is disabled with the front panel switch. You would also have empty data in the disabled state. Since you did not post your code, I have no idea what the data type might be. Perhaps an empty array? Perhaps a NaN?