Showing results for 
Search instead for 
Did you mean: 

Disable/Case Structure Implementation Issue


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? 

0 Kudos
Message 1 of 6

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.

Certified LabVIEW Architect (CLA), Certified LabVIEW Embedded Systems Developer (CLED) and Certified TestStand Developer (CTD)
MediaMongrels Ltd. - NI Alliance Partner | GDevCon :: 21-22nd August 2019 :: Birmingham, UK
0 Kudos
Message 2 of 6

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. 

0 Kudos
Message 3 of 6

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.

(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 6

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?


0 Kudos
Message 5 of 6

Adding to bill post, use VISA find resource function with proper expression and get the resources array.

- Then populate it to listbox with checkbox

- After which you get array of selected VISA resources array.


0 Kudos
Message 6 of 6