10-30-2023 07:35 PM
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.
10-30-2023 07:51 PM
Create and Configure a LabVIEW SubVI
10-30-2023 08:00 PM
I apologize for the inconvenience, but if possible, could you please tell me how to use Loop instead of using Sub.vi?
10-30-2023 09:34 PM
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?
10-30-2023 09:41 PM
@kozuka32 wrote:
Regarding the attached
vipicture 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
10-30-2023 10:17 PM
There is no real data, just simulated data based on random numbers.
10-31-2023 07:39 AM
@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.
10-31-2023 08:11 AM
Of course the two original code paths execute in parallel while a simple FOR loop would force sequentially execution unless you parallelize the loop.
10-31-2023 10:47 AM
Here's a simplified example how to use a plain FOR loop. It scales with any number of signals automatically.