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.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

ATML return value does not return Uint64

Hi all,

   It looks like a Real Time sequence cannot return an integer value of 64 bits as the type in the ATML report is always unsignedInteger and truncate the result to 32 bits.

 

I think it is a bug as when returning a double, the number returned is correct for double precision float

 

this is a snapshot of what the ATML report says when i set the pass value to double

 

3.141592653589793238   double

 

truncation for float 3.141592741012573242
truncation for double 3.141592653589793116

 

as you can see (except the last two chars that are truncated from the string) the result matches the pi closest double value and a double is 64 bits


<Datum xsi:type="double" value="3.1415926535897931" xmlns="http://www.ieee.org/ATML/2006/Common" />

 

 

while if i set pass as U64 with value 6442450944       (U64 with bits 32 and 31 set [counting from bit 0])

 

you can see that it gets truncated to  type unsignedInteger and only bit 31 appears. If you set any bit between 32-63 and zero 0-31 the result is 0
<Datum xsi:type="unsignedInteger" value="2147483648" xmlns="http://www.ieee.org/ATML/2006/Common" />

 

Anyone has a clue? is this an open problem?

 

EDIT

I just forgot to mention that I am using VeriStand 2001 SP1

0 Kudos
Message 1 of 3
(5,263 Views)

Hello Claudio,

 

as I know, float is only able to display max. 6 fractional digits (depending on the regular digits).

In a double value you could display max. 14 fractional digits, so it makes no sense defining a higher precision then this.

 

The other fractional digits in your example are just random values in the memory next to your value.

I actually don't know how integer values are stored in memory. So how do you know which bits schould be set in the unsigned integer?

 

By the way, the links in your post are not working.

 

Regards,

Branni

 

 

 

0 Kudos
Message 2 of 3
(5,164 Views)

IEEE 754 single precision  gives 6 to 9 significant decimal digits precision, does not mean it cannot actually show more than 9.

IEEE 754 double-precision gives 15 to 17 significant decimal digits precision and same applies as above.

 

The high precision pi assignment was only made to shows that the sistem was correctly showing the closes double precision representation of pi which in turn means that the system is able to send 64bits as results. Integers are 2's complement for signed and 1 to 1 for unsigned.

 

The links in the post are XML namespaces so they may or may not be existing links, they just define a DOM namespace.

0 Kudos
Message 3 of 3
(5,159 Views)