02-25-2018 11:29 AM - edited 02-25-2018 11:33 AM
Hi everyone
When I multiply tow values one of them have very small numbers (import from Excel) labview round them to zero . How would i stop it from happenning?
Thank you.
Solved! Go to Solution.
02-25-2018 11:34 AM - edited 02-25-2018 11:36 AM
We cannot tell from the picture, but is it also zero if you use a scientific display format?
(Please attach the VI and also include a typical data file)
02-25-2018 11:35 AM
It's impossible to debug a picture. Attach your VI and also the text file that contains your data. That way we can see how small these numbers actually are. LabVIEW doesn't just round small numbers to zero, so I think you've got something else going wrong in your program, either the way it is reading the text file, or the way you are displaying your results.
02-25-2018 11:35 AM
Hi weaam,
please provide an example for your problem!
LabVIEW will not round to zero unless the numbers are VERY small in the order of 1E-323 for DBL values…
What formatting did you set for the array indicator you marked in your image?
02-26-2018 03:09 AM
If the values where really zero, all values after it would also be zero ("-10000000*V*exp(") or one ("p(D)" and "TCP"). 0X-10000000=0, exponential(zero)=1, 1*1=1...
It just shows as zero's, since the default formatting is not useful in your situation (like the others mentioned).
02-26-2018 03:10 AM
altenbach , RavensFan and GerdW
thank you very much
the result is zero when I use a scientific display format
02-26-2018 03:15 AM
02-26-2018 03:21 AM
Make the values default, and post the saved VI... Or post the Vi and a data file. All kinds of things can be wrong, but we can't tell from an image.
02-26-2018 04:03 AM
Vi and data file
02-26-2018 04:30 AM - edited 02-26-2018 04:35 AM
Hi weaam,
I don't see any errors in those calculations!
Either the volume is zero (most of the time) or you try to calculate e^x for very small x values (like -26000).
Example: for row 1300 you get a "Dose" value of 6500. Then you calc "-0.307*D*(1+D/300)", which results in -45231.33. Now take e^-45231: this will result in (basically) zero!
Which result do you expect for your input values?
Side note: Setting the indicators to 50 significant digits is nonsense for DBL values: they only support ~17 decimal digits!