LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write to excel from oscilloscope

Solved!
Go to solution

Hello guys,

I control my  real oscilloscope with this code and I need to write the data in an Excel file.

How can I write data acquisitions from this program? I tried with the write to measurement file function but it does not work. Smiley Happy
 
labview 2018 accademy
oscilloscope Rohde Schwarz RTO2044
 
Thanks
 
0 Kudos
Message 1 of 8
(1,607 Views)

There are no signals given as input to write to excel file.

 

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 8
(1,600 Views)

what is the signal I have to use to save data with that block?

if I use the signal that goes to the chart it does not work, and it is the same if I use waveform array.  

0 Kudos
Message 3 of 8
(1,582 Views)

There are several questions to clarify.

  • By "Excel", do you mean that you want to write data in Excel's proprietary .xlsx format?  For that, you would need to use the Report Generation Toolkit and create an "Excel Report".
  • An alternative is to write a "Delimited Spreadsheet File", a Text file with rows delimited by lines of text, and columns delimited by a <tab> (the default case) or perhaps a comma (in which case the file can be called a "comma-separated Values" file, or a .csv, which Excel can also seamlessly read, along with any other routine that reads text).
  • What is the format of the data you wish to write?  Neither Excel nor LabVIEW's "Write Delimited Spreadsheet" function will accept a Waveform as input, for example.

Bob Schor

0 Kudos
Message 4 of 8
(1,557 Views)

Thank you very much,

the waveform that I get from instrument driver seems to be generated using an array of double. Which is in your opinion the easiest way to print this array into a file? 

 

thank you

0 Kudos
Message 5 of 8
(1,548 Views)

@King_Rob wrote:

Thank you very much,

the waveform that I get from instrument driver seems to be generated using an array of double. Which is in your opinion the easiest way to print this array into a file? 

 

thank you


I can't look at your code because it's a newer version than I have but...

 

If the VI's for your scope can output a waveform as a 2D numeric array (X in one column and Y in the other) then all you really have to do is use the "Write to Delimited Spreadsheet" vi and write it to a file.

 

By default that vi will make a TAB delimited text file, but Excel will have no problem opening it you just have to jump through a couple hoops first. Launch Excel and use File->Open to open the file. Excel will launch the file importer and if you read the prompts you will see you can click right through it. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 8
(1,542 Views)

I used ''Write to Delimited Spreadsheet'' this is a screen. Waveform is a Sine, the plot about ''current data'' inside the loop is a sine, but if I open the data inside ''file.TXT'', I don't find a good data to plot the waveform. I want a file with a 2 column, but the file was not written like that.

Where do I wrong?

How can I see the format of current data?

 

program.PNGshot of display 

0 Kudos
Message 7 of 8
(1,524 Views)
Solution
Accepted by topic author King_Rob

You have the Array input on the For Loop set to Indexing and you have a 1 wired to the Count Terminal.

 

Remove the For Loop around the write section.

 

A For Loop with a count of 1 only runs once, that makes the For Loop itself superfluous.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 8
(1,513 Views)