LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing to a table in labview

Solved!
Go to solution

Hello everyone,

 

Iam new to  labview and have to make an application where when the user presses a  button   the  data  in 3  numeric controls get  stored  in  a table.

and when user  presses the  button  again new values get stored in the next row.

I am not able to figure out how to do it.

 

Any help will be greatly appreciated. Thanks for your help in advance. 

 

Raj

 

0 Kudos
Message 1 of 7
(3,305 Views)

Hi Raj,

you can use the "Write to Spreadsheet file" function with true connected to "append to file".

 

Mike

Message 2 of 7
(3,294 Views)

You can use the "Event Structure" (to wait for the user input, button pressed) in a while loop so it waits repeatly for the command. Inside them you can use what MikeS81 said, for writting the necessary data in the wanted table.

For the program to wait for the button-input, rigth click the "Event Strucutre"'s border and select "Add Event Case..." option. Then just select your button and chose "Value change" at the Event box.

Message 3 of 7
(3,289 Views)

Hi Mike

 

I wan't to write the data to  a table on my front panel not  a file. How do I use the function given by you  to write in a table.

 

Raj

0 Kudos
Message 4 of 7
(3,277 Views)
Solution
Accepted by topic author akath

Hi Raj,

you can use a 2d array which you store in a shift register. Use the "add array" function for a new line.

 

Mike

Message 5 of 7
(3,271 Views)

Hi Mike,

 

Thanks for your reply. But I was not able  to  solve my problem from the image you give me. So  could you  please  send me its VI.

I  was  not able to make a shift register for event case which monitors when  the button for  updating table  is pressed. 

 

Thanks in advance

 

Raj

0 Kudos
Message 6 of 7
(3,237 Views)

akath,

the shift register has to be at the while loop window, not at the event case...

Hope the following VI can help you

Rafael

0 Kudos
Message 7 of 7
(3,207 Views)