05-09-2023 01:11 PM
As you can see in the above image that orange wired connection is connected in a loop to 1st modulation. Is there a possibility that we can make that loop to go for multiple times.
05-09-2023 01:23 PM
Hi lab,
@bufferlab wrote:
As you can see in the above image that orange wired connection is connected in a loop to 1st modulation. Is there a possibility that we can make that loop to go for multiple times.
At first the answer to your question: the only loop visible in your image will run as long as you don't set the "EXIT" button to TRUE.
So yes, you can make it "loop for multiple times"…
Now the comment on that image: kill the VI and start over from scratch! Really!!!
Stacking several sequence structures inside of each other, with several loops and case structures mixed in between calls for nightmares!
How old is this VI and which (old) LabVIEW version do you use?
05-09-2023 03:22 PM
Thank you for your reply. It's the oldest version. If we have to switch to the latest, we need to upgrade all the instruments which run on it.
05-09-2023 03:27 PM
I want to repeat the process at either of the arrow, say for n times, as shown in the image. As you can see that there is "Total_N" outside the loop which I want there, but for every "Total_Nth", I want the inside part to repeat "n" times. I hope I explained it correctly.
05-09-2023 03:43 PM
I think that there is something you think is a loop structure that is not actually a loop.
From inner to outer you have:
1. Stacked sequence
2. While loop (the ONLY loop)
3. Case structure
4. Stacked sequence
5. Stacked sequence
6. Case structure
7. Stacked sequence
8. Case structure
As much as I hate saying this, if there's something you want to repeat aside from the current While loop, you need to add a loop into that which will be even one more nested structure.
However I would also say that your application is not very maintainable it its current form. It badly needs updating, both in LabVIEW versions and in the structure of the program.
05-09-2023 04:35 PM
Kyle:
I think you meant outer to inner.
-AK2DM
05-09-2023 04:53 PM
@AnalogKid2DigitalMan wrote:
Kyle:
I think you meant outer to inner.
-AK2DM
Yes I did. Oops.
05-10-2023 03:03 AM
That's an Aztec code pyramid!
Simple answer, if you put a loop around your innermost sequence structure it'll to it all several times. I guess you're not interested in doing all those steps again, in which case the answer is no.
What you really need to do is change it to a state machine, then you can jump between cases in any order and don't need to stack the code so deep.