LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i control the write-data-to-spreadsheet.vi to record data?

Solved!
Go to solution

Hi all,

i was trying to plot a wave and save the data to excel. Now i want to control the write-data-to-spreadsheet.vi to record data whenever i wish which means the vi won't record anything until i send a command to it. How can i make this happen or do i need any other vis?

Nicky

0 Kudos
Message 1 of 9
(3,732 Views)

You will need to put a little bit of programming around the write data to spreadsheet.vi to do what you want.

 

For instance you can put a button on you front panel with the label "save to file" and on the diagram, put an event structure that will detect a "value change" event on that button, and only then would you use the write data vi to save the data from your plot to a file.

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 9
(3,721 Views)

Thanks for the reply. But could you explain the "value change" more clearly coz i didn't get the point.

Nicky

0 Kudos
Message 3 of 9
(3,710 Views)

After placing an event structure on you block diagram, you can right clic on the frame to "add event", then you have to define the event you want the structure to be able to catch, in your case a clic on the "save" button, so in the event edition dialog windows, select the control (the "save" button) and then the type of event on this control (a value change).

 

You should be able to find example on how to use the event structure if you go to "Help" >> "Find examples..." and search for "event".

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 9
(3,707 Views)

it seems doesn't work. And what should i put in that event structure? i was also wondering if i can use a case structure to make it.

0 Kudos
Message 5 of 9
(3,669 Views)

Hello,

I don't know exactly how you want your application to work but I think the event structure is a nice option, you can get it to work as well with a case structure though.

 

Here is a very simple example with an event structure (in LV8.6), do you want the same kind of behaviour or do you want something different?

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 6 of 9
(3,666 Views)

Firstly, thanks for the vi. I guess I didn't tell so clearly in my previous post. What I mean is that suppose a stream of numbers is reading continuesly but I don't want them to be saved to file. From the moment I click on the save button the following numbers will begin to be recorded in file.

0 Kudos
Message 7 of 9
(3,656 Views)
Solution
Accepted by topic author Nicky87

Hi,


May be this wat you are trying to do.. Let me know if it helps..

 

Regards,


nitzz

(Kudos are always Welcome:))

Message 8 of 9
(3,653 Views)

Thanks Nitzz. It really helps 🙂

0 Kudos
Message 9 of 9
(3,650 Views)