From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-12-2010 07:51 PM
In the 0 case, you need to wire from the read spreadsheet file through rather than from the shift register wire.
For #1, the write to spreadsheet file being broken, either you have something wrong with your LabVIEW installation where that subVI is broken, or something else is wired up wrong. Post your VI with that included so we can see.
On your path control, you should set the browse option so a folder is selected rather than a file.
Your .txt files have some issues. Your delimiter is multiple spaces (except one row has a tab) while the Read from Spreadsheet file is set to use tab as a delimiter by default. You either need to clean up the text files, or read them as strings and do some text manipulation so that the multiple spaces and tabs are cleaned up before the string data is converted to numbers.
07-12-2010 08:21 PM - edited 07-12-2010 08:22 PM
@MscSarat wrote:
I am attaching VI and 2 sample data files. Hope this helps.
I have no idea what you are doing with array min/max and initialize array, while throwing away the entire 2D array? What is the purpose of sending a 1x1 array to an intensity graph. Makes no sense!
Also, my code above is a "snippet". you can drag the image to the block diagram and it will turn into runnable code.
07-13-2010 03:09 AM
Since i needed to add the empty array(with zeros) with the first file , case 0 doesnt hold true , is in it?. because array 0 is wired straight to array max and min, in fact it should be added up to the spreadsheet array coming from the 'read from spreadsheet file' and then wired to max and min.
then in the case 'default', the connection is fine i think.
i am attaching the VI.
labview version 9.0
07-13-2010 11:04 AM
As Altenbach said in message 5, you can't add an empty array to an array from your first file because you end up with and empty array.
An empty array is NOT the same thing as an array full of zeroes. An empty 2-D array has no elements in either dimension. An array of zeroes has M x N elements all zeroes.
That is why in the zeroth iteration of the loop, you just want to take the first array you read as is and feed that to the shift register. Now you have a 2-D array with M x N elements that you can add your second array to in the iteration 1 of the loop and so on for all later iterations of the loop (the default case).
07-13-2010 11:08 AM
IT MAKES NO SENSE!
All you are doing is taking the largest value from the 2D array, then making a new 2D array containing a single element with that value and graphing it on an intensity graph. To display a single number, I would suggest a numeric indicator instead.
07-13-2010 05:36 PM
As i said b4
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.
07-13-2010 06:51 PM
MscSarat wrote: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.
Adding the first file to a zero array is the same as just taking the first 2D array directly. My code does that. Have you tried?
Finding the max should only be done at the end once (and not 50x with partial data!), so that part should go after the FOR loop.
07-13-2010 07:00 PM - edited 07-13-2010 07:00 PM
Sorry, I wired case zero wrong, here is a corrected version. See if it works for you.
(It assumes that the data files are in the same folder as the VI, modify as needed).
07-14-2010 11:20 AM
I seem to be getting the result..
But when i try to display the summed up array in a spreadsheet array text file..
it tells that the 'write to spreadsheet file ' array is broken.
can u help me on this??
thanks
07-14-2010 11:22 AM
Attach your VI so we can try to reproduce it.