12-20-2013 09:33 AM
(scripting)
Is there a way to connect a terminal to a Flat Sequence Structure ? (in my case, with only one frame)
(with the Method "Connect Wire")
Solved! Go to Solution.
12-20-2013 10:48 AM
It doesn't look like Connect Wire will work, because it only accepts Terminals or Nodes as the "Wire Source", and the FlatSequence class does not inherit from Node. Here are the workarounds I can think of:
1. Drop a node inside the Flat Sequence (like a "To Variant" function), wire to that with Connect Wire, then delete the node and the connected wire within the frame.
2. Replace the Flat Sequence with a Stacked Sequence, wire to it, then replace the Stacked Sequence with a Flat Sequence.
There are probably other workarounds, but these are the first two I thought of. Let me know if you have any other qeustions.
12-20-2013 11:54 AM
Thank you Darren for these workarounds.
but the main question is .. why the flat sequence stucture doesn't inherit from node ?
Why did developers make this choice?
What is the background idea of this choice?
(sorry, for my bad english, i try to do my best)
12-20-2013 12:13 PM
@ouadji wrote:
but the main question is .. why the flat sequence stucture doesn't inherit from node ?
Why did developers make this choice?
What is the background idea of this choice?
The Flat Sequence Structure, introduced in LabVIEW 7.0, provides a diagram object semantic that no other object has. It is a multi-frame structure (like a case structure or a stacked sequence structure), but it is the only structure where data can be wired between frames through normal tunnels. It is the only structure that can have tunnels in locations other than its outer borders. It is the only structure that can have subdiagrams of different sizes at different positions. It also introduces strange wiring scenarios which you will not find elsewhere:
At the time the Flat Sequence Structure was introduced, there were enough of these weird scenarios with scripting (which was an NI-internal feature at the time), that it was easier on the developer to make it its own scripting class than to try to figure out how to support it under an existing class. We had no idea that scripting would become a public feature someday, so the burden was relatively light, and limited to within NI's walls. Looking back, there have been enough problems with the FlatSequence class in scripting that most of us agree it would have been better to have included it under the Node class (or more specifically, the MultiFrameStructure class) from the start.
12-20-2013 12:45 PM
OK, I understood everything.
Thank you very much for this explanation.
I understand much better the history and background of this structure.
"... most of us agree it would have been better to have included it under the Node class from the start."
I agree with this view.
Maybe it's not too late to change this?
And solve this problem once and for all!
why not ?
12-20-2013 03:15 PM
@ouadji wrote:
Maybe it's not too late to change this?
And solve this problem once and for all!why not ?
It would be a substantial investment for us to rework the VI Server class hierarchy to make the Flat Sequence structure inherit from another class. It would be an even bigger investment to implement the conversion necessary for existing applications to function properly. I'm not saying it's impossible, it's just something we haven't chosen to invest in yet.
03-18-2016 06:41 PM