Showing results for 
Search instead for 
Did you mean: 

Code Optimization

Hi friends,

           In image 1 i`ve highlighted a single subVI function. I`m repeating this function for 30 times can this be further optimized? Please share your views?

0 Kudos
Message 1 of 3

further optimized No

you will have to wirte whole code from scratch 

you will have to think about design, what are you trying to do?

case struct, inside sequnce struct, inside while loop containing event structure containing n ( n tendes to infinity )

no of subvis , and 2n no of local variables. subvis having classical rube boolean selector having values true and false.

0 Kudos
Message 2 of 3

Yes, This can all be dramatically simplfied and optimized.


As a first step (already mentioned above), see what happens if you would remove the select node and the two boolean diagram constants and simply wire across (see also this very long thread).




It seems ridiculous to call the subVI so many times even if only the inputs to one of them triggers an event. Also be careful with the "text.text" property, especially if the string is not set to normal display. Typically the "value" is a better choice. There are many more problems....


For further help, we would need to see some code. In any case, this entire thing looks like a house of cards. Please attach your code instead of showing pictures.

LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 3 of 3