LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

True false case structure undirected tunnel

Solved!
Go to solution

I have a true/false case structure.  True, I subtract a number, False goes straight through.  I only want to connect one output to both ture and false but I get a "wire connected to a undirecteded tunnel" error.  I know how to fix this when it is a numeric case structure by right clicking and selecting "use default if unwired", but there is no default for a true/false case structure.  Thankscase1.JPG

0 Kudos
Message 1 of 5
(4,806 Views)

I have a true/false case structure.  True, I subtract a number, False goes straight through.  I only want to connect one output to both ture and false but I get a "wire connected to a undirecteded tunnel" error.  I know how to fix this when it is a numeric case structure by right clicking and selecting "use default if unwired", but there is no default for a true/false case structure.  Thankscase1.JPG

0 Kudos
Message 2 of 5
(4,804 Views)
Solution
Accepted by topic author PO1

Hi PO,

 

no need to post twice!

- Why do you use two output tunnels in your case structure?

- Why don't you attach your VI or just a snippet of your code? Images are hard to debug with LabVIEW!

 

Two solutions without case structure:

check.png

 

General logic:

IF input > 1023 THEN
  output := input - 1024
ELSE
  output := input
ENDIF

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 5
(4,792 Views)

From your attached sanpshot, you see one wire going out of the tunnel (from the subtract block) but there are two output tunnels on the case structure (one where the wire passes, and the other to the feedback node). Both these need to be wired. As a cheat, you can always wire a constant to one of them if that works. That should replicate the functionality of "use default if unwired"

0 Kudos
Message 4 of 5
(4,789 Views)

That worked, I see now that using a case structure for true and false is something I will try to avoid for an application like this. 

I had a transmission issue and it said I had errors and to try to post in a few minutes but I guess it went though both times.

Thank you,

Paul

0 Kudos
Message 5 of 5
(4,751 Views)