LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BUG: auto-indexed tunnel on timed loop adds extra element on abort

When using an auto-indexed tunnel on a timed loop structure and aborting the structure with "stop timed structure", I get an extra element at the end of the array initialized to the default values of the element. The array will have i+2 elements and not the expected i+1. If I use a normal tunnel to just output the last element, it returns the expected element. Using a feedback node and build array also gives the expected array after the loop. See the screenshots:

 

timed_loop_FP.png

 

timed_loop_BD.png

 

Can someone reproduce this?

0 Kudos
Message 1 of 8
(2,686 Views)

Hi cober,

 

I cannot reproduce the problem. I'm using LV2012 on Win 7. Which version on which OS are you using?

 

Regards

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

Happens both with Labview 2012 on WinXP SP3 32-bit (running in a virtualbox on a Win7 64-bit host) and Labview 2012 SP1F1 on WinXP SP3 32-bit (a "real" PC).

0 Kudos
Message 3 of 8
(2,644 Views)

Hi,

 

I used a simple auto indexed array of strings. Can post your VI?

 

regards

0 Kudos
Message 4 of 8
(2,618 Views)

I can reproduce this using  LV 12.0f3 32bit on WinXP Pro SP3 32bit

 

MC

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

Using a string array also gives an additional empty string at the end of the array.

In further tests I also reproduced the bug with LV2011SP1 on WinXP.

0 Kudos
Message 6 of 8
(2,606 Views)

 

I could reproduce the behavior with your VI, but I don't really think it's a bug since the timed loop throws an error (-816). You need to wire the Conditional Terminal. I modified your VI and it works fine now (see attachment).

0 Kudos
Message 7 of 8
(2,592 Views)

I would still consider it a bug, or at least very, very unexpected behaviour. 

 

1. the error-out of the loop does not trigger automatic error handling. I didn't check the error terminal, because I expected it to pop up a message if an error occured.

 

2. the error message is "Timed structure aborted or attempted to execute another iteration of the following aborted Timed Loop." Btw. in the german version of the error text the "Timed structure aborted or" is not mentioned, so I don't know if aborting a loop from the outside itself is already considered an error. If it isn't then where is the additional try of executing the loop coming from? The iteration itself obviously does not happen, as the counter, the output of the FB node and the single cluster show.

 

3. In any case I would expect the loop counter to match the last index of the array (i. e. i+1 elements in the array). If not that, than to be consistent at least the tunnel of the single cluster would have to revert to it's default value.

 

4. If the supposed way of stopping a timed loop is by handling the "aborted"-case inside the loop, then using the conditional terminal should be mandatory (as it is with normal while loops).

 

 

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