LabVIEW Idea Exchange

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

auto-indexed tunnel by defaut with an error line (!!)

Status: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.

With a For loop, the indexing should always be disabled for the error line.


an auto-indexed tunnel by defaut does not make sense with the error line.

 

this idea  is different from mine

                 SR1.png

11 Comments
Darin.K
Trusted Enthusiast

The other idea you linked to would potentially save me clicks, but I have no problem converting the tunnels to shift registers manually since (propagating) error wires and for loops do not seem to mix that often for me.

 

This idea, however, would not save me that many clicks.  Right-Click -> Replace with Shift Register works just fine for autoindexed tunnels.

ouadji
Trusted Enthusiast

it is not a matter of clicks, but a matter of nonsense.

altenbach
Knight of NI

> an auto-indexed tunnel by defaut does not make sense with the error line.

 

Of course it does! What if you want an array of errors to later analyze which iterations threw which errors, for example. But yes, more typcailly you want a shift register anyway.

 

In any case, instead of proposing tons of special autoindeixing rules for special datatypes, the problem should be solved more universally, such as in this idea. In your particular case, you would get automatically a non-autondexing tunnel of you would wire to a scalar error-out terminal from the inside of the loop.

ouadji
Trusted Enthusiast

@altenbach :

 

Of course it does! What if you want an array ...

It's the exception which confirms the rule.  Smiley Happy 

 

"But yes, more typcailly you want a shift register anyway."

... Thank you Sir !  Smiley Wink

 

In your particular case, you would get automatically a non-autondexing tunnel

of you would wire to a scalar error-out terminal from the inside of the loop.

... totally agree with you!

 

your idea  : kudos

 

 

 

AristosQueue (NI)
NI Employee (retired)

I don't think it is the exception that proves the rule. It's very common for me. I wire that tunnel directly into a Merge Errors node to retain the first error in the sequence -- but any that could succeed do succeed. If I wanted to stop early, I would wire the Conditional Stop tunnel and *then* turn off the indexing. Why would I use a shift register? I'll just sit there and spin my wheels N times if I get an error on the first iteration. If I'm going to preserve errors across a For Loop that might execute zero times, I'll put a case structure around the loop so it's obvious that I'm by-passing the whole operation.

AristosQueue (NI)
NI Employee (retired)

I should state, for the record, that I fully expect to be outvoted on this issue. My preferences for error handling are ones that I wish more people would follow (I wouldn't use them if I didn't think they were superior patterns), but I recognize that they are not universal and for most people, yeah, probably they'd rather have a shift register. 😉

Darin.K
Trusted Enthusiast

> Why would I use a shift register?

 

Since error wires are only used to propagate errors that you care about (hint of sarcasm) you want that incoming error to propagate out in the case of 0 For Loop iterations.  That is why you would use a shift register.  It is quite uncommon for me to autoindex the error out even for errors originating inside the For Loop.  I typically find it inefficient to carry around 1000's of No Error Clusters in case there are 1 or 2 errors.  If I were going to feed an array into Merge Errors I would instead Merge the Shift Register Value (I wish they would fix the FN so I could use it instead) with the error from the given iteration inside the loop.  Much more memory friendly IMO.  If I care about all of the Errors then I typically keep only the Errors (ie. conditional indexing).

ouadji
Trusted Enthusiast

@Darin.K :

 

There's nothing more to be said.

 

smiley-applaudit.gif     

 

I like very much this one: "that incoming error to propagate out in the case of 0 For Loop iterations"

AristosQueue (NI)
NI Employee (retired)

Darin, I hadn't thought about the new conditional feature in this context... I could enjoy "by default, turn on the conditional indexing and wire the error cluster to both the indexing terminal and the conditional terminal".

Darin.K
Trusted Enthusiast

Oh yes, conditional autoindexing would be a much more useful default. 

 

I abstain from Kudo'ing these suggestions because, like Altenbach, I prefer a few simple rules as opposed to too many datatype-specific behaviors.  I will probably get around to posting two hare-brained ideas later today:

 

1) All autoindexed tunnels are conditional by default, and the condition is optional.  Unwired condition defaults to true and is the same as current autoindexed.

 

2) Wires dragged across a loop boundary (For or While) do not autoindex by default.  Wires tacked to a loop boundary autoindex by default.