ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Significant Digits in data file

Solved!
Go to solution

Is there a way to change the significant digits in an LVM data file? I'm using "Write to measurements file"

0 Kudos
Message 1 of 11
(5,239 Views)

Depends. What do your "signals" data look like?

PaulG.
Retired
0 Kudos
Message 2 of 11
(5,224 Views)

Signals? They're waveforms, voltages...

0 Kudos
Message 3 of 11
(5,213 Views)

Hi,

 

I'd use the "Write to Sreadsheet File" VI instead. It'll write your results to a text file and you can specify the format.

 

-CC

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 4 of 11
(5,181 Views)

I'm not sure I can do it with "write to spreadsheet." It doesn't have a "Saving Data" boolean. A lot of my program is dependent on that. Is there any other way to change the significant digits in a "write to measurements file"?

0 Kudos
Message 5 of 11
(5,171 Views)

Put the Write to Spreadsheet File function inside a case structure.

 

There is no easy way to change the number of digits using the Express VI.  You'd have to convert the Express VI to a regular subVI through the Open Front Panel menu option.  Then you'd have to drill down quite a few levels of subVI's and find where the format string is and change it.  Then you'd have to save that entire hierarchy of subVI's under new names.  I don't recommend any of this.

Message 6 of 11
(5,167 Views)
Solution
Accepted by glskinner

Caution! This will change files in vi.lib. I suggest you rename and move the affeted vis (do not blame me if other things break)

 

Convert the express vi to a vi

Drill to here in the heirarchy

Capture.PNG

Change this constant format specifier

Capture1.PNG


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 11
(5,157 Views)

Jeff, I think I tried this method before...exactly what do I put in the string to output only 3 significant digits?

0 Kudos
Message 8 of 11
(5,138 Views)

%.3g


"Should be" isn't "Is" -Jay
Message 9 of 11
(5,133 Views)

does the semi colon stay?

0 Kudos
Message 10 of 11
(5,127 Views)