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.

Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

"Write to Measurement" express, tolerence when writing to excel file

HI,

Is there a way to increase the number of digits of precision when using the "write to measurement file" express vi.

 

At present the signals I am sending are getting truncated to about 6 digits even though they are double or extended precision.

 

Thanks!

0 Kudos
Message 1 of 8
(3,858 Views)

You can use the traditional vis, however I'm curious what measurements and equipment you use to need a higher resolution than 6 decimal digits 😉

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 8
(3,822 Views)

Anyone having success with increasing the _range_ of excel number format with "write to measurement express vi"? I did not find any help in the suggested links.

 

The problem is that the smallest number (not 0) which can be written is 1E-6. This may seem small but many instruments can go below that. And the value written may be a calculated value.

 This vi saves a lot of work relatively to writing using the traditional vi's. 

 

A work-around is to pre-multiply the data by - say 1000,000 and change the unit of the values. 

 

 

I would think this is a defect in the vi. 

0 Kudos
Message 4 of 8
(3,734 Views)

Hi heel,

Can you provide a code example where the VI is incapable of writing a number smaller than 1E-6? I have been unable to reproduce that behavior on my end. I've attached a VI snippet below where I write a sine wave with amplitude 1e-6, there are plenty of values in the 1E-7 range, and even a couple as low as the 1E-9.

Write to Measurement File.png

NickelsAndDimes
Product Support Engineer - sbRIO
National Instruments
0 Kudos
Message 5 of 8
(3,713 Views)

Sure: Here is what I have and tested on LV2017

write to excel.png

 

front panel and excel.png

0 Kudos
Message 6 of 8
(3,656 Views)

Hi heel,

This looks like a limitation of writing to .xlsx, rather than the VI as a whole. If you write to a text file and choose to use commas as a delimiter, you can still open the data in excel as a .csv and keep the precision past 1e-6

NickelsAndDimes
Product Support Engineer - sbRIO
National Instruments
0 Kudos
Message 7 of 8
(3,642 Views)

You may be right that the flaw is in the .net assembly (i guess?) used for writing to excel - the vi is very complicated and I cannot tell what part is to blame.

Drawback of cvs format is that I can't get such a neat table (see my previous post) with headings and absolute time stamp as with the excel format. 

0 Kudos
Message 8 of 8
(3,639 Views)