LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read measurement file question

Hi, I'm using the read measurement file function to load measurement files (lvm). How can I load several measurements and plot the results in one single graph? I tried putting the read measurement file function in a while loop and ask user if they want to load more measurement every time one file is loaded. However, I got an "end of file error" from the read measurement function every time the loop execute once. Seems like the the read measurement function won't execute more than once. Now I was able to let the program load several measurements by placing the same function more than once on the block diagram. Say the program will load 3 lvm files if i put three function and wire the result to a single chart. However, this won't allow user to choose how many measurements the want to load. Does anyone have a better idea? Thanks.
0 Kudos
Message 1 of 12
(4,685 Views)

Hello Sir,

               If I understood correctly, you would like to

1) Read an LVM file, and plot that on a waveform chat, and then

2) Read another file, and plot that in the same waveform chart and so on...so that you can see all the plots on the same waveform chat and compare the results.

If I am right, I exactly tried for the same thing but it did not work for me in LabVIEW.  And hence I saved the data in *.mat format which is matlab readable binary format. And then, read the same in labview and plotted all the files on the same waveform chat in labVIEW and compared my results.

But, if you like to erase the earlier graph, and plot the new graph on the same waveform chat, you might try using a while loop and place the Read LVM file function in the while loop, and define the condition for termination. With this, the program will prompt you for a new file, as soon as it finishes plotting the old one.

I am not sure if this is really helpful for you but it's just an attempt to help you.

Good Luck on your problem!

Message Edited by Kay Kay on 02-11-2006 09:41 PM

Message Edited by Kay Kay on 02-11-2006 09:42 PM

0 Kudos
Message 2 of 12
(4,676 Views)
Hello Sir,
                There is a slight problem in my reply. In the seventh line, please consider "MATLAB" instead of "LABVIEW".
0 Kudos
Message 3 of 12
(4,671 Views)
Thanks for your reply. Unfortrunately I don't have matlab at this moment. I did try putting the read measurement file function in a while loop. After the fist file is loaded, an error poped out says : labview has encountered an end of file error". I'm not sure why.
0 Kudos
Message 4 of 12
(4,665 Views)
Could you please upload your attempt VI, and maybe also some test.lvm files with data?
That would make helping easier.


0 Kudos
Message 5 of 12
(4,663 Views)
Hi, please see the attached vi and two sample lvm files (one is simulated sin signal the other is simulated triangle signal). The vi should load a measurement file and then ask the user if to load another file. It gives me an End of File error every time I run it.
Download All
0 Kudos
Message 6 of 12
(4,655 Views)
Hi lxx,

I think you found a bug in the 'Read Labview Measurement File' Express VI. When called in a loop that VI does indeed display its prompt only the first time it is called, after that it seems to 'remember' its previous state. To me that seems a bug, or at least an unexpected behaviour.

As a workaround you can call the 'File dialog' Express VI separately and configure the Read VI to show no dialog of its own. See the attached, modified version of your VI. It also demonstrates how one would use a shift register to keep the loaded data.




(At least I know one more good reason now why I don't like Express VIs....)
0 Kudos
Message 7 of 12
(4,646 Views)
Thanks for  your advice. However, I can't open your VI. Maybe it's wrote in version 8 and I only have version 7.1. Could you please attach an image file of the VI you wrote? Thanks very much.
0 Kudos
Message 8 of 12
(4,643 Views)


@lxx wrote:
Thanks for  your advice. However, I can't open your VI. Maybe it's wrote in version 8 and I only have version 7.1. Could you please attach an image file of the VI you wrote? Thanks very much.

Hi,
it is indeed in LV 8. Here is a screenshot of the diagram:

0 Kudos
Message 9 of 12
(4,632 Views)
Thanks for your advice. It is just what I'm looking for.
0 Kudos
Message 10 of 12
(4,611 Views)