LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

significant figures lost after dynamic data converter

I am using the Labview Measurement File VI to save my data.  IIt requires a dynamic data converter to change my array into the appropriate "signal."  After my data goes through the dynamic converter, it (sometimes, not always) cuts out 3 significant figures.  And my data is useless without these digits.  Help!
0 Kudos
Message 1 of 3
(2,390 Views)
Post a simplified vi as an example of your problem. 
 
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 2 of 3
(2,381 Views)
HI Thesan,
 
Write LVM file has a subVI called ex_CreateSignalChunkString.VI deep in its hierarchy. This subVI uses a format specifier "%.;%g" to convert numbers to strings. You would need to change it to something like "%.;%_5p" if you need say, 5 significant digits in the data written to your LVM file.  On the flip side, be advised that doing so would make you lose the nice UI of Write LVM Express VI.
Here are the steps you need to follow:
1. Right click on the Write LVM express VI and click on Open Front Panel. Press "Convert" on the next window that pops up.
2. On the block diagram of the Write LVM express VI, go to Browse>> Show VI Hierarchy
3. On the hierarchy, go to Edit >> Find . On the Find Window, right click on the Object picture(most likely the Add function) and select VIs By name.
4. On the next window, select ex_CreateSignalChunkString.Vi and press Ok.
5. Press Find button on the Find Window.
6. Double Click on ex_CreateSignalChunkString.Vi to open its Front Panel.
7. Open the Block Diagram of ex_CreateSignalChunkString.Vi by pressing Ctrl E
8. On the top left, there is a Case Structure. Go to the Zero or default case of the case structure and you will find an Initialize Array function there. There is a string "%.;%g" wired to the Initialized array function. Change it to "%.;%_5p". This will make sure that the numbers are stored with 5 significant digits (if you want 6 significant digits, make it " %.,%_6p") in the LVM file.
9. Save all the VIs.
 
Try running your main VI again and now the LVM file will store numbers with the number of significant digits that you specified at step 8 above.
 
Hope this helps.
Ankita
NI
Message 3 of 3
(2,371 Views)