LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wiring tunnels, default data....

Hello All,
 
Just an idea, and I'm looking for opinions......
 
I have a case structure with, say, 20 cases.  I feed a shift register into the case structure.  I want to change the value of the "variable" in only one case.  The other side of the structure the "variable" exits the case structure and feeds to the right shift register.
 
So this means that in the other 19 cases I need to wire from the left tunnel to the right tunnel.  Or set the "Use default if unwired" option, which in many cases is NOT what you want to do since you lose the data you are currently cycling through the shift register.
 
What I find is that I have lots of cases where I am just wiring wires from left to right.  I understand that, really, this is just for visual dataflow.  To me it kind of feels like I am saying, for each "variable", "variable x = variable x". 
 
Mostly, I only find this helpful for booleans, where the default is False, and construct my logic outside the case structure accordingly to take advantage of this.
 
I think my main gripe is that it seems to unneccessarily clutter up the diagrams.  What if there was another option, somehow the ability to "link" an input tunnel to an output tunnel, so that if an assignment is not made the input flows to the output if the output is not wired.  Perhaps when you hover over or select the output (or input) tunnel the corresponding tunnel highlights as well..... Or perhaps a special tunnel could be designed that needs to be in line with the other tunnel (like a shift register) to enable this feature.  If the latter, then in cases where a connection is not made perhaps a faint, mostly invisible line could be drawn from one tunnel to the other.  Not a real wire (you don't want to affect wire autoplacement, etc) but just a visual indicator to keep the visual dataflow. 
 
Does any one else think that this would benificial?  Perhaps it is just because I am fairly new to the environment, and it takes a little getting used to? 
 
Thoughts?  Opinions?
Message 1 of 19
(4,188 Views)


@tartan5 wrote:
Hello All,
 
Just an idea, and I'm looking for opinions......
 
I have a case structure with, say, 20 cases.  I feed a shift register into the case structure.  I want to change the value of the "variable" in only one case.  The other side of the structure the "variable" exits the case structure and feeds to the right shift register.
 
So this means that in the other 19 cases I need to wire from the left tunnel to the right tunnel.  Or set the "Use default if unwired" option, which in many cases is NOT what you want to do since you lose the data you are currently cycling through the shift register.
 
What I find is that I have lots of cases where I am just wiring wires from left to right.  I understand that, really, this is just for visual dataflow.  To me it kind of feels like I am saying, for each "variable", "variable x = variable x". 
 
Mostly, I only find this helpful for booleans, where the default is False, and construct my logic outside the case structure accordingly to take advantage of this.
 
I think my main gripe is that it seems to unneccessarily clutter up the diagrams.  What if there was another option, somehow the ability to "link" an input tunnel to an output tunnel, so that if an assignment is not made the input flows to the output if the output is not wired.  Perhaps when you hover over or select the output (or input) tunnel the corresponding tunnel highlights as well..... Or perhaps a special tunnel could be designed that needs to be in line with the other tunnel (like a shift register) to enable this feature.  If the latter, then in cases where a connection is not made perhaps a faint, mostly invisible line could be drawn from one tunnel to the other.  Not a real wire (you don't want to affect wire autoplacement, etc) but just a visual indicator to keep the visual dataflow. 
 
Does any one else think that this would benificial?  Perhaps it is just because I am fairly new to the environment, and it takes a little getting used to? 
 
Thoughts?  Opinions?


Personally I never use default data on tunnels. This is so that if in the future I add another case and forget to wire to the tunnel, the VI breaks and I don't spend ages scratching my head looking for the error in my code.
"...and all this science I don't understand
it's just my job five days a week"


Using 6i, 7.0 & 7.1 on Win'98, 2K & XP
0 Kudos
Message 2 of 19
(4,163 Views)

I agree that something like this would be beneficial if there was a clear indication of which tunnels are connected to each other. I suggest you go to the Product Suggestion Center and file this idea because that's how NI processes suggestions.

If you want to save yourself some work now, go to the LAVA forums and search for the tunnel wiring wizard. It won't make the wires disappear, but it can automatically connect two tunnels in all cases where the output tunnel is not wired.


___________________
Try to take over the world!
0 Kudos
Message 3 of 19
(4,158 Views)
This can be an annoyance.

One way to avoid it is to have a case with wires across and then duplicate it as you need to add cases. Be sure to make the necessary changes to each duplicated case!

If you have many wires which are usually just wired through, it may be advantageous to put them into a cluster so that you have ony one wire. Make a typedef'ed cluster control so that you have named controls inside the cluster. Using a typedef means that you only need to change the typedef if you need to add a control and using named controls allows you to use Bundle by Name and Unbundle by Name in the cases where data is modified to document what you are doing.

Lynn
Message 4 of 19
(4,149 Views)
No, this isn't something that you're seeing or are buggered by just because you're relatively new to the environment. I've been annoyed at having to create a bunch of "dead space" at the top or bottom of my diagrams to make room for these through-wires.

I don't have LabVIEW 8.5, so I don't know if anything was done regarding this, but a quick view of the Release Notes doesn't seem to indicate anything along these lines, so I would concur with tst and submit a product suggestion.

As tst mentioned, the Tunnel Wiring Wizard can be very handy in these cases. There's a thread on this here.
0 Kudos
Message 5 of 19
(4,147 Views)
That's what I find, I need to make sure that anything that is going to go to a case gets wired either near the top or near the bottom of the case, otherwise I have a wires running through the middle cluttering everything up for all my other cases......
0 Kudos
Message 6 of 19
(4,131 Views)

This is along the lines of something I suggested in ~2002 on info-LabVIEW. You can find the original text and some link in my old post at the following link:

http://forums.ni.com/ni/board/message?board.id=170&message.id=208105#M208105

I still think that would be a useful addition. 🙂

That post also has a link to a realted discussion on Lava.

0 Kudos
Message 7 of 19
(4,130 Views)
When they first introduced this feature, I wa sso excited because I thought the use default meant "do whatever I do in the default case", so if my default case wired it through, it would do that if I left it unwired..  If my default case set it to 5, then that's what it would do if I left it unwired.

The way it works now, I have never seen much use for it other than being able to be lazy and not wire up an output.  But, as someone else pointed out, it's dangerous because the VI doesn't break if you forget to do it.  That's why I almost always turn off the option.  Me being able to drop 2 secs to create a constant or wire through an input is offset by the time I may spend debugging a problem because I forgot to wire the output when it needed to be.  The only time I may not is for the stop condition for a while loop where False is usally good and True only shows up in 1 or 2 cases).

Depending on the application, you can get away using an unitialized shift register with an internal while loop to your case.  Sort of like a LV2 style global without the subVI.  The value is only available to that case, but in instances where I am toggling a value or keeping a count that is only useful to that case, it is much cleaner than wiring 20 wires in all the other cases.

As someone else said, I also keep a mostly wired through case jsut to duplicate to try to save time on wiring if I have to have a bunch of tunnels going through.

Message Edited by Matthew Kelton on 09-18-2007 10:13 AM

0 Kudos
Message 8 of 19
(4,127 Views)
Hi tartan5,
i will show you a trick I sometimes use when I want to update a wire only in one or two among many cases, avoiding all that wiring.



It uses the "Use default if unwired" feature to make sure that the case structure boolean output is true only when my selected cases are hit.

Message Edited by pincpanter on 09-18-2007 05:12 PM

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Download All
Message 9 of 19
(4,126 Views)
In this case why not use a functional global instead of the shift register?
0 Kudos
Message 10 of 19
(4,123 Views)