LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

edit numeric control of type int64

Solved!
Go to solution

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...Smiley Surprised

What else do I have to do to allow 64 bit numbers getting displayed?

 

Thanks!

 

(PS: CVI2010)

0 Kudos
Message 1 of 17
(4,229 Views)

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

0 Kudos
Message 2 of 17
(4,225 Views)

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

0 Kudos
Message 3 of 17
(4,222 Views)

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.

0 Kudos
Message 4 of 17
(4,197 Views)

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!

0 Kudos
Message 5 of 17
(4,194 Views)

Hi jared,

 

I was just wondering: I could not find the issue in the updated list of known issues here

0 Kudos
Message 6 of 17
(4,032 Views)
Solution
Accepted by topic author Wolfgang

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.

0 Kudos
Message 7 of 17
(4,007 Views)

Thanks, sounds fine.

0 Kudos
Message 8 of 17
(4,006 Views)

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.

0 Kudos
Message 9 of 17
(3,923 Views)

Hi,

 

I can't tell for version 10.0.1but CVI10.0 does show numeric controls of type int64 (XP and Win 7)

0 Kudos
Message 10 of 17
(3,919 Views)