LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug: VI fails to compile when disabling a channel writer endpoint

If a channel wire writer endpoint is disabled, the VI fails to compile:

thols_0-1614331547174.png

 

If the disable-structure is removed and a force-recompile is done (CTRL+Run), the Vi compiles

 

Can someone confirm? Either just open and test with the attached VI (same as picture above) or simply create a channel writer endpoint, connect the channel indicator to the connector pane and disable the endpoint.

 

I have tested both Stream and Messenger channels.

 

Tested on LV2021 SP1 and 2019 SP1

Certified LabVIEW Architect
Message 1 of 6
(2,366 Views)

Hi thols,

 

yes, same "problem" in my VIs with channels.

 

Disable-structures do not yet support channels... 😕

 

Kaleck

Message 2 of 6
(2,332 Views)

CAR 2270205 filed.

Certified LabVIEW Architect
Message 3 of 6
(1,029 Views)

I'm surprised you got a CAR on this, this is expected behavior. I guess the CAR would result in a better error message.

 

Channel wires cannot be unterminated, that is, they cannot have a wire somewhere that does not end in an endpoint reader. You CAN use a case structure to disable the case that contains the endpoint. Disable structures remove that sub diagram from the compiled code which creates an invalid "block diagram" for the channel wire.

 

Edit: I'll clarify "expected behavior" as how channels are implemented to work and their rules for wire termination.

 

As stated, Channel Wires must be terminated. That is, every branch (for forkable types or just each end for unforkable) must have an endpoint present. Structures that have multiple cases (events, disable structures, case structures, etc.) only need to have the endpoint in a single case. DDS that removes code from the compilation results in Channel Wire rules being violated and since it's happening during compilation you're getting an unhelpful error message instead of the usual unterminated Channel Wire message.

0 Kudos
Message 4 of 6
(1,005 Views)

"...you're getting an unhelpful error message instead of the usual unterminated Channel Wire message"

I guess that is one of two reasons why I got a CAR. The information to the user is insufficient.

 

I guess the other is that it breaks when run, so there is no feedback to the user before that.

Certified LabVIEW Architect
Message 5 of 6
(982 Views)

Ahh I missed that it wasn't giving a broken run arrow earlier. I'm used to getting that error as soon as I save something.

0 Kudos
Message 6 of 6
(974 Views)