LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LVM file issue

Solved!
Go to solution

Hi Everyone

I am a beginner in using LABView. I wanted to read from a tab delimited LVM file which is actually a text file of numercal values saved as an .lvm file. The text file has some blank values (withuot any data) but when I save it as an LVM file the blank values are read as '0' which is unwanted and gives erroneous measurements when I read and process the LVM file. Basically the LVM file is read and then converted to a arrays and a formula is applied on these values. Any help will be appreciated!

0 Kudos
Message 1 of 12
(3,590 Views)

can you share the sample file and the code you tried?

whether the array Framed is 2D or 1D Array?

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 2 of 12
(3,585 Views)

Remove space in array.png

 

Try this may help you! if you share exact file you can expect exact answer

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 3 of 12
(3,560 Views)

Thank you for your reply. Here is a screen shot of my labview and the text file, (later saved with .lvm extension). The issue arises because the empty entries in the first row (columns 2-10) get read as a "0" instead of remaining blank when lvm file is generated.  

Download All
0 Kudos
Message 4 of 12
(3,521 Views)

Please send "real data", not pictures of things.  If you sent the actual text file (with whatever extension you wanted), we could try to read it and see if we have the same problem you are reporting.  Similarly, if you attached your actual VI instead of a picture of its Block Diagram, we could actually try the code to get a better understanding of what you are trying.

 

As to your situation:

     If you actually write text, then you can (visually) distinguish between a "blank" (meaning "nothing") and the number "0" (which also means "nothing").  But if you try to put this in a format that expects all numerics, then "nothing" (a blank) get interpreted as "nothing" (a zero).  I suspect that this is what is happening to you.

     A solution is to leave your text file as "text" and parse it yourself.  If you see blanks, you can decide what to do with it.  Of course, there may be more sensible solutions if we knew more about your problem (for instance, you might have sets of 10 measurements, with a "first entry" that is the current temperature -- nothing wrong with that, but if you try to force that into some file formats, you'll get unexpected results).

 

Bob Schor

Message 5 of 12
(3,504 Views)

Try to share actual file and the code which you have tried, which will help the forum users to help you with less time, else more amount of time will be spend on discussing about the problem instead of providing solution.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 6 of 12
(3,494 Views)

I would suggest you to get understanding of 2D Arrays to understand why it's zeroes in the first row:

http://www.ni.com/getting-started/labview-basics/data-structures#Arrays

Thanks
uday
Message 7 of 12
(3,486 Views)

Sorry for the delay in sharing the actual .lvm and .vi files. I tried parsing but could not do it. Any help would be greatly appreciated!

Download All
0 Kudos
Message 8 of 12
(3,377 Views)
-Did you read the information in my previous post : http://www.ni.com/getting-started/labview-basics/data-structures#Arrays ?
-In a 2D array, after you initialize an element, any uninitialized element in that column and in previous columns are initialized and populated with the default value for the data type.
Thanks
uday
0 Kudos
Message 9 of 12
(3,340 Views)

 


@udka wrote:
-Did you read the information in my previous post : http://www.ni.com/getting-started/labview-basics/data-structures#Arrays ?
-In a 2D array, after you initialize an element, any uninitialized element in that column and in previous columns are initialized and populated with the default value for the data type.

Are not the entries of the output of the "build table" 1D arrays?

0 Kudos
Message 10 of 12
(3,292 Views)