LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure tunnel with a "hole" in it.

I am writing an Event structure and wiring data in and out for different events. Some of the tunnels are solid colors, but some have a small white square in the middle of the tunnel. The tunnels are not completely white. See attached jpeg.

What does this mean?
0 Kudos
Message 1 of 3
(4,334 Views)
If you right-click the tunnel you'll see a check mark next to the 'Use Default if Unwired' option. This is the default behavior of output tunnels from an Event structure. The partially filled-in appearance further indicates that at least one of the event cases does not feed a wire to the tunnel. Thus, your program depends on having LabVIEW supply that default value implicitly.
You can test this by unchecking the option. The tunnel should become white and your Run arrow should get greyed out because some events don't supply a wired value to that tunnel.

The actual default value depends on the datatype, with 0 for numerics, empty for strings/paths, False for booleans, etc. So your default error cluster (as pictured) would be a False sta
tus boolean, a 0 code, and an empty string.

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 2 of 3
(4,334 Views)
This means that this tunnel does not have a wired input in all possible event cases. output tunnels can have 3 different states:

solid colored: all event cases have data wired to them.
white: Some event cases have missing inputs to this tunnel, resulting in a broken VI.
Shaded: Same as white, but the tunnel is set to "Use default if unwired". The VI is not broken.

Case structure tunnels have the same functionality.

The default behavior for case structures is "Don't use default if unwired", while the default for event strucures is "use default if unwired". You can always manually change the behavior by right-clicking on the tunnel.

Whenever an unwired event happens, the tunnel gets the default value for this data type (e.g. numeric=0, array=e
mpty array, boolean=false, etc.)

A typical use is e.g. the event to stop the VI, here a "true" must leave the event struture and connect to the loop condition set to "stop if true". Since all other events should keep the VI running, you can leave them unwired and they will automatically generate a "false" output. Saves a lot of work. 😉
Message 3 of 3
(4,334 Views)