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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reduce duplicated controllers?

Hello. I am using Labview 2014 and need your help.

 

Please see the attached image which program is for to "pluck out" the subset of 2D array thereby processing the data.

 

My purpose is to reduce duplicated unnecessary controllers in the bottom red box without connecting to the controllers in the top red box because it seems like to be messy.

 

Do you have any solution?

 

 

20150710_100003.jpg

 

 

 

Thanks,

 

Converser

0 Kudos
Message 1 of 4
(2,809 Views)

What do you mean by "controllers"?  Do you mean the front panel controls?

 

You can branch the wires from the control terminals at the top to the same locations at the bottom.

 

If the code is truly identical, you can make them subVI's.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 2 of 4
(2,797 Views)

Converser,

 

the code might be identical in both loops, but parameters might be different (e.g. Starting Point). If these are identical as well, a parallelized for-loop would be a first step to address code redundancy.

On the other hand, you code in the loop contains quite some Rube-Goldberg. You should redesign the code to be more efficient.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 4
(2,713 Views)

If the inputs and outputs are the same, use a for loop and run the process twice, or use a subVI that is called twice.  But looking at your code I doubt this is what you should actually do.  Post your code (as a VI or snippet) describe what it should do, and we can start to optimize it.

0 Kudos
Message 4 of 4
(2,653 Views)