LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parenthesis in formula node

I'm using the formula node and it appears that parenthesis don't work. Is this correct? What is the order of operations?

The Formula Node Syntax page in the help is extremely brief and sparse, bordering on useless for anyone that doesn't already now what is going on. Is there a more thorough description of the Syntax anywhere?
0 Kudos
Message 1 of 7
(4,388 Views)
91dog;

In LabVIEW's help, select the "Search" tab and type "formula node". You will find examples that will help you and useful information like "syntax" and available functions and operators.

Hope this help.

Regards;
Enrique
www.vartortech.com
0 Kudos
Message 2 of 7
(4,388 Views)
Parenthesis do work in the formula node. Do you get an error, broken VI, unexpected results, or what? It would help if you could post a VI that demonstrates the problem you're seeing. The help file lists the precedence of the operators. In 6.1 it can be found in the help index - Formula Nodes, Operators.
0 Kudos
Message 3 of 7
(4,388 Views)
well the "Formula Node Syntax" page remains useless. I'm not sure if parenthesis are allowed.


I did find "Precedence of Operators in Formula Nodes and Expression Nodes" which has some useful info. But says nothing about parenthesis.

What is "? : conditional evaluation" Is this explained anywhere?

The several examples I've looked through have very simple formula nodes. So simple it would have been easier to not use it. With the simple formulas there were no parentheses to be found nor any reason to use them.

So far I find no indication that parentheses can be used nor anything telling me that they aren't. I tend to guess that they aren't allowed, but that seems like a huge ommission that essentially makes formula nodes difficult to use for c
omplex calculations which is their key purpose.
0 Kudos
Message 4 of 7
(4,388 Views)
Thanks Dennis,
The error is just an incorrect calculation.

I put together a simple node and parenthesis did work. So something else must be amiss. I stripped down my VI and equation and made two formula nodes implementing the same equation with and without parenthesis. One gives an exponential decreasing curve, the other a constant array. Where is the error?
0 Kudos
Message 5 of 7
(4,388 Views)
Hello 91dog,

on my LabView6.1 both equation nodes give the same result, an exponential decreasing curve. The difference between the curve is zero. So you have problems with your installation or version of Labview?
Best regards,
Gerd
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(4,388 Views)
really! oh crap!

I have LabView 6.0

Could the version be the cause rather than a buggy installation?
0 Kudos
Message 7 of 7
(4,388 Views)