LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
DeltaJ

Automatically delete broken wire section which 'shortcircuit' a subVI

Status: New

I saw this idea which I really liked and I realised that this would also be nice.....I do this type of 'insert subVI, delete broken wires' action all day.

 

error_wires.png

 

I searched I think what I am proposing is a little similar to this idea but I think in the difference with the idea I'm putting forward is that labview will only automatically delete a section of the broken wire when the 'short circuit' is sending data around a VI as well as through it!

 

The second part of the idea - where the 'merge errors' vi can be configured to appear automatically when two 'sources' are wired to one sink would be useful when you are parallelising subVIs on the block diagram. I'd also suggest that if this option is configured and the source wires are deleted (so that only one source is linked to one sink) have the merge error vi disappear!!!

 

I'll be gutted if I've wasted my time on another duplicate.....I keep not finding other peoples great ideasSmiley Happy

 

 

12 Comments
Mads
Active Participant

Beat me to itSmiley Happy. Nicely illustrated.

 

I do this all the time as well. Whenever you wire a new wire onto an existing one LabVIEW should understand that you want to remove the downstream part of the old route. If people here think this might lead to unintended rerouting the feature could require that you for example hold the control key when you connect the new wire.

 

Doing an insert instead of wiring can remove the issue in some cases, but it is not as intuitive, flexible and efficient.

JW-JnJ
Active Participant

Yes, yes, yes. LabVIEW already deletes a wire when you run parallel wires, so why not this? I do this more often than insert and I really can't think of a reason I would want the old short circuit hanging around.

 

I vote for not automatically adding the merge error. I string together serial VI's more often than parallel. Plus, just having the wire rerouting will automatically make the merge error more efficient to place. Input 1 to the wire, output to the same wire, and you have a merge error inserted.

Josh
Software is never really finished, it's just an acceptable level of broken
johnsold
Knight of NI

This could be quite a productivity booster.

 

I often see the wire input, wire output, select short and delete it, sequence of steps.  Insert typically does not work well for VIs with multiple wires in and out such as error clusters and refnums or DAQ tasks.  These are common situations.

 

I think Mads suggestion of use of a meta-key while making the last connection would give the programmer control of this feature and minimize the need for the editor to guess whether to remove the short.  I like it.

 

Lynn

G-Money
NI Employee (retired)

I just use quick drop to do this for me (http://www.ni.com/white-paper/7423/en) If you select the wires that you would like VI to connect up to, then you can open Quickdrop, browse to the VI you want to use, and then press Ctrl+I (that's an capital i) and it will script this for you. Not exactly what the idea is getting at but a different work around maybe.

Manzolli
Active Participant

As G-Money pointed, it can be done, but is not practical. I tried and figured out that you should know the VI name (we are used to palettes and icons). For me It's still easier connect and remove the shortcircuits. Kudos to have a easier way to do it.

shortcircuit

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
Manzolli
Active Participant

Update: Works fine for 1 wire. I doesn't work, as expected, for 2 or more wires. In this case it will insert one VI for each wire selected, not one VI with all the inputs and outputs. One more reason to NI work on it.

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
Ray.R
Knight of NI

It does look like a duplicate idea of Titou's suggestion.

 

In either case, I could have used this over 10000 times (maybe a mild exaggeration).

CrystalTech
Member

This would be especially helpful for the Cluster "Bundle" when connecting the input and output to the Cluster Wire.

Kudos!

elset191
Active Participant

@G-Money wrote:

 

 I just use quick drop to do this for me (http://www.ni.com/white-paper/7423/en) If you select the wires that you would like VI to connect up to, then you can open Quickdrop, browse to the VI you want to use, and then press Ctrl+I (that's an capital i) and it will script this for you. Not exactly what the idea is getting at but a different work around maybe.

 

Unfortunately there's a bug with the implementation that always puts whatever you're inserting upstream of any branches the wire may have.  With bundle, at least for me, it is usually preceded by an unbundle.  I have had to alter my coding habits to always drop the bundle first, coding backwards in a sense. 

 


@Manzoli wrote:
Update: Works fine for 1 wire. I doesn't work, as expected, for 2 or more wires. In this case it will insert one VI for each wire selected, not one VI with all the inputs and outputs. One more reason to NI work on it.

Hold shift along with the ctrl+i to do a multi wire insert.  I also mention this in the link above.

--
Tim Elsey
Certified LabVIEW Architect
altenbach
Knight of NI

So, the general rule would be that if we wire in a way that an existing, unbroken wire receives a second source (and would thus break), the old source should get disconnected at the new joint, the dangling old wire removed, and the new source retained.

 

This feature would make it almost impossible to create a wire with two sources and I still wonder if this self-correcting could cause unwanted and unexplainable code, especially for the newcomer. I think it is fine! (We currently have this problem with the autoinserting feedback nodes).

 

(not sure about the error wire exception. In the given example it would make little sense to branch the error. In other scenarios it could be useful. This is similar to what we currently get when wiring dynamic wires together)