04-26-2007 03:57 AM
Hello everybody,
I posted a message earlier today but unfortunately I missed to give more details about my problem. I am sorry about that. I am a new user of LabView so I still have many things to learn. What I am trying to do is use LabView (8.2) to read a file that was created by UVP Monitor, V3.0 (*.mfprof file).
This package saves fluid velocity information. There are 65 channels that form a velocity profile in a pipe. Also, there are 4096 velocity profiles, each velocity profile was captured at a time rate of 9 ms. I don’t know what is the format of these values.
At present, I obtain a text file from UVP Monitor, then process the data using FORTRAN and finally plot the results. I want to avoid this and read the UVP file, process, analyze and plot the data using only LabView. I want to read individual experimental parameters as well as the bulk of the data. In this way the user has different options to choose from before processing and plotting the results. I actually built a VI that processes and plots the text files and it runs great.
The problem I am facing now is that I want to read the UVP file but I have no information about the structure of it. I am assuming it is a binary file but that is all I can say about it.
The header and footer seem to be in text format, that is all I can read; however, the body of the file I am not yet able to read.
The information from the file is sent to the type cast function. Then I set a string indicator in the “
“C¾ Ü Qþ X@ “. One of the other options, Password, seems to provide an output of just the characters that were originally written, but then again, I can not read the characters because it is only asterisks and I can not copy them onto a word processor either.
I have tried other options as well, such as Variant to flattened string and flattened string to variant, flatten to string and unflatten from string. Unfortunately none of them worked.
I am attaching the VI I wrote and a sample UVP file , I would appreciate if someone could explain to me how to deal with complex binary files in LabView and share an example with me if possible.
Regards,
Roberto
04-26-2007 06:01 AM
04-26-2007 07:03 PM
Thank you for your reply Gerd,
I actually have a text file with the velocity values, channel number and the time value. It looks like there is mor than one format. This is also making it difficult for me to figure out how to extract the information.
I use the FORTRAN program to read the text file. I don't know if it is possible to attach the FORTRAN program though. I am hoping someone has faced a problem like this before so he/she can give me a hint as to how to approach this problem.
Regards,
Roberto
04-26-2007 08:08 PM
04-26-2007 09:35 PM - edited 04-26-2007 09:35 PM
Here's an intensity graph of the first 500 rows read as above:

Message Edited by altenbach on 04-26-2007 07:57 PM
04-26-2007 10:12 PM - edited 04-26-2007 10:12 PM

Message Edited by altenbach on 04-26-2007 08:13 PM
Message Edited by altenbach on 04-26-2007 08:15 PM
04-26-2007 10:29 PM
Thanks a lot for this Altenbach,
The numbers always 0 and always 20 look a little weird. However, the ramp from 0 to 368550000 may be the time interval. The intensity graph does seem right. In the upper half of it there is something that appears to be the liquid gas interface. This looks like a good indication that the file is being read well.
Thanks again for your help.
Sincerely,
Roberto
04-26-2007 10:50 PM
Thanks again Altenbach,
The third column is in deed the time interval. In the text file there are 65 channels plus the profile number and the time interval. In this output there are 68 columns though. Also, the raw velocity profiles look too high, from the text file one can see that they range from -128 to 127, and the space resolution is not present. Anyway, this is much better than all I had been able to read from this file before. I will continue modifying until I can get it right.
I am adding a text file. I should have done it before. I didn't think about it. Sorry.
Again, thank you for all you assistance.
Roberto
04-26-2007 11:29 PM
@Roberto83 wrote:
In this output there are 68 columns though.
There are 69 columns (numbered 0..68) minus the first four columns leaves us with 65 data columns for the channels. Right? Looks OK!
I saw the "range from -128 to 127" in the footer but in this case I8 would be sufficient and the file is ~4 times too large. Maybe they use some fixed-point implementation where you need to divide the number by some integer power of two. Is the data file the exact same data as in the binary file?
04-26-2007 11:43 PM
Yes, you are right, that leaves 65 columns for the channels, sorry about that.
I think the text file contains less information than the binary file. UVP monitor allows the user to choose from several options; i.e., export raw valocity and echo information, velocity and echo information, channels histogram, power spactrum and cross correlation data. So the text file I attached before before contains only raw valocity information and echo information. This is the data I need to carry out my analysis.
Roberto