LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabvVIEW Scripting: wiring a pass-through tunnel inside a case structure

Solved!
Go to solution

Hi, 

Using LV scripting, I created a case structure and populated the "FALSE" case, tunnels were automatically created when contents were wired:

wiring-tunnel-problem1.png

I would like  the "TRUE" case  to act as a pass through. Which is trivial if done manually:

wiring-tunnel-problem2.png

 

wiring-tunnel-problem3.png

But looks like it's quite tricky to do it through scripting, here is the best I managed to do:wiring-tunnel-problem4..png

 

I used ObjHighLight to make sure I was working with  the right terminals.  Although I'm trying to wire the tunnel's inside terminals,the result is somewhat disappointing:


wiring-tunnel-problem5.png

When using clean up, one notices that the wiring was done outside the Case structure, hence the connection error:

wiring-tunnel-problem6.png

Oddly enough, switching the two terminal parameters in  the Connect Wire node yields a different result:

wiring-tunnel-problem7.png

 

What am I missing ?

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

@yoctopuce wrote:

 

What am I missing ?


For one, the VI you're working from so we don't have to recreate the attempt from scratch.

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

Well, I am experiencing the problem in a quite large project with a lot of dependencies, but  here is a simpler example exposing the issue (VI attached):

wiring-tunnels1.png

 

And here is the result:
wiring-tunnels2.png

0 Kudos
Message 3 of 5
(2,591 Views)
Solution
Accepted by topic author yoctopuce

Those tunnels have inner and outer terminals. 1 outer terminal per tunnel, one inner terminal per case for the inner tunnel.

Wire inner terminals.png

 

You can get those inner tunnel terminals from the case terminals (*sigh*), but there are 3 case terminals, so you'd need a way to select the right ones...

Message 4 of 5
(2,571 Views)

Thank you  wiebe@CARYA Smiley Happy, I figured that it was a matter of getting access to the inner terminals,  but I never imagined that I had to cast the case structure terminals into outer terminals in order to get access to the inner part. Tricky.

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