To read LVM files acquired in LabView, I have been using lvm_import (http://www.mathworks.com/matlabcentral/fileexchange/19913-lvm-file-import) in MATLAB. However, I am attempting to now make use of MathScript so that all data can be acquired and analyzed in LabView, without third party software.
I am trying to modify lvm_import to account for all of the functions that MathScript does not support (structures, cell arrays, even try statements), but have run into an issue finding a replacement or workaround for textscan (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/textscan.html).
Anyone with thoughts, or know of the equivalent function in MathScript? lvm_import uses fgetl to get each line in an LVM file, but I can't think of anything other than textscan to parse it the way I want. For the record, textscan is used in lvm_import by the original author.
Maybe I know the reason why jktang do not use the vi to read the text.
For example, the text has the data just like below
54 , 34
how to read it in LabVIEW very conveniently ? The format is so complex, because the separate will be a blank space or more.
For MATLAB,just use the function "importdata" and the data will be read quickly and accurately.
Does LabVIEW have the same function like "importdata"?
The lvm file was created with the Write to Measurement File and the Read From Measurement File can read it back.The file is just tab delimited text if I recall correctly and of course there are functions in LabVIEW for that. The main one being Read From Measurement File.
Of course, I don't quite understand the use of Express VIs in the first place.
Hi all, thanks for the responses. I suppose I wasn't too clear -- I need to analyze the raw data in the LVM file, not just display it. Read From Measurement File is an Express VI that I use to display the data, but in order to analyze it I need some actual algorithms.
Even if I port the output from the RFMF VI to a MathScript node, I still need to scan each line in the LVM file, delimit the contents, and analyze. I am looking more for the LabView functions to help me perform this task. While it seems simple to use any number of functions that read delimited text, further exploration into the MathScript version of them shows that NI has greatly reduced the parameterization of these functions, and there aren't any functions that parse strings with a delimiter like textscan does.
For example, textread would do the trick, except the MathScript version of it doesn't let you add parameters (i.e. a delimiter). dlmread will read from a file, but not if it contains strings (just numbers). fscanf scans it as a single string...etc.
Thank you for the responses thus far!
You can put whatever words you want in my mouth. They were much more polite than the words I wanted to use.