08-27-2009 09:46 AM
This is my first post, so I will probably miss some thing or other. I will address anything missed ASAP. I am writing LV code to test incremental count stored in a CSV text file. Counts represent stimulated current of a diode in a radiation beam. The product is a QA device for a medical radiation therapy machine. An integrator's output proportional to the diode current accumulates as integer counts in the text file. My LV code puts the counts into arrays, calculates time derivative incrementals and statistically analyzes them. The data array's column numbers represent unique components. The failing data column number is sorted into a 1D array of failing column numbers. As if failing column 10 represents CR39 of PCB 11. I need an algorithm how to relate a string such as CR39-PCB11 to either the element of the 1D failure array or relate the string to the column of the data array that fails. Could you suggest a way to do this?
Solved! Go to Solution.
08-27-2009 09:59 AM
08-27-2009 10:28 AM
Could you attach a small example CSV file, just so I can see how everything is formatted.
08-27-2009 10:50 AM
Have a look at the spreadsheet string to array function. You propably need to set the delimiter to ','.
Felix
08-27-2009 12:09 PM
CSVroadmap.png screenshot with comments.
moviedata_sums.txt is the CSV file.
08-27-2009 12:14 PM
08-27-2009 12:32 PM
My bad. Posted is a screenshot of the vi after testing moviedata_sums.txt. In the CSV file, columns of data alternate between the 2 up's and at a glance do not look as if accumulating. The summing of each column E, F... is seen by sorting the even rows and odd rows into separate arrays.
08-27-2009 12:42 PM
Sorry, I don't get where you're stuck.
Felix
08-27-2009 01:52 PM
In the attached screenshot, my code found zero value updates in the Odd Data Array at columns 36, 132 & 137. I am asking for ideas on how to call up a corresponding component ref designation string for the failed data. If a column number is added to the failure array, I want to display a component ID tag for replacement. Currently the tech uses a lookup table.
Greg
08-27-2009 02:08 PM
If I understand you correctly, instead of those numbers that are in the 'Zero Updates(odd)' you want to have strings. At the moment, the operator is using a lookup-table, to find the string (component) which corresponds to the column number.
That's easy, as you only need an array of strings (corresponding to column numer 0..n) and use the index array function with the index of the column. Place it in a for loop to get all indices of the failures (autoindexing of the for loop).
Felix