01-08-2024 04:49 PM
I need a sequence of steps that can be exited if an error is encountered.
I tried using a flat sequence to start with however I found out it's not possible to exit a flat sequence midway.
I then found this article (https://www.ni.com/docs/en-US/bundle/labview/page/determining-when-to-use-sequence-structures.html)that explains how you can use a case structure with a while loop to create a sequence that can be exited after any step however I've not been able to get it working and I was wondering if anyone know how to fix it or a better way to do this.
Regards,
Andrea
01-08-2024 05:06 PM
I would prefer a dtate machine over stacked sequences
01-08-2024 05:15 PM - edited 01-08-2024 05:18 PM
Except for a few rare cases the Sequence Structures should be avoided at all costs.
A State Machine architecture is probably the most useful architecture to learn when you are first starting out. As most of the advanced architectures are often based on a State Machine or use one inside. Even the popular Producer/Consumer and Queued Message Handler architectures use State Machines in them.
On closer inspection it looks like you are using a State Machine.
Are you looking for a way to abort on a user event like pressing an "Abort" button?
01-08-2024 05:34 PM
figured it out, just needed to use the info block of the loop as input to the case structure. However if someone has a better way of doing it please let me know. thanks
01-08-2024 05:37 PM
it's not a stack sequence, I think that the screenshot is too low res, sorry about that
01-08-2024 05:40 PM
I have a bunch of valves that need to open in sequence and I need to ensure that some valves don't open if the pressure is too high. However I got it working, I just had to connect the info box of the loop to the state machine and number each step.
Thank you
01-09-2024 12:58 AM
Your posts dont make sense to me. Consider posting code in the future.