03-05-2013 07:46 AM
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:
Can someone reproduce this?
03-06-2013 09:29 AM
Hi cober,
I cannot reproduce the problem. I'm using LV2012 on Win 7. Which version on which OS are you using?
Regards
03-06-2013 11:58 AM
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).
03-07-2013 02:38 AM
Hi,
I used a simple auto indexed array of strings. Can post your VI?
regards
03-07-2013 02:44 AM
I can reproduce this using LV 12.0f3 32bit on WinXP Pro SP3 32bit
MC
03-07-2013 03:44 AM
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.
03-07-2013 06:27 AM
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).
03-07-2013 08:22 AM
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).