LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you declare a U32 in a formula node?

I would like to be able to declare a variable of type U32 (unsigned int32) inside a formula node. What is the proper syntax to accomplish this?
0 Kudos
Message 1 of 4
(3,435 Views)
It's documented in the on-line help topic of forumula node syntax. The correct syntax is uInt32.
0 Kudos
Message 2 of 4
(3,435 Views)
Thanks. I also have another question that i just came across. How does one enter numbers in hex form in the formula node. Also the main problem that i am having is that when i have 0x80000000 (2147483648 in decimal) and try to AND (&) it with itself 2147483648 I get 0x7FFFFFFF?? I also tried to AND (&) it with 0x7FFFFFFF, i get 0x7FFFFFFF returned?? If i AND (&) it with 1 i get 1 returned?? I am declaring both variables as uInt32.
0 Kudos
Message 3 of 4
(3,421 Views)
You enter hex numbers in the format "0xnnn". I tried to duplicate your result and I'm seeing the same strange thing. If I just put in the constant 0x80000000 and do nothing, just wire out the value, I get 0 out. If however, I define x = 7fffffff and then add 1 to it, I get 80000000 out. If I use decimal 2147483648, it works. If I define the variable as an int32 and 0x80000000, it works as expected. I don't use the formula node that much but it seems like a bug to me. You might want to report this one to NI.
0 Kudos
Message 4 of 4
(3,414 Views)