07-12-2010 09:46 AM
I need to do summation of atleast 50 spreadsheet files containing the array and store it in a single file. which in turn is displayed using a intensity graph.
The problem that i face is only the first file gets added to Zero array but not the subsequent ones.
Any help would be highly appreciated.
07-12-2010 10:02 AM
You need to use a shift register. Also, use the List Folder function to get your list of files rather than trying to programmatically create the filename (and if you do, the Format Into String function is a much easier way to do it). See attached modification. I didn't quite understand what you were doing with the intensity chart, or what you're trying to write out to file and your description is not clear as to what's being saved or displayed on the graph. I left that part alone. If you provide a better explanation then further suggestions can be provided.
Also, please learn how to wire properly, or at least learn to use the Clean Up Diagram tool.
07-12-2010 10:06 AM - edited 07-12-2010 10:07 AM
A few problems problems.
07-12-2010 10:36 AM
This block diagram is a part of the larger scheme of things. I have to capture 50 images and store in the spreadsheet array, them sum all those and then find the max pixel ( array element) and only display that pixel in the intensity graph. I need to zero down to single pixel.
Going back to the problem, Each image stores its pixel information in the spreadsheet array and i need to sum the first file to Zero array(let us name it A) and then store it in the latter array. In the next iteration, the second file show now add to the array A. LIke this all the 50 array files should get added and from the result i need to find the max value of array.
I dont understand why List folder option is used??
Thanks.
07-12-2010 10:56 AM - edited 07-12-2010 10:58 AM
Saverio, your 2D array will remain at 0x0, because the smaller array wins at the add node.
Here's what I would do. You don't need to use "list files", its just one easy way of getting all matching files, so modify as needed. It guarantees that all files exist. In your code, you would need to handle missing file errors.
07-12-2010 11:59 AM
@altenbach wrote:
Saverio, your 2D array will remain at 0x0, because the smaller array wins at the add node.
Yeah, you're right. I completely missed that due to writing the code so fast.
07-12-2010 05:40 PM
for the above the solution, i get 2 errors.
1.' Write to spreadsheet array Polymorphic VI' is broken.
2. So i removed the above 'write into spreadsheet' and executed but the max index value is returned as -1 and -1 (which means that there is no data in the file) which is false.
S0 kindly help me solve these errors. And also i have to show the resultant summed array in a spreadsheet array file.
Thanks.
07-12-2010 06:04 PM
07-12-2010 06:35 PM
I am attaching VI and 2 sample data files. Hope this helps.
Thanks.
07-12-2010 06:35 PM
Adding to it. My labview version is 9.0