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: 

Bug using array in formula node, LV6.0

Pass a 3-element integer array, containing values 5, 6, 7 into a formula node as input variable x. Pass variable y out. The formula node contains:
int32 y;
y = (x[2]-x[1]);
My result is 6. If the parentheses are removed, the answer is 1. Apparently adding the parentheses causes the expression to be evaluated as y = x[2-1];.
Has this been found/fixed? I have mailed NI separately.
0 Kudos
Message 1 of 6
(3,509 Views)
"Bill Atkins" wrote in message
news:506500000008000000BB560000-1027480788000@exchange.ni.com...
> Pass a 3-element integer array, containing values 5, 6, 7 into a
> formula node as input variable x. Pass variable y out. The formula
> node contains:
> int32 y;
> y = (x[2]-x[1]);
> My result is 6. If the parentheses are removed, the answer is 1.
> Apparently adding the parentheses causes the expression to be
> evaluated as y = x[2-1];.
> Has this been found/fixed? I have mailed NI separately.

It works correctly in 6.1. I'm at home so I can't try it in 6.02.
0 Kudos
Message 2 of 6
(3,509 Views)
In 6.0.2 it returns 1 in both cases.



"Adam Russell" wrote in message
news:ajcc8d$1a266r$1@ID-122512.news.dfncis.de...
>
> "Bill Atkins" wrote in message
> news:506500000008000000BB560000-1027480788000@exchange.ni.com...
> > Pass a 3-element integer array, containing values 5, 6, 7 into a
> > formula node as input variable x. Pass variable y out. The formula
> > node contains:
> > int32 y;
> > y = (x[2]-x[1]);
> > My result is 6. If the parentheses are removed, the answer is 1.
> > Apparently adding the parentheses causes the expression to be
> > evaluated as y = x[2-1];.
> > Has this been found/fixed? I have mailed NI separately.
>
> It works correctly in 6.1. I'm at home so I can't t
ry it in 6.02.
>
>
0 Kudos
Message 3 of 6
(3,509 Views)
Thanks for checking this. I'm glad it's been fixed (or was it my imagination to begin with?).
0 Kudos
Message 4 of 6
(3,509 Views)
Bill,

Did you use; LV5, 5.1, 4.1?

Regards,

Wiebe.


"Bill Atkins" wrote in message
news:506500000005000000A3950000-1027480788000@exchange.ni.com...
> Thanks for checking this. I'm glad it's been fixed (or was it my
> imagination to begin with?).
0 Kudos
Message 5 of 6
(3,509 Views)
I used LV 6.0. I sent that info to NI, but I obviously forgot to include it here. NI wrote back saying the problem should be fixed in 6.0.2 (as others have said).
0 Kudos
Message 6 of 6
(3,509 Views)