01-12-2011 04:24 AM
Hi,
in my UIR I have changed the data type of a numeric control from int to int64. Unfortunately, I am not able to increase the maximum value... 2^63 should give a number in the range of 9x10^18.
However, if I enter 1E18 in the numeric control 'Maximum:' my value is changed back to 2147483697. This looks pretty much like a 31 bit value, not 63 bit...
What else do I have to do to allow 64 bit numbers getting displayed?
Thanks!
(PS: CVI2010)
Solved! Go to Solution.
01-12-2011 04:38 AM
I am only using 32 bit CVI, so I can't say for sure, but in the UI editor can you not set the Range Checking option for the control to Ignore? It sounds like it is set to Coerce.
JR
01-12-2011 05:42 AM
Hi JR,
you are right: it is indeed possible to turn range checking off. What I was wondering / complaining about is that it seems not possible to use range checking of large numbers (say 1e12)...
Btw, I am also using 32bit CVI but need larger integers...
Wolfgang
01-12-2011 11:21 AM
It looks like you found a bug. When the data type is int64, it looks like you can't enter numbers using scientific notation (e.g. 1e18)
You can enter the decimal number. For instance the max int64 is 9223372036854775807, so if you enter any number up to that, it should take.
Thanks for reporting this, and sorry for the inconvenience.
01-12-2011 11:31 AM
In this case the inconvenience is minor... but of course I'll be glad to have it fixed in a future version.
Thanks for investigating the issue!
03-17-2011 01:39 AM
03-17-2011 11:29 AM
This will be fixed in 2010 SP1. The reason that scientific notation works for non-int64 data types is because CVI stores these numbers as doubles. For example, if the data type of the control is integer, and the user types '2e2', we use strtod to convert that to 200.0. However, we didn't use strtod for int64 data types because the double data type only has 53 bits in the significand, so any number that is input that is greater than 2^53 may lose precision.
In order to make numbers entered in scientific notation work for int64 data types, in SP1 it will use strtod if there is an 'e' or 'E' in the string. This allows the user to use scientific notation, but the number can be different than what was entered if the number is greater than 2^53. This behavior will be documented.
03-17-2011 11:33 AM
Thanks, sounds fine.
11-09-2011 11:07 AM
I just noticed that if I set a Numeric control to a data type of int64 or unsigned int64 then it will not be visible on the UI when I run the program. I use 32 bit Windows XP with CVI 2010 Version 10.0.1 (419). The same control set to a data type of int or unsigned int is visible and works as normal.
11-09-2011 11:35 AM
Hi,
I can't tell for version 10.0.1but CVI10.0 does show numeric controls of type int64 (XP and Win 7)