LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need in Formula Node to assign to the variable value 4000000000!!! What kind of variable it should be???

i've just tryed to write unsigned in32, but it does not understand 'unsogned'... But i need variable to be unsigned, because the max value = 4000000000... So, how can i solve this probleme???
0 Kudos
Message 1 of 5
(3,888 Views)
Amazing.
It never orrcurred to me. It seems that there is no unsigned (int) arithmetic in Formula nodes.
The syntax diagram in the online help backs out when it comes to defining what an is.

If you have access to a C compiler I'd consider using a "Code Interface Node". It is bit more pain to set it up, but it might be worth anyway.

Gabi
7.1 -- 2013
CLA
0 Kudos
Message 2 of 5
(3,888 Views)
Hi,

I don't see exactly what you're trying to do here.

Where do you want to assign the variable 4000000000 to? If you want it as an
input, just use a dbl, with only zeros behind the coma.

Note that an integer is a number without any decimals. An integer in LabVIEW
is this, but with an extra limitation that it can only be 32 bits... So a
dbl can be an integer.

If the input dbl is not an integer, use round, round to -inf or round to
+inf to make it one. This can also be done if the output needs to be an
integer.Inside the formula node floor(x), int(x), intrz(x) or ceil(x) can be
used to make integers.

I hope this is what you mean... I can't see any problems doing this.

Regards,

Wiebe.


"DrON" wrote in message
news:506500000008000000E
34F0000-1023576873000@exchange.ni.com...
> I need in Formula Node to assign to the variable value 4000000000!!!
> What kind of variable it should be???
>
> i've just tryed to write unsigned in32, but it does not understand
> 'unsogned'... But i need variable to be unsigned, because the max
> value = 4000000000... So, how can i solve this probleme???
0 Kudos
Message 3 of 5
(3,888 Views)
I cut and pasted this from the LabVIEW Formula node help:

(Optional) The default data type for output terminals is double-precision, floating-point. To change the data type, create an input terminal with exactly the same name as the output terminal and wire a data type to that input terminal. Doing so also provides a default value for the terminal. You also can use the Formula Node syntax to define the variable inside the Formula Node. For example, int32 y; changes the data type of the output terminal y to 32-bit integer.

I tried it out and it works.


Jeremy Braden
National Instruments
0 Kudos
Message 4 of 5
(3,888 Views)
To quote an older thread that dealt with this same question, the syntax for specifying an unsigned 32-bit integer is:

uInt32

and capitalization is important...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 5 of 5
(3,888 Views)