LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data being collected does not look as expected? Can someone please help?

Solved!
Go to solution

I'm reading from analog pin on my device. I can see data being displayed on the waveform graph and I'm okay with that. The only thing that I don't like my data on excel does not look as the  data being exported from waveform to excel. 

Below is how my data looks like:

GRCK5000_0-1681147500699.png

 

When I right click on the waveform and do export to excel, data looks very good as you can see below. 

GRCK5000_1-1681147558151.png

GRCK5000_2-1681147603166.png

How do I write to excel so that it looks like the exported data?

Can someone please help?

 

 

 

 

 

Download All
0 Kudos
Message 1 of 22
(1,288 Views)

You take your Y data and build a waveform without specifying x0 and dx, so LabVIEW assumes x0=0 and dx=1.

Don't extract the Y data if you need the waveform timing information for the graph.

 

Please don't wire waveforms to the file save!

 

The waveform only contains the currently displayed data. It can never show all the history data as in the appended text file.

 

altenbach_0-1681151595747.png

 

0 Kudos
Message 2 of 22
(1,265 Views)

You just need to wire a second Truth constant to input TRANSPOSE. 

The frequency column I'm assuming is actually the time right ? SInce you are sampling at 1 KHz, you don't need the timing just the sampling rate to plot the data.

ROtakeCanada_0-1681151405294.png

 

0 Kudos
Message 3 of 22
(1,262 Views)

@LVNinja wrote:

You just need to wire a second Truth constant to input TRANSPOSE. 

 


The problem is exporting to excel. With each iteration, they are only appending one row to the text file, so that part is fine.

0 Kudos
Message 4 of 22
(1,256 Views)

@LVNinja wrote:

You just need to wire a second Truth constant to input TRANSPOSE. 

The frequency column I'm assuming is actually the time right ? SInce you are sampling at 1 KHz, you don't need the timing just the sampling rate to plot the data.


The more proper way it to just use the Export Waveforms To Spreadsheet File VI.  It can be found in the Waveform->Waveform File I/O palette.

 

However, if it were me I would create/open the file before the loop, format the data myself and write to the file inside of the loop, and then close the file after the loop.  This is A LOT more efficient.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 22
(1,236 Views)

@crossrulz wrote:
However, if it were me I would create/open the file before the loop, format the data myself and write to the file inside of the loop, and then close the file after the loop.  This is A LOT more efficient.

Yes, good advice, but irrelevant for the question, which was (IMHO) exclusively about "right-click on graph, export to excel". Apparently, they were already happy with the csv save.

0 Kudos
Message 6 of 22
(1,219 Views)

I made this change below and still missing data from the x-axis (0 to 999)

GRCK5000_0-1681159373833.png

 

 

0 Kudos
Message 7 of 22
(1,209 Views)

Hi crossrulz,

Thanks for the suggestion. My goal is to replicate what the export waveforms to spreadsheet can do.

0 Kudos
Message 8 of 22
(1,208 Views)

I tried but I'm only getting one column of the data. I'm not missing tank pressure column if only I can get the tank pressure, my problem will be solved. I don't even care much about the headers. 

0 Kudos
Message 9 of 22
(1,207 Views)

I would recommend you use the built-in TDMS logging feature of the DAQmx driver. You can refer to the shipping example of Voltage Input - Finite and enable the logging.

You can then open the TDMS file using Excel Importer, and even export the data to excel. Export TDMS File with Large Dataset to Excel File

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 10 of 22
(1,194 Views)