LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bug in LV6 & 7 for - loops

Hi folks,
I found a bug in LabVIEW 6.1, which was not there in V6.02. I wonder if
it also occurs in LV7. So if somebody could verify this and knows a
solution for LV6.1, I would be very happy.

Bug Description
Short desc:
Different handling of indicators inside for-loops.
Detailed desc:
A for loop in a subvi with a 0 connected to the N connector of the loop
should be executed 0 times and therefore leave loopinternal code and
indicators untouched. In this way it was possible in the past to let the
loop do its iterations for n>0, or give back the unchanged values of the
last call again if n=0.
This was the way LV6.02 behaved and I think this is correct handling of
for loops.
But LV6.1 allways clears all indicators. This is complet
ely unnessesary,
since there is a switch in VI-Properties-Execution called "Clear
Indicators When Called".
Now lots of my subvis in my library won't work anymore.

Rainer Ehrt

--

### Please remove all numbers in email address for reply ###
0 Kudos
Message 1 of 3
(2,522 Views)
Oh,
I forgot to mention...
Please tryout my attachement for the For loop bug in the above posting.

Thx,
Rainer


--

### Please remove all numbers in email address for reply ###
0 Kudos
Message 2 of 3
(2,522 Views)
Hello

I've copied this from the "LV 7 Upgrade Notes" PDF file:

"Default Data in Loops
In LabVIEW 6.0 and earlier, For Loops produced undefined data if the loop did not execute. In LabVIEW 6.1 and later, For Loops produce default data if you wire 0 to the count terminal of the For Loop or if you wire an empty array to the For Loop as an input with auto-indexing enabled. The loop does not execute, and any output tunnel with auto-indexing disabled contains the default value for the tunnel data type."

Use shift registers to transfer values through a loop regardless of whether the loop executes. You've done that!

Regards,
Luca
Regards,
Luca
Message 3 of 3
(2,522 Views)