LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"convert to dynamic data" rounding my input

This is probably a ridiculous question, but I've wasted enough time trying to figure it out myself.  Basically, I have an array feeding into a "Convert to Dynamic Data" block, which then feeds into a "Write to Measurement File" Express VI.  One value in the input array is, for example, 339122751.  The output of my Express VI for that particular value is 339122800.  I can't find any setting in either block's properties that would dictate this rounding.  Is there a solution to this problem?
0 Kudos
Message 1 of 10
(3,162 Views)
You should be a bit more specific, because these VIs have a ton of options. If you really need to retain all these digits, you should probably use a binary format.
 
If you use ASCII, the express Vi internally uses %g as a format, which is thus saved as 3.391228E+8 and read as 339122800.
 
It seems silly to complicate all this with express VIs and dynamic data intermediates. All you have is an array, so use "write to spreadsheet file" from the file IO palette and specify the format you like best. 🙂
 
Check the online help for details.
 


Message Edited by altenbach on 04-29-2008 11:31 AM
Message 2 of 10
(3,153 Views)
There's much more to it than one array being saved as a spreadsheet; I was just simplifying everything for the purpose of the question, otherwise the write to spreadsheet block would make much more sense.  Ultimately, if you take everything else away and just have the one array feeding into the express VI, the data is rounded for whatever reason.  Is there any way to use the lvm output without losing any of the digits?  This is essential in this case.
0 Kudos
Message 3 of 10
(3,139 Views)
Hi mpb2000,

open the frontpanel of "WriteToMeasurementFile", search your way down to "ex_CreatSignalChunkString.vi" and change the default format. Or wire a different format string one level up...Smiley Wink

But: you lose compatibility...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(3,129 Views)
Just what I needed, GerdW.  Too bad you can't use it as an Express VI anymore.  Seems like something that should be an option in the properties window, NI.  Anybody know any other way so you can keep the Express VI ability?
0 Kudos
Message 5 of 10
(3,107 Views)
Also, how many digits are really significant in your data?
 
If all your 9 decimal digits are really meaningful, it means that your data has 28+ bits precision. Does it? What kind of acquisition hardware is this? (Or is it theoretical data?)
0 Kudos
Message 6 of 10
(3,101 Views)


altenbach wrote:
Also, how many digits are really significant in your data?

To put things in perspective, a change in your 9th digit corresponds to about a 3ft relative change in the distance from the earth to the moon. 😄
 
Is it really significant? What is the error in your data?  
0 Kudos
Message 7 of 10
(3,089 Views)
It's time based, so the differences between values in the array should be exactly the same, but the rounding was totally messing that up.
0 Kudos
Message 8 of 10
(3,085 Views)
Express VIs are supposed to handle most use cases without overcomplicating them.  In this case, the resolution is a compromise between normally valid resolution and file size.  I would recommend you try a binary file format to preserve resolution.  You will get speed as a free bonus.
Message 9 of 10
(3,081 Views)
Ah, your are saving way too much information. If the spacing is constant, all you need is retain  x0 and dx and not an entire column.
 
Depending on how many points you have, you could probably even reconstruct it at near original resolution by linearly interpolating from between the first and last value in your file.
 
Still, a binary file is a better idea.
0 Kudos
Message 10 of 10
(3,072 Views)