LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"read from measurement file" reads only first line of data

Hello,

 

I have a problem when trying to read a .lvm file through "Read from Measurements file" with the following block diagram

 

labviewHelp1.png

 

 

Problem: it reads only the first line of data from what I can see in the probe window,.

 

labviewHelp2.png

 

 

 

A part of the lvm file for reference.

labviewHelp3.png

 

 

 

I haven't used Labview in a long long time, I'm trying to figure out what I am doing wrong.

 

Thanks

0 Kudos
Message 1 of 8
(2,098 Views)

Pictures are useless to troubleshoot, because we cannot see how the express VI is configured.

 

You also have a serious race condition. For every iteration, the EOF? local variable gets read before the indicator is written, meaning that the result of an indicator change will only take place one iteration later. Use proper dataflow and use the wire going to the indicator to make a termination decision.

 

Your loop spins as fast as the computer allows and all you get in the end is the result of the last read operation. Is this really what you want?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 8
(2,081 Views)

Well, all I want is to read the data from the lvm so I can plot them in the chart.

 

My VI was based on the example in labview "Read TDMS files" (I figured it would be the idea wit ha lvm) except I've put the local variable for EOF? (Understood my error on this) and I didn't put a wait because I figured I'd let the while loop run as fast as the computer can to load the data.

 

Attached is the VI I'm using.

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

How was the file originally written? Can you also attach the lvm file?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 4 of 8
(2,071 Views)

Sorry meant to attach the lvm. Here it is. (Actually I had to put it in .txt because the forum wont let me upload a lvm file)

 

I unfortunately cannot share the full vi that record the data as I am not its owner/creator. I'll try to give as much info as I can with the relevant pictures attached, I hope it allows us to at least have an hint of where the problem might be.

 

(this is in a while loop)

labviewHelp4.png

In the stacked sequence, the other pannels are similar to the one shown here: value read fron a variable, converted to dynamic and a signal attribute is set. The "start recording" control operation is "switch when pressed".

 

Here are the properties of the set signal attributes

labviewHelp6.png

 

 

And here are the properties of the "write to measurement file"

labviewHelp5.png

0 Kudos
Message 5 of 8
(2,063 Views)

I don't use express VIs, so I don't know how they work, but here's how you could read all rhows, for example. I am sure there is a better way. 😄

 

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 6 of 8
(2,044 Views)

Thanks, that'll work for now. I think it might be the way it is recorded that is at fault, I'll spend some times trying out stuff.

0 Kudos
Message 7 of 8
(2,031 Views)

Also make sure to remove that array indicator (or move it out of the loop), there is no need to update it after each line read. I just placed it for debugging, of course.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 8 of 8
(1,989 Views)