LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open more than one measurement files and display in a XY-graph

Solved!
Go to solution
Hi, I would like to open various measurement files and display them together on a XY Graph. I would like to have a button to open a file and be able to repeat this with more files. I also would like to be able to clear the chart with another button. I put the Read LabVIEW Measurement File VI into an event structure but on trying to open a second file I got an error message: ‘End of file encountered’ It seems from the help the VI tries to read another block from the same file instead of allowing me to open another file. Am I correct about the source of the error? I would greatly appreciate if someone would help. I also don’t know how to clear the XY Graph. Many thanks in advance! DNI
0 Kudos
Message 1 of 11
(3,502 Views)
It would be easier to tell what the problem is if you would show us some code. 🙂
0 Kudos
Message 2 of 11
(3,501 Views)
Hi Altenbach, Thank you for your reply! I am new to this forum (and to LabVIEW) and I am not sure what is the best way to show my code. As a temporary solution I have attached a jpg file with a screen print, I hope this is ok. The jpg file shows a solution where I could open two files (and adding extra 'Read LabVIEW Measurement File' VIs I could increase the number of files) but I would like to code a general solution where with one button I could initiate to add a curve to the chart from a measurement file and I could repeat this as many times as many files I want to display at the same time. I also would like to have a button to allow me to clear the XY Graph any time. I tried to use one Read VI in a event structure but got the problem I described in the original post. Many thanks!
0 Kudos
Message 3 of 11
(3,472 Views)

The best way is to attach the actual problem VI.

 

It does not help if you show us a picture of the code that works. Apparenlty, the problem is with event structures and buttons and none are present in the code you show. 😮

 

Please attach the code that fails so whe can see what mistake you are making! If would also help of you could attach a few sample files so we can play. So zip the VI and a few data files up and attach the archive. 🙂

Message 4 of 11
(3,459 Views)
Hi Altenbach, I have attached my VI attempt and two log files to load here. Since my last post I managed to solve the 'clear graph' function but still not able to open the second file. Thank you for being patient! DNI
0 Kudos
Message 5 of 11
(3,432 Views)

Sorry, I no longer have LabVIEW 7.1 so I downconverted from 8.0, but I cannot test it. Most likely you need to tweak it a bit.

 

Anyway, you need to built your graph in a shift register. Now clearing simply involves clearing the shift register, no fancy nodes needed. 😄 See if this makes sense.

 

 

Message 6 of 11
(3,425 Views)
Thank you! I saved the Vi but when I try to open it, it looks for a VI named 'subFile Dialog.vi'.
0 Kudos
Message 7 of 11
(3,417 Views)

Appanrelty, there were some issue converting from 8.0 to 7.1.

 

As a first try, replace the two express VIs with equivalent ones from your palette. It should work after that. Good luck.

Message 8 of 11
(3,415 Views)

I keep trying... 

 

I ignored the missing VI and had a look of the block diagram. I deleted the File Dialog VI and tried to run but I got an error message that the 'Read From Measurement File' is non executable. I deleted it and inserted again from the palette, leading to an error message:

 

Insane object at FPHP+7A4 in "LoadFromFile WIPMOD.vi": {flags}(0x1000):XYGraph(DDO)

 

I guess it will be difficult to sort this problem out as I am on 7.1. Actually I thought that would be something very simple to reinit the 'Read From Measurement File' VI as it seems to me that in my solution the problem is that the VI doesn't restart on the second 'Load' command but tries to read from the first file again but the file has no more data to read.

 

Your help is greatly appreciated!

0 Kudos
Message 9 of 11
(3,412 Views)
Solution
Accepted by DNI

DNI wrote:

Insane object at FPHP+7A4 in "LoadFromFile WIPMOD.vi": {flags}(0x1000):XYGraph(DDO)


Ouch! That did not go very well. 😞

 

Try this: Close LabVIEW, then delete both express VIs. Save and close. Now reopen and insert the express VIs. Good luck!

 

(Still, you should be able to get the main idea just by looking at the broken VI. Try to manually edit your VI to reflect the changes.)

Message 10 of 11
(3,408 Views)