LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

formula node: type conversion

Hello guys

I have LV 5.0 and have to edit a script which has some kind of overflows. For testing I set all variables to the hightest usable range - extended or i32. Now I see, in all formula nodes, there are type conversions. How can I change the type of the inputs/outputs of the formula node?

Hardware_Tester
----------
My first language is German, please ignore my faults...
0 Kudos
Message 1 of 5
(4,081 Views)

Hi,

I saw that the output variable type changes according to itsdeclaration whereas I have to cast the input variable.

See picture attached.

I hope it will help you.

Bye

CLD - Labview Certified Developer
Message 2 of 5
(4,062 Views)
Hello Antea06

Thanks for your help. But  unfortulately I can't understand your sentence. I try to describe in my words what I understood, so you can correct me.

You figured out, that the output type changes according to the input type. So the input variable has to be casted into the right type.



Now all inputs and outputs are in Extended format, but there are still conversions.

The formulas:
Yp=-1*sqrt(2)*inversfunkt;
h=1/((1/(4*m+2))+(1/(4*(n-m)-2)));
h1=(1/(4*(n-m)-2))-(1/(4*m+2));
W=Yp/h*sqrt((Yp*Yp-3)/6+h)+(4/h-2-Yp*Yp)/3*h1;
Pu=1/(1+(n-m)/(m+1)*e^(2*W));
Valuexact=1.2*Pu-Po;

The whole block:

----------
My first language is German, please ignore my faults...
0 Kudos
Message 3 of 5
(4,058 Views)
Hi,
I forgot that you run Lv5.0. My example refers to Lv7.1.
As far as I know in Lv7.1 the input variable type changes automatically as you connect a control.
On the contrary the output is DBL by default but you can change it in the formula node introducing an explicit declaration of that variable (see "h" in the attached picture).
 
Here are some useful link:

http://forums.ni.com/ni/board/message?board.id=170&message.id=12253&requireLogin=False

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/d6bed7d73659c43586256a7300691c26?

 Sorry, I understand that this cannot solve your problem but I don't remember how Lv5.0 works with formula node.
Regards
CLD - Labview Certified Developer
Message 4 of 5
(4,041 Views)
Now, after studying the urls I found somewhere the explenation:
LV5 has no variable declaration for formula nodes, they are always floating point numbers, the depth is depending on the OS.
So I have to live with this limitation. In LV6 this has changed.

Thanks for the help Smiley Happy
----------
My first language is German, please ignore my faults...
0 Kudos
Message 5 of 5
(4,035 Views)