From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-05-2016 11:20 AM
In my block diagram I have 10 VISA input blocks. My goal is to allow the user to input a number of VISA inputs, and to disable the rest. I thought about using a case structure, but it does not allow me to remove or disable an unused VISA input. Is there a way to pass a condition to a disable structure (I know there is a conditional disable structure but I want to do this without creating a project) on the block diagram like could to a case structure?
10-05-2016 11:22 AM
Show us your code!
It sounds like you should just be using a case structure, but since we can't see what you're doing, it's only a guess.
10-05-2016 12:18 PM
That was my initial plan, however I need this structure to enclose all 10 VISA inputs, and not create new ones for each seperate case. When I try to duplicate these inputs for subdiagrams (I need 11 cases, one with no inputs enabled, then one with only one enabled, then tw enabled etc up to all ten enabled) in the condit ional disable structure, it creates 10 more inputs. Case structures do the same thing. I must disable the unused VISA inputs, if they are enabled and not used I get an error message.
10-05-2016 12:39 PM - edited 10-05-2016 12:43 PM
Are all the power meters always present? If you want to just find the resources available, you can use the VISA Find Resource function to find the available ones. Since you gave us just a tiny picture and not actual code (read: VI), it's hard to make any recommendations.
10-05-2016 12:42 PM
Can you provide your vi? I see you create an array, so you could just delete the undesired inputs from the array in the case structure.
Question though, if you want say 5 inputs, is it going to be the first 5 inputs or will they be selectable, ie. you want 1,4,5,7,8 vs 1-5?
10-05-2016 03:41 PM
Adding to bill post, use VISA find resource function with proper expression and get the resources array.
- Then populate it to listbox with checkbox https://decibel.ni.com/content/docs/DOC-25000
- After which you get array of selected VISA resources array.