07-03-2012
09:16 AM
- last edited on
05-01-2025
04:30 PM
by
Content Cleaner
Hello,
I am using the write to measurement file express vi to write my data into a .lvm file. However I get only 6 digits of precision. After a bit of searching I found that we could change the precision digits using this method. However, I am a bit confused at the last step of the process. I want my data to be in scientific notation with six digits after the decimal point. According to this link, I need to use the Type as "%e" and format string as "%.6e". Where should I be making these two changes ? Should I change this (the default one)into this
. Am I doing it correct ?
Thanks,
Sid
07-03-2012
09:24 AM
- last edited on
05-01-2025
04:31 PM
by
Content Cleaner
07-06-2012 07:36 AM
You should only need to change the format in the one spot (ex_CreateSignalChunkString.vi), and your code is correct. However, this is a vi.lib VI, so it will effect every other use of the write LVM file code on that computer. This is one of the limitations of the Express VI. However, there is a simple hack you can use to make it easier in the future. Create a functional global whose data is the format string. Use it, instead of the hard-coded string, to set the format in the vi.lib code. Make the default data of the functional global "%g", so you don't change the original code (you will need to check for empty sting on output and replace with %g). Before you run the Express VI, set the format in the functional global.
If you have problems, let us know.