06-15-2013 02:05 PM
How can I pass error cluster wire between stacked sequences ??
For example in the state machine - the error cluster wires should pass data from previous stacked sequence CASE 0 to CASE 1.
How can I do that ?
06-15-2013 02:30 PM
06-15-2013 03:12 PM
I have searched many times on this forum.
How can one do the following in terms of state machine :
One way is to convert those 1-N cases to another state machine and reuse it under the main state machine (for example the one I showed).
How else could one do it., Please explain this. As this is most common kind of coding I will have to face through out my development and I dont want to complicate it by having nested state machines.
Even a simple sketch will do it.
Thank you.
06-15-2013 03:13 PM
Consider creating a subVI of each frame and wire them sequentially. This might be much easier to read than a stacked sequence.
If you really want to keep the stacked sequence you could pass errors via Sequence Locals between frames but I would not recommend this.
06-15-2013 03:22 PM - edited 06-15-2013 03:27 PM
So what you mean to tell is create sub VI for each frame of the CASE structer and connect them sequentially inside the FOR LOOP .
Am I understanding what you said in the correct way.
What if I want to give something very simple like WAIT(ms) between the first and second SUB VI. How can I connect them through with out a flat sequence ?
06-15-2013 03:28 PM - edited 06-15-2013 03:32 PM
That's what I thought. It seems a little bit overkill to me to replace a stacked sequence with just 2 frames by a state machine, I think subVIs are better suited here.
Regarding your second question: You need a flat sequence here. Place it on the error wire between the subVIs and put the Wait primitive into it.
06-15-2013 03:31 PM
How about the question I asked about introducing a wait(ms) in between the two sub VI. How could I do that then ...
06-15-2013 03:35 PM
Sorry, I read your second question too late and decided to edit my original post. You find the answer there 🙂
06-15-2013 03:38 PM
How about like this ??
06-15-2013 03:44 PM - edited 06-15-2013 03:46 PM
Looks OK to me. If you need the Wait in the error case frequently in your project this would be a good candidate for a subVI, too.