From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read & write lvm files

Hi All,
 
I am plotting one parameter against two parameters on XY Graph. I need to send this graph along with 4 numerics & 1 string data captured during the testing for printing. So I just thought of saving this as LVM file into a location & filename of my choice & read back for printing after the testing is over.
 
XY Graph requires cluster of 2 elements(one is X array, one is Y array) for plotting. I tried writing only graph part alone to lvm file by builiding an array. But when I tried to read back this, it is not either reporting any error or showing the graph on the indicator.
 
Hope someone can suggest me how to do.
 
 
Thanks
 
Kousy
0 Kudos
Message 1 of 8
(3,076 Views)
Dear Kousy,
 
U can still plot the xy graph. Just read the lvm file, its o/p will be 1 D array. Connect this to for loop body (and do not connect any thiing to 'n' terminal of for loop) and ensure that index is enabled. Bundle the lvm data o/p with iteration counter (i) inside the for loop (i as first i/p and data as 2nd i/p to the bundle) which will make it cluster of 2 elements. Connect the o/p of bundle for loop body and ensure that indexing is ON and then to xy graph outside the for loop. Run the VI, it should work
 
0 Kudos
Message 2 of 8
(3,072 Views)
Hi Maurya,
 
I tried out.  But it is plotting all the 3 parameters on Y axis with index as X axis value. Moreover Index enabling is not active.
The way I coded for writing lvm file & reading back also sent as image file. May be Im mistaking somewhere.
Please see & revert. If you need any clarification pls mail me.
 
Regards,
 
Kousy
 
0 Kudos
Message 3 of 8
(3,041 Views)

Dear Kousy,

Can u send me your vi alongwith .lvm file. I shall modify and send it back to u.

0 Kudos
Message 4 of 8
(3,034 Views)
Hi,
 
I am sending my vi, LV 7.1 version. Hoping helps me out how to use write & read lvm express vis.
 
 
Regards,
 
Kousy
0 Kudos
Message 5 of 8
(3,018 Views)
The modified vi is attached
0 Kudos
Message 6 of 8
(2,958 Views)
I learnt that how & where can i use these interleaving decimating arrays. But converting string to number for building array failed to reproduce the same string.
 
If suppose I have only one field of Verdict saying Pass or Fail, I can use & decipher using some constants like if I wired 1 for Pass and 2 for Fail like. But my reqt is to save Operator name, date, time, and some more strings into it. In that case, using lvm is ruled out, upto my little knowledge. If Im wrong correct me.
 
 
Regards,
 
Kousy
0 Kudos
Message 7 of 8
(2,907 Views)
Dear Kousy,
 
 U are right and u have understood correctly. The .lvm (Lab View Measurement) as the name suggests  can store measrement data (numeric data) only. If u are interested in storing text data u have to store using other file formats like excel. Hope this has clarified your doubts
 
Regards,
 
Maurya
0 Kudos
Message 8 of 8
(2,881 Views)