LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read from measurement file (wrong values)

Solved!
Go to solution

I have a VI where I save data using the ''Write To Measurement File utility''. When I open the .lvm file in the note pad I can see all the data correctly, but when I use the "Read From Measurement File" tool and try tho make a graph the data shown is not correct. Attached the .lvm file and one image of the chart that labview made using the "Read From Measurement File". If you open the lvm in the notepad you can see that the time column goes up to  22 sec. In the chart the time axis goes only up to 7,5 sec. What is going wrong??? Thanks

 

Ps: I changed the file .lvm to .txt to attach

Download All
0 Kudos
Message 1 of 10
(3,292 Views)

One possibility, the use of a comma for the decimal point may be causing problems with the interpretation of the data.

 

The other possibility, the Express VI is not set properly to recognize the first column as a timestamp.  Your graph isn't going to 7.5 seconds.  It is going to something less than 7500.  Since your text file has 7414 rows, that makes sense.  The time base for your waveform graph is 1, instead of whatever is the delta T between your timestamp values.

 

Attach your VI so we can see how the Express VI is setup.

0 Kudos
Message 2 of 10
(3,282 Views)

Attached

Download All
0 Kudos
Message 3 of 10
(3,278 Views)

Try checking the checkbox in your reading VI that says First Column is Time Channel.

0 Kudos
Message 4 of 10
(3,274 Views)

I tryed.

0 Kudos
Message 5 of 10
(3,266 Views)

@vitor22 wrote:

I tryed.


And how did it turn out?  Saying I tried and not saying how it didn't work doesn't help me help you.

I was able to do it.  But the X data wasn't correct.  That is because your timestamps aren't regular spaced.  So you can't use a waveform graph.

 

You need to use an XY graph.  See the attached code for how to convert the two channels of data (time, your values) into a datatype to feed to the XY graph.

 

0 Kudos
Message 6 of 10
(3,261 Views)

RevensFan,

 

Sorry for the short answer (when I did that the data was not correctly shown in the graph). I was trying to do what you said but im having some problems. I cant wire the Bundle to the xy graph. Attached what how im tryng to do. Thanks.

 

0 Kudos
Message 7 of 10
(3,238 Views)
Solution
Accepted by topic author vitor22

I didn't use Bundle.  I used Index and Bundle.

 

My image is a snippet.  Drag that image onto your block diagram and use that.

0 Kudos
Message 8 of 10
(3,230 Views)

Ravensfall,

Thanks very much!!! Now its working (I didnt know about the snippet image). I don´t know why but your index array is different from mine. Thanks again.

0 Kudos
Message 9 of 10
(3,222 Views)

My Dynamic Data Type conversion to a real data type is doing the conversion to a 2-D array of scalars (since there are multiple channels of multiple samples).  Yours is converting to a 1-D array of scalars (I don't know if it is giving you a single channel, or a single set of data for multiple channels).  Thus my 2-D array causes the Index Array to look different than your 1-D array.  it needs row and column indices instead of just a row index.

0 Kudos
Message 10 of 10
(3,217 Views)