LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i display the waveform chart values to write to spreasheet

Hello,

 How can i Export the waveform chart values (both X-axis and Y-axis Values ) into a write to spredsheet. I need to display both time and amplitude in excel in two coloumns. Please help me with this issue.

 

Thanks

0 Kudos
Message 1 of 6
(3,416 Views)

Hi liviya,

 

I think there is a lazy way to use the invoke node of the waveform chart : Export Data to Excel...

 

 

20151111002.png

0 Kudos
Message 2 of 6
(3,389 Views)

Hello William,

 

I have used it earlier, but it displays only the values from the existing graph, but i want to display all the previous and existing values from the graph. Is there any way i can do that?

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

First of all, you should understand what is the difference between a Chart and a Graph in LabVIEW (and do not mix these words 🙂 ).

Practically a Graph in LabVIEW just plots the values at once, and at the next iteration all the values are completely overwritten by the new values (so Graph does not have history, "memory"). 

If you use a Chart in LV, the chart has a built-in memory space, and its size you can set at the "chart history length" value (right click on the Chart on the Front Panel to see this setting option). The default value is 1024, and it does not make too much sense to set a higher value, since then LV need to downscale the info to be able to draw curves/points on the Chart.

 

In your application I would do some changes in order to decouple the DAQ and the display/logging tasks (even if a DAQ is slow, I think it is better to have a second loop to log data independently and lossless way). You can use a Queue to send data to a second loop, where you can decide with a Boolean button whether to plot/log the incoming values. Also, you can easily add absolute time stamps to the measured values in the top loop.

Another problem in your application, is that you open and close the VISA resource at EVERY iteration of the DAQ while loop. This is wrong!

 

Here is something in my mind (the error handling could be improved further...):

 

ProjectB_mod_BD.png

0 Kudos
Message 4 of 6
(3,346 Views)

Hello,

Thanks for your suggestions, it works fine now. But i had an another problem. I need to subtract the previous value from the present value from read string values. so that i can measure the count rate/sec. I tried to use 2 read strings and decrement one read string by 1 sec and tried to subtract the read stings , but it doesn't worked fine.Is there anyway that i can subtract read string present and previous values and display on Front Panel. Please help me with this problem.

 

Thank you

 

0 Kudos
Message 5 of 6
(3,300 Views)

The principle how to get value(s) from a previous run of a VI or a loop iteration is one of the most basic thing in LabVIEW. Do you plan to program more in the future? I really recommend you to start to learn using the available resources (like the Core 1-2 online course):

http://sine.ni.com/tacs/app/overview/p/ap/of/lang/en/pg/1/sn/n24:12725/id/1582/

 

Here you can use a shift register, or to save space, a feedback node:

 

Example_VI_BD.png

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