LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

incorrect time data after reading measurement file

Hello,

 

I'm encountering a weird bug of sorts. I previously measured some data from a basic NI DAQ with on-demand timing and wrote it into an LVM file for later use. The data looks fine when I graph it in other programs.

 

When I read the measurement file in Labview, the time axis is totally wrong. For some reason, it wants to ignore the time values I specify in the first column. The only thing I can think of that is causing this issue is the on-demand generation in that dt is not constant throughout my measurements.

 

If that's the case, do I have a fundamental misunderstanding of what the waveform data type looks like?

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

Without seeing the file and how you are displaying it, it is impossible to say where the misunderstanding is. Zip up your file and VI attach it.

0 Kudos
Message 2 of 8
(3,316 Views)

Hi,

 

I've included some sample data. I've had to rename it to .txt in order for it to attach. Please rename to .lvm before use. The graph VI is pretty basic, but I've included it anyway.

 

As seen immediately, the time axis does not correspond to the data in the file.

Download All
0 Kudos
Message 3 of 8
(3,310 Views)

You don't appear to have a legitimate lvm file. Just a plain tab delimited text file so the Read From Measurement fails. I don't know how you created the file and I never use the Express functions anyway but you can use the Read From Spreadsheet File.

0 Kudos
Message 4 of 8
(3,308 Views)

What?

 

That was copy/pasted from a LVM file written in tab-delimited and no header. Like I said, I had to rename the file to a txt file from a LVM in order to get it to attach.

 

edit: Also, I have zero issues reading from the data file. My problem is that the time axis is seemingly ignored.

0 Kudos
Message 5 of 8
(3,304 Views)

Pehaps you don't have the options set correctly for the read. I noticed a difference if I unchecked the 'First column is time channel'. As I said, I don't use Express functions.

 

Another note is that however you saved the data, there are some problems because of repeated times.

0 Kudos
Message 6 of 8
(3,296 Views)

Yes, I was about to reply about the repeated time points. That is a known issue on our end because of the DAQ writes on-demand in Labview. Not exactly sure why it writes like that though, since the measurements are nowhere that fast. I loaded up the file in Signal Express and it doesn't seem to like the file; it wanted the time axis to always monotonically ascend.

 

As I understand it now, Labview must have a strict requirement that all time data must increase when read. That seems quite odd, considering that it's able to do that when writing.

0 Kudos
Message 7 of 8
(3,291 Views)

I think you need to show the VI where you are writing the data so we can see what problems might be in there.

0 Kudos
Message 8 of 8
(3,275 Views)