LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array spreadsheet array

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.

0 Kudos
Message 1 of 32
(3,454 Views)

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. Smiley Wink

0 Kudos
Message 2 of 32
(3,439 Views)

A few problems problems.

 

  1. You are adding to an array control.  If you want to continually to add, you need to store that array from loop iteration to iteration using a shift register.
  2. I don't know what you are trying to do with the array max and intializing an a 1 x 1 array to feed to the intensity graph.
0 Kudos
Message 3 of 32
(3,431 Views)

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. 

0 Kudos
Message 4 of 32
(3,416 Views)

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.

 

 

 

Download All
0 Kudos
Message 5 of 32
(3,408 Views)

 


@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.

 

0 Kudos
Message 6 of 32
(3,391 Views)

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.

0 Kudos
Message 7 of 32
(3,367 Views)
Please tell us your labview version, attach your vi, and attach a typical data file. We cannot fly in pitch dark. Don't make us guess everything!
0 Kudos
Message 8 of 32
(3,359 Views)

I am attaching VI and 2 sample data files. Hope this helps. 

 

Thanks.

Download All
0 Kudos
Message 9 of 32
(3,346 Views)

Adding to it. My labview  version is 9.0

0 Kudos
Message 10 of 32
(3,345 Views)