LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simplifying Vi

Regarding the attached vi, how can I make it even simpler? I am writing the same thing twice, but I would like to eliminate this and simplify it. If possible, please let me know in vi or png.

無題.png

0 Kudos
Message 1 of 9
(995 Views)

Create and Configure a LabVIEW SubVI

-------------------------------------------------------
Applications Engineer | TME Systems
0 Kudos
Message 2 of 9
(986 Views)

I apologize for the inconvenience, but if possible, could you please tell me how to use Loop instead of using Sub.vi?

0 Kudos
Message 3 of 9
(980 Views)

I recommend to attach your actual VI. Pictures are less suitable to help.

 

All you probably need is one instance of the duplicate code in a for loop.

 

I hope you don't use "continuous run" button? Don't you want a top-level while loop?

0 Kudos
Message 4 of 9
(943 Views)

@kozuka32 wrote:

Regarding the attached vi picture of a VI, which you probably can't see clearly, can't edit, and can't run (to see what it does), how can I make it even simpler? I am writing the same thing twice, but I would like to eliminate this and simplify it. If possible, please let me know in vi or png although a VI would be much more convenient, as I would immediately know what you meant, and could instantly test it.


Hi.  I've taken the liberty of editing your original request.  You did not attach a VI, but rather a picture.

 

Please attach a VI.  Please, if you are using LabVIEW 2022 or 2023, first do a "Save for Previous Version" and specify LabVIEW 2021 or 2019.

 

Can you say in a few words what you are trying to do?  (Don't tell me what the code you wrote does, but tell me what data you have, and what you want to do with them.

 

Bob Schor

0 Kudos
Message 5 of 9
(939 Views)

There is no real data, just simulated data based on random numbers.

0 Kudos
Message 6 of 9
(933 Views)

@kozuka32 wrote:

I apologize for the inconvenience, but if possible, could you please tell me how to use Loop instead of using Sub.vi?


Combine the cluster outputs into an array and do it in a for loop.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 9
(878 Views)

Of course the two original code paths execute in parallel while a simple FOR loop would force sequentially execution unless you parallelize the loop.

0 Kudos
Message 8 of 9
(864 Views)

Here's a simplified example how to use a plain FOR loop. It scales with any number of signals automatically.

 

altenbach_0-1698767192478.png

 

Message 9 of 9
(820 Views)