04-03-2013 08:11 PM
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
Solved! Go to Solution.
04-03-2013 08:46 PM
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.
04-03-2013 09:00 PM
Attached
04-03-2013 09:23 PM
Try checking the checkbox in your reading VI that says First Column is Time Channel.
04-03-2013 09:30 PM
I tryed.
04-03-2013 10:26 PM - edited 04-03-2013 10:26 PM
@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.
04-04-2013 09:56 AM
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.
04-04-2013 11:38 AM
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.
04-04-2013 03:17 PM
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.
04-04-2013 03:48 PM
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.