LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing 2D double precision data to binary file broke upgrading from 8.2.1 to 8.5?

Daniel, did you get a CAR# for that bug?
0 Kudos
Message 11 of 26
(2,028 Views)
Unfortunately not, I only have a SRQ number. But I will contact NI next monday and point to this thread. Then I can also ask for the CAR. The two bugs may be somehow connected. Memory management might be the problem as you found out using the "always copy" function. I'll try that in my bug report VI as well.

Message Edited by dan_u on 09-29-2007 10:45 PM

0 Kudos
Message 12 of 26
(2,016 Views)
I checked my VI, and indeed "always copy" fixes the bug.
I attached the VI (LV 8.5), but as mentioned before, this was already reported to NI.

0 Kudos
Message 13 of 26
(1,995 Views)

Thanks a lot to you regulars and veterans for confirming the problem and sharing some clever workarounds - it will be nice to be able to actually use our LV 8.5.

 

Ron Norton
Faculty Research Assistant
Gravitation Experiment Research Group
Department of Physics
University of Maryland

0 Kudos
Message 14 of 26
(1,987 Views)


@altenbach wrote:
Daniel, did you get a CAR# for that bug?


This was reported to R&D (CAR # 4DP855N3) for further investigation.

I'll have the developer confirm if these problems have the same root cause or are different. If different, we'll post the other CAR number in this thread as well.

Roy

0 Kudos
Message 15 of 26
(1,971 Views)

Out of curiosity, does this problem happen EVERYTIME you perform your operation or is there a correlation with the "size" of the 2D array as well? What if the array had only 4 elements in it?

I'm asking this 'cause I am having a similar issue, but unfortunately I'm nowhere close to a computer where I can test your code.

Thanks.

0 Kudos
Message 16 of 26
(1,868 Views)
Medi,

yes, this is a reproducible problem. Doesn't depend on the array size but on the array manipulations.
In our case we had a 2D array and indexed it to get a row. When writing this row to the binary file it's always wrong, but when writing the 2D array directly the problem doesn't occur.
Instead of forcing a copy you can use the flatten to string function and write the string to a binary file (I don't know which method is more efficient).

Daniel

0 Kudos
Message 17 of 26
(1,848 Views)


@Roy F wrote:


@altenbach wrote:
Daniel, did you get a CAR# for that bug?


This was reported to R&D (CAR # 4DP855N3) for further investigation.

I'll have the developer confirm if these problems have the same root cause or are different. If different, we'll post the other CAR number in this thread as well.

Roy



This looks very much like an optimization problem with subarrays. I know I have read somewhere about a bug in LabVIEW 8.5 in relation to subarrays. What are subarrays? Well a special kind of optimization in LabVIEW for some array functions. Instead of creating a copy of the entire array only to swap the values from one to the other (for the Transpose Array function for instance) they seem to create a subarray that kind of points to the original array and only contains the transformation information. Same with Array Subset. Here the SubArray contains information as the where the original array is and from what offset and for how many elements this SubArray is valid, but not the actual data itself.
 
And in treating such SubArrays, the compiler broke somehow in LabVIEW 8.5 for some operations. Always Copy makes from a SubArray a normal Array and everything is fine again.
 
Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 18 of 26
(1,830 Views)
I did see a similar issue where my 2D dbl file would contain data from other files!

When I changed the 2D dbl to a 1D dbl the problem was gone
'Preserve Copy' didn't work

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 19 of 26
(1,793 Views)
Christian wrote "I am still struggling to think of a scenario where "always copy" would provide benefits. Typically, the compiler decisions are pretty good.  "
 
There are sometimes when branching wires that I wished LV would create the copy for the other branch.
 
I would try that function in those cases.
 
Don't have LV 8.5 or an example handy.
 
Ben
 
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 20 of 26
(1,784 Views)