LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can an input tunnel (error cluster) in a while loop act as a shift register?

Hi there,

I've got a weird Q.

In a rather big app (>600 VIs), there's an 'Open unknown VG.vi'. It gets some start parameters, including an error cluster, and returns an handle to an opened (selfmade) device.  Inside this VI, theres a While Loop, that repeats some operations until a device has been opened.  The above mentioned error cluster is fed into the While Loop via an input tunnel. An output error cluster leaves the While via an output tunnel.

During debugging I have now several times seen a situation, where the Error-in control of the VI is noError, while the same value after the input tunnel is error1 after the first iteration of the while loop. Looks like this input tunnel acts as a shift register.
Is this possibel?
And can someone provide me with a way to avoid this behaviour?

Greetings from Germany!<br>-- <br>Uwe

0 Kudos
Message 1 of 8
(2,922 Views)
tunnel in = each value is the same, the value passed in tunnel out = takes on the value of the last iterate shift R in = first iteration takes on the value passed in, nth iteration takes on nth-1 value shift R out = same as tunnel out
0 Kudos
Message 2 of 8
(2,915 Views)

Hallo Uwe

Habe ein einfaches VI angehängt, in dem beide Situationen ersichtlich sind. Solltest du in deinem VI wirklich ein Schieberegister haben, kannst du auf der linken Seite einfach auf das Schieberegister-Terminal rechtsklicken und dann "Replace with Tunnels" auswählen.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 3 of 8
(2,915 Views)

hi there,

be sure that the front panel is open before you start debugging the application. otherwise the ErrorIn-Cluster may show NoError though there was one.

I remember that there was a bug with LV 7.0 regarding tunnels of For Loops.

http://forums.ni.com/ni/board/message?board.id=170&message.id=98082&query.id=0#M98082

please post some code so we can have a look. what's your LV version?

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 4 of 8
(2,912 Views)
Thomas,

mein Problem ist, daß sich bei _einer_ vi beide Varianten gleich verhalten, sich also der Wert von Error_in nach dem ersten Durchlauf nicht nur am Shiftregister, sonder auch am normalen Tunnel ändert. Der Tunnel verhält sich wie ein Shiftregister!
Das VI solte ohne Fehler aufgerufen werden und solange laufen, bis der Inhalt der While loop keinen Fehler liefert. Bei mir wird aber ein aufgetretener Fehler auf den Tunnel 'gespiegelt', wodurch der nächste Durchlauf schon Fehler als EIngangswert vorfindet. Und da ich das nicht erwartete, gibt es auch keine Fehlerbehandlung dafür und die While wird im Fehlerfall endlos...

Greetings from Germany!<br>-- <br>Uwe

0 Kudos
Message 5 of 8
(2,910 Views)

Hallo Uwe

Kannst du das VI oder ein Bild davon (bitte keine *.bmp)  durchgeben?

Es ist sonst relativ schwierig bei einem Problem zu helfen.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 6 of 8
(2,905 Views)
Chrisger,

I am allmost sure it has been open.
My problem is, this is not reliably repeatable.
AND, even this subVI has a hirarchy.
I'll attach a jpg of that VI.

And I'll put a Case triggered by error_in around this code, that operates the inner code just in case no_error. This way I can feed a constant of no_error into the first 'USB open'.

Thx anyway.
Greetings from Germany!<br>-- <br>Uwe
0 Kudos
Message 7 of 8
(2,902 Views)
Chrisger,

I am allmost sure it has been open.
My problem is, this is not reliably repeatable.
AND, even this subVI has a hirarchy.
I'll attach a jpg of that VI.

And I'll put a Case triggered by error_in around this code, that operates the inner code just in case no_error. This way I can feed a constant of no_error into the first 'USB open'.

BTW, this is on LV7.1 English on W2k German with all availabel SPs .
Thx anyway.
Greetings from Germany!<br>-- <br>Uwe

Message Edited by LuI on 09-23-2005 02:15 PM

0 Kudos
Message 8 of 8
(2,902 Views)