03-21-2022 03:59 PM
I want the flow to keep going continuously unless I abort/stop the run.
When I run the code, I get this flow:
Main Group -> Group 1 -> Main Group -> Group 2 -> Main Group -> Group 3 (My code stops here), but I want this to repeat the cycle back from Main Group -> Group 1 -> Main Group,..., without having to make the array of enum bigger than it is. I would like to keep the same method if that's possible. I have attached my block diagram.
Solved! Go to Solution.
03-21-2022 04:35 PM - edited 03-21-2022 04:38 PM
Try this:
@GRCK5000 wrote:
Main Group -> Group 1 -> Main Group -> Group 2 -> Main Group -> Group 3 (My code stops here),
No!! Your code never stops because you are autoindexing on a while loop! Once the array runs out of elements, it will repeat the default value forever, especially since you have no way to stop the loop (Aborting the VI is not quite the same ;))
03-21-2022 08:02 PM
Hey Mr. Christian Altenbach, the LabView champ. I tried that it seems like it's not working. I am not able to move to Group 1. See attached file
03-21-2022 08:44 PM - edited 03-21-2022 08:45 PM
Obviously, you need to connect the array index input to the R terminal output, not the IQ. Compare with my picture.
(You also need a wait inside the loop, else you would not even be able to follow it)
03-21-2022 09:18 PM
If you are going to do something weird like that, I think this would be simpler:
03-22-2022 10:37 AM - edited 03-22-2022 10:38 AM
WOWW Mr. Altenbach, you are awesome!!!! You get everything figured out. A challenge is not even challenge to you. What do you not know?
You are the undeniable labview champion.
03-22-2022 10:43 AM
Thanks RTSLU!!!! "something weird" 😆 . This code is definitely simple.
03-22-2022 10:58 AM
@GRCK5000 wrote:
Thanks RTSLU!!!! "something weird" 😆 . This code is definitely simple.
It works but think about how you would scale this into a larger more complex program... It wont be easy.
You are basically making a Queued State Machine, a QSM is a tried and true architecture but this is not how it should be done.
03-22-2022 12:20 PM
Yes, I was thinking about it. You're right, especially when conditions are involved in order to move to the next state.
03-22-2022 04:30 PM
@RTSLVU wrote:
@GRCK5000 wrote:
Thanks RTSLU!!!! "something weird" 😆 . This code is definitely simple.
It works but think about how you would scale this into a larger more complex program... It wont be easy.
You are basically making a Queued State Machine, a QSM is a tried and true architecture but this is not how it should be done.
You are right RTSLU.... And now I wish I would not have suggested it in the first place. 🤐