LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

export waveform to spreadsheet

Hi guys!
 
Right another problem for you all! (suprise suprise)
 
I am writing to an "export waveform to spreadsheet.vi" with some success.... However I have a couple of problems:
 
1) I am writing to it inside a while loop, it correctly puts in all the data for the first iteration, however on the second and subsequent iterations it creates the new file but doesn't put any data in it! Any ideas?
 
2) To speed things up in the data capture loop I am not immediately writing to a graph output, what I wanted to do is once all the data has been written to that file is to reopen it and plot this in a a graph so the user can tell if an event occured in the previous iteration! However the read "waveform from spreadsheet" doesn't seem to read the data?
 
Thanks
Jon
0 Kudos
Message 1 of 2
(2,377 Views)

Hey Jon,

I have had a brief look at your code, and I think I have solved your saving issue. Please find the attached VI. It will require a bit of tinkering at your end, to fully integrate the new VI into your project, but hopefully it will solve your problems.

You are obviously well versed in LabView, so you will be able to follow the code with ease. I have added a couple of comments to the block diagram, so hopefully that will help further.

One of the major changes is - rather than loading the data froma file you have just created, the program will display the data just before it is saved. This simplifies the code greatly.

Other changes include

-          The DAQmx channel is only stopped and started once.

-          The number of samples to read per iteration is now defined at the DAQmxRead function. It no longer requires a loop of its own. By varying the number of samples to read, and the sampling rate, you can define how long the program aquires data before saving it.

-          You no longer require loop timing. Infact, in the current set up, loop timing would eventually result in a buffer overspill.

I hope this has been of some use to you, and I look forward to hearing how you get on.

Best wishes

Rich Robot Very Happy

Ps. The attached VI is written in LV8.5. Dont hesitate to let me know if you are using an older version of LabView.

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
0 Kudos
Message 2 of 2
(2,349 Views)