ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

formula node: "integer type required"

Hi all.
 
I'm having a small problem. It seems so easy but I can't reach there...:p
 
I'm just doing this formula in the formula node:
Y=10^((0.001-32.44-(20*log(2400))+X)/20);
 
where X is the input and Y the output. Of course that the result won't be a integer, but how can I solve this one?
 
Thanks
Message 1 of 17
(22,371 Views)
An integer type is required when you do a '^' operation. That's a bit exclusive or. If you really are trying to do exponentiation, use the '**' operator.
Message 2 of 17
(22,366 Views)
Right. Is that the problem.
 
But I do the same with:
pow(10,((0.001-32.44-(20*log(2400))+X)/20); right?
 
Thaks
Message 3 of 17
(22,363 Views)

You can do Y=10**((0.001-32.44-(20*log(2400))+X)/20); or Y=pow(10,((0.001-32.44-(20*log(2400))+X)/20));

The one you just posted needs another right parantheses.

Message 4 of 17
(22,358 Views)
I'm getting the same error. However, my formula is very simple. I'm just starting to learn to use labview and i was trying to get the idea of how the formula node works, i cant figure out this error though.
0 Kudos
Message 5 of 17
(22,320 Views)
Try x**2+x+2 per Dennis' first suggestion.
0 Kudos
Message 6 of 17
(22,316 Views)
Hy! I am a rookie and i have a kind of a problem with the formula node ... same as others here is the ecuation: "x^y=z;" and i recevie this error: "FORMULA NODE: integer type required". I try do do it with x**y=z but i get this error: "FORMULA NODE: Missing semicolon". I am new with this program ... so take it slow ... THX 🙂
0 Kudos
Message 7 of 17
(21,598 Views)

@SparX In your first formula you end with ";" in the second it's missing, could that be it?

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 17
(21,596 Views)
I forgot to put it in the last post .. but is not missing from formula node:
Message Edited by SparX on 01-09-2009 05:09 AM
0 Kudos
Message 9 of 17
(21,593 Views)

You need to turn your expression around, so it's in the form of output = function of inputs

 

In your case, z=x**y;

_____________________________
- Cheers, Ed
0 Kudos
Message 10 of 17
(21,586 Views)