LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use a 2d array to populate a Combo Box and Return a different value.

Solved!
Go to solution

I am extremely new to Labview. I have been attempting to write a VI that reads in 3 columns of data from an excel spredsheet (.csv) as a string array. I was able to figure that out and then isolated the 2nd and 3rd column in order to change the data into double format. What I want to do is use a combo box to refrence the 2nd column of data and return the 3rd so that it can be multiplied by my waveform in post processing. I would like to make it easy for the user to setup the gauge sensitivity. I have attached my VI and an example of the data that I am trying to read in. Please give me a hand.

 

Thanks

montoya51

0 Kudos
Message 1 of 13
(5,256 Views)

You probably want to use the index array function instead of the array subset function....

 

 

Read input excel_BD.png

0 Kudos
Message 2 of 13
(5,250 Views)

And of course you can't connect a numeric array to something that expects a string array, It's also silly to put the code inside a while loop. Why keep reading the data over and over again?

0 Kudos
Message 3 of 13
(5,237 Views)

Baby steps....

0 Kudos
Message 4 of 13
(5,230 Views)

With you guys help I have begun to understand the mistakes i have made and have begun to move in the right direction. I do appreciate it. I think I need create a cluster with a string and double to wire to a string and value control. I just do not know how to do that. I am also not sure it that is right. I feel like I am close. I appreciate any help anyone can offer. 

 

Thanks

0 Kudos
Message 5 of 13
(5,228 Views)

No. As the context help shows, you need a cluster with two strings for the Strings and Values property.

 

If you had included the text file or shown the data read (your indicator is empty), it might make more sense to us.

0 Kudos
Message 6 of 13
(5,224 Views)

I appreciate the help but I am still a bit lost. I just know that I need the output values to be a double so that I can use it to change my waveform. Here are is my csv file and VI. 

0 Kudos
Message 7 of 13
(5,221 Views)

Your VI still has no data. You simply can't post it. You have to make current values default, then save the VI.

 

No idea what you mean by changing the waveform but the strings and values is a cluster of two strings - period. You would convert the output of the control.

0 Kudos
Message 8 of 13
(5,213 Views)

I tried to insert it again and it didn't work. I did make it default so you could take a look at my source data.

 

I am doing just a small part of an overall VI this will be added to a much larger VI later that will be reading in a waveform and this VI will be part of the post processing.I do see that I could change from a string after the ring. I saw an example that had it similar to the way I am trying to do it so I thought I could do that too.

 

 I really apreciate your help. I have been trying to figure this thing out pretty much all day and need to get it going fast. I am a structural engineer and have not done programming since HS.

 

Thanks 

0 Kudos
Message 9 of 13
(5,206 Views)

I forgot to attach.

0 Kudos
Message 10 of 13
(5,205 Views)