From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
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?

Download All
0 Kudos
Message 1 of 3
(2,134 Views)

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
(2,119 Views)

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.

0 Kudos
Message 3 of 3
(2,087 Views)