LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How To Pass Error Info From One Seq Frame To Next?

I have a multi-frame sequence of "A Telnet Write follwed by A Telnet Read" I pass the "Error" output of the "Telnet Open" function (outside the sequence) into the sequence. The Error output of the Telnet Write is passed to the Telnet Read. How can I pass the Error output of the Telnet Read in frame N to the input of the Telnet Write in frame N+1? It appears I can't use a shift register. I would need a Global that can be both written and read in any frame. Is this doable? Or am I using an untenable programming paradigm?
0 Kudos
Message 1 of 7
(3,332 Views)
Should be pretty easy. Just add a sequence local (right click on the frame of the sequence and select "Add Sequence Local"). Connect the error output to the sequence local node on the edge of the frame and that can be fed into any frames after that.

Steve
0 Kudos
Message 2 of 7
(3,332 Views)
If you're goint to use the error in/error out connections, why do you need a sequence structure in the first place? A sequence structure with dataflow is redundant.
0 Kudos
Message 3 of 7
(3,332 Views)
In frame "zero" I wire the Error Output of Telnet Read to a sequence local. In frame "one" I wire the output of the sequence local to the Error Input of the Telnet Write. Now, where do I wire the output of the Telnet Read in this frame ("one")? In frame "one" the sequence local from frame "zero" is now read-only. I would have to wire to the input of another sequence local? This means that each frame has its own sequence local as well as all the sequence locals from all the previous frames. Gets crowded quickly.
0 Kudos
Message 4 of 7
(3,332 Views)
That is correct. To read the data from frame 1, you would need a second sequence local to pass it to following frames, and more sequence locals for any new data after frame 1 you would want to pass. Personally, I don't have the contempt for sequences like many other developers (IMO, they're not as evil as they're cracked up to be). However, Dennis Knutson makes a good point when he says that a sequence with data flow is redundant. In this case you may be better off just wiring your error data through the Telnet functions in the order you want them to execute. That would provide the same functionality as your sequence and make the code easier to read and manage.

Regards,

Steve
0 Kudos
Message 5 of 7
(3,332 Views)
Thanks for your suggestions. I just felt that a sequence structure would provide a compact way of representing a sequence of tests - each more or less identical to the others - with the option of skipping to the end should a failure occur. I will investigate other representational paradigms with an eye towards econimical representation.
0 Kudos
Message 6 of 7
(3,332 Views)
The sequence structure DOES NOT provide an option to skip to the end or anywhere else. A sequence always executes all frames. To skip, you need to implement a state machine. Just as exonomical of dagram space as a sequence structure but with all the flexibility you might need and want. To some of us, the economical representation of a sequence is more a hiding of code that doesn't need to be hidden.
0 Kudos
Message 7 of 7
(3,332 Views)