10-16-2008 05:25 AM - edited 10-16-2008 05:30 AM
Colleagues,
I just would like to post here small, but important bug (I guess this is the bug), which was found by coworker today morning. Just would like to share knowledge, and probably this will save some debugging time for you...
So, the problem that you can get wrong content of the cluster in some cases. The cluster used inside of while loop with shift register (we using this construction for functional globals), and after bundle operation you can get data, which are not expected:
See also attached code for details (LabVIEW 8.6.1, WinXP Prof SP3).
best regards,
Andrey.
PS
Bug report already sent to NI.
10-16-2008 06:25 AM
Hi,
Please could you post your code in 8.5.
Does the bug exist in 8.5?
Thanks
Dave
.
10-16-2008 06:36 AM
Yep. In LabVIEW 8.5.1 this trouble also present as well.
Andrey.
10-16-2008 06:41 AM
10-16-2008 07:00 AM - edited 10-16-2008 07:01 AM
In addition:
Just putting one-frame sequence around bundle operation will also solve this problem:
Andrey.
10-16-2008 07:23 AM - edited 10-16-2008 07:24 AM
Heres another workaround. Do the bundles separatly, in order.
Dave
10-16-2008 08:04 AM - edited 10-16-2008 08:05 AM
Thanks Andrey for brining this to our attention!
The "Show Buffer Allocations" reveals that LV is not processing the code in the right order.
Under ideal conditions, all of the data should be manipulated using the buffer "A". But as this demo shows the data is being processed in the wrong order.
The previously posted workaround get around this by forcing the array operation to happen first, but this resluts in two additional buffers "C" and "D" and then copy this back into "B".
Using an "Always Copy" is another workaround that uses a seperate buffer "F" to hold the data being moved from the first cluster to the second inside "E".
I think you won a shinny new CAR* Andrey!
Ben
CAR = Corrective Action Report
10-16-2008 08:55 AM
Thanks, Ben for the most elegant "Workaround"!
Now I know how to use "Always Copy" properly! Newer used it before...
And now I understand what mean this sentence in Help: "...Use this function when you want to control LabVIEW's compiler in order to produce a different result regarding its buffer allocations..."
Andrey.
11-05-2008 04:42 PM - edited 11-05-2008 04:43 PM
Hi,
This was reported to R&D (# 131499) for further investigation. Thank you everybody for all the information and for posting the workarounds.
11-05-2008 05:00 PM
I can't open the VI because it is in 8.6
what I can see is that you are using 2 clusters within the main cluster.
I might be asking a dumb question here.....
Are these 2 clusters identical?
I tend to use controls (strict typedef's) to ensure that they are the same.
If you change the order of the elements they can misbehave.
This is easy to do if the cluster was created using "build cluster" instead of build cluster by name.