LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Correlation Between several Different Arrays & Saving Results Into a.CSV file

Hello Everyone!

I have 3 arrays from which I initialize a .CSV file when I run my VI ( as you can see in the example file.)( I use data from other arrays as well but it is not important )
The First array "customer Number" can be from 0 - 15
The second array "Customer Present" is a Boolean.
The Third array will contain some fix values like " milk, meat, clothing....." it will have 14 different categories.
The Fifth array will contain the quantity of the products from each category from the previous array.
My job is to add in my initialized .CSV file the values from the 4th and 5th array but only for the customers that are present.
The result should look something like the second part of the doc I give( which sadly, I created by hand)
If no customer has bought something from a category it should not be mentioned.
Also it would be nice for me if I separated the file for each customer ( create 16 different files )
I hope someone has some idea, because I don't.
I figured out that I should have the bool array into a case structure and if the customer is present then........

Thank you in advance!

Download All
0 Kudos
Message 1 of 4
(2,356 Views)

Hi Eleftherios, 

 

I'm not completely sure what you want to achieve, but using the "Read from Spreadsheet file" VI you can easily read your configuration file into a 2D array. From there you can extract single colums and manipulate them according to your needs.

0 Kudos
Message 2 of 4
(2,313 Views)

I shall try that approach and let you know how it goes. Thank you

0 Kudos
Message 3 of 4
(2,307 Views)

I don't understand where correlation fits into this...

 

It seems to me that you're trying to write out a file from the values on front panel controls, rather than the other way around, as Bernd was suggesting. I see no actual read functions in your screenshot. What does your front panel look like? Can you post the VI and give a brief description on how it's supposed to be used? You seem to have some front panel arrays that you're indexing out. For this you should be using auto-indexing rather than using a fixed constant. Also, the local variables are completely unnecessary - what I see is text-based programming.

0 Kudos
Message 4 of 4
(2,294 Views)