LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to make Read LabView measurement file without main program interruption

I have main program that executes in while loop. It records some data using Write LabView measurement file. I would like to have option to read some previously recorded files and plot them while my main program is running. What is the best way to do it?
I will place sample of my program.
Read measurement file is outside main while loop.
0 Kudos
Message 1 of 3
(2,705 Views)
When I am trying to put it into separate while loop or case loop and then start it the "Error 4 occurred at Read LabVIEW Measurement File -> Vibrafilter.vi" Possible reason(s):
LabVIEW:  End of file encountered.
How to avoid it?
0 Kudos
Message 2 of 3
(2,694 Views)

Hi Dr Zhdanov,

Thank you for posting on the NI discussion forums.

I have recently picked up your thread, and I believe I know what the issue is. Essentially the Read LVM File VI is attempting to read the file on every iteration of the loop. This operation is fine, until it hits the end of the file and there is no more data available for the VI to retrieve. This is why the error is being presented to you.

Essentially, there is a way to get around this by utilising the EoF (End of File) output from the Read LVM File VI. This output becomes TRUE when the VI reaches the last datapoint in the file. By feeding this value to the next while loop iteration (via shift register, or feedback node), you can then disable that VI until you need to read a different file.

To demonstrate this architecture I have created a small example VI for you.

I hope this helps. All the best,

National Instruments | Northern California
0 Kudos
Message 3 of 3
(2,637 Views)