What are the valid types allowed in a formula node. Specifically, can unsigned types be declared?
For example, assume you have hooked a control with type unsigned byte to the formula node labeled "x". For the output you connect an indicator with type unsigned word (16 bits). Inside you have the code:
/* formula node */ int16 y; /* defines output */
y = x; /* end of formula code */
Let the input be 255. When the VI is run, the output will be 65535! This is because when the expression "y=x;" is executed, the byte value 255 is sign extended upon assignment to the int16 output "y".
Of course the assignment could be rewritten as:
y=x & 255;
so the output will be 255 as expect ed.
The problem is that this is a little sloppy. It would be far superior if instead of defining "y" as "int16", it could be defined unsigned such as "uint16" (this doesn't work -- I tried).
The types you can declare inside a formula node (that I know of) are: