From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

turn off use default value for unwired cases - event structure

Is there a way to set an event structure to be like a case structure, where it doesn't automatically use a default value on a wire for unwired cases? I keep adding new cases and forgetting to wire a reference through and it locks up my program. I'd prefer a compile error unless I explicity tell it to use default value when unwired. I may just be overlooking it in the options.

0 Kudos
Message 1 of 5
(2,378 Views)

Some things about LV annoy me, and others just downright chap my hide.  This is symptomatic of one of the things that really, really bothers me.

 

Instead of creating a consistent behavior for tunnels (auto-indexing or not, use default or not), NI decides to poll users or throw darts to determine what should happen based on type of structure.  We get one thing for a case, one for diagram disable, one for event stucture.  Likewise with autoindexing we get one thing for the For Loop and another for the While.

 

If it were me, the behavior would be consistent, and there would be two possibilities.  If you drag a wire across a boundary then you would get a normal tunnel in a loop, and a Use Default if unwired tunnel on a multiframe structure.  If you tack a wire to a loop then it would autoindex, and if you tack it to a multiframe structure it would not use default if unwired.  One caveat, loops could autoadjust based on type propagation (array to scalar or scalar to array) which would otherwise give a broken wire.  All a pipe dream anyway.

 

Long way of saying after a while your eyes get trained to spot the 'use default' tunnels, and outside of a VI analyzer test I think you will have to be spotting those for a while yourself.

Message 2 of 5
(2,374 Views)

@Darin.K wrote:

Some things about LV annoy me, and others just downright chap my hide.  This is symptomatic of one of the things that really, really bothers me.

 

Instead of creating a consistent behavior for tunnels (auto-indexing or not, use default or not), NI decides to poll users or throw darts to determine what should happen based on type of structure.  We get one thing for a case, one for diagram disable, one for event stucture.  Likewise with autoindexing we get one thing for the For Loop and another for the While.

 

If it were me, the behavior would be consistent, and there would be two possibilities.  If you drag a wire across a boundary then you would get a normal tunnel in a loop, and a Use Default if unwired tunnel on a multiframe structure.  If you tack a wire to a loop then it would autoindex, and if you tack it to a multiframe structure it would not use default if unwired.  One caveat, loops could autoadjust based on type propagation (array to scalar or scalar to array) which would otherwise give a broken wire.  All a pipe dream anyway.

 

Long way of saying after a while your eyes get trained to spot the 'use default' tunnels, and outside of a VI analyzer test I think you will have to be spotting those for a while yourself.


I'd like to accept this as a solution, but I'm too frustrated to come to terms with the fact that there is no way to do this, so this run on sentence and a kudo will have to do Smiley Mad

0 Kudos
Message 3 of 5
(2,370 Views)

@for(imstuck) wrote:

Is there a way to set an event structure to be like a case structure, where it doesn't automatically use a default value on a wire for unwired cases?


Get as many people as you can to vote for this idea, then wait a year or two - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Output-tunnels-from-event-structure-should-default-to-...


___________________
Try to take over the world!
Message 4 of 5
(2,362 Views)

@tst wrote:

"then wait a year or two"


 

Actually laughed out loud.

 

0 Kudos
Message 5 of 5
(2,359 Views)