LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I sum similar elements in one column and then correlate it to a 2nd column of data

Hi,
 
This may be a very beginner type question but I would like to be able to add the similar elements in column A and get a sum total.  I would like to get a total of the different elements in B (sum of c's and d's). 
 
Then I would like to then correlate elements in B with the elements in A that are of the same number.  The B column needs only to give one data either  c, d or (hybrid c & d)  So for data set 1 the output would be c, data set 2 the output d, data set 3 output d, data set 4 the output would be hybrid (c&d) and data set 5 output c.
Then I would like to sum the outputs above.  The total would be 2 c's 2d's and 1 hybrid.
 
A       B                           
1        c
1        c
2        d
2        d
3        d
4         c
4         d
5         c
 
I hope I explained my question clearly and I thank you for your time.
0 Kudos
Message 1 of 6
(3,245 Views)

Hi gweee,

I think this could be handled very easy using the array-functions (Functions Palette>Array) in LabVIEW. What functions you would need to use, just find out with the Context Help!

Regards, Christian

 

P.s.: "Learning by doing" Smiley Wink

0 Kudos
Message 2 of 6
(3,227 Views)
  Hi,

Thanks for the reply....nothing is simple for me at this point.  I would grealy appreciate your thoughts on my VI.  This completes the first part of my question. (I am sure that there is a better way).  I don't think I could solve this or the second part via the show help function. Once again thanks for your help.

Derek
0 Kudos
Message 3 of 6
(3,215 Views)
Christian,
 
I accidently gave you 1 star. I have tried to make up for it in other random threads
 
Sorry about that.
 
David
Message 4 of 6
(3,189 Views)
Here it seems you just want to count, sorting is not really needed. 🙂
 
One simple solution would be the attached VI.
0 Kudos
Message 5 of 6
(3,161 Views)

Hi!

@David    no problem!

@G-test   Does it work now with altenbachs suggestion?

 

Chrisitan

0 Kudos
Message 6 of 6
(3,127 Views)