LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

negative number in formula node

good day.

I am trying to find information on how to include a negative number in the formula node. 

thank you 

0 Kudos
Message 1 of 12
(1,739 Views)

Put a negative sign before the number...

wiebeCARYA_0-1708535989855.png

 

Message 2 of 12
(1,716 Views)

@n3ow wrote:

I am trying to find information on how to include a negative number in the formula node. 


Click on the border of the formula node, then click the key on the keyboard just above the arrow keys that says "Delete".  Problem solved.  😂

aputman
Message 3 of 12
(1,709 Views)

thank you I see in the example you provided that I was missing a space between the function and the minus sign.

Have a goo day

 

Message 4 of 12
(1,695 Views)

@n3ow wrote:

thank you I see in the example you provided that I was missing a space between the function and the minus sign.

Have a goo day

 


I generally don't like goo days (too messy).

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 5 of 12
(1,689 Views)

A space is not required.

aputman_0-1708538520828.png

 

aputman
0 Kudos
Message 6 of 12
(1,683 Views)

As some have already hinted, maybe the real solution is not to use a formula node at all. There is really never a compelling reason for them.

 

Can you take a step back and explain what you are trying to do?

0 Kudos
Message 7 of 12
(1,634 Views)

@altenbach wrote:

As some have already hinted, maybe the real solution is not to use a formula node at all. There is really never a compelling reason for them.

 

Can you take a step back and explain what you are trying to do?


There are compelling reasons NOT to use them , though, like:

  • They are orders of magnitude slower than if you created the same code using native functions.
  • You have to worry about syntax (exactly like what the OP is having trouble with).

Of course, this post isn't aimed at educating you, Altenbach.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 12
(1,614 Views)

"There is really never a compelling reason for them."; "They are orders of magnitude slower than if you created the same code using native functions." - I agree that one is never forced to use the Formula Node: anything that can be achieved inside the Formula Node can of course be achieved using lower-level primitives such as Add, Multiply, Exponential, etc. I also agree that Formula Nodes execute more slowly than the primitives, and, for this reason, they need to be used judiciously.


But for me there is a compelling reason to use them: readability. Formula Nodes are the best option when implementing large, multi-line, complex formulas. Especially when those formulas are defined in a document, such as a PDF that the customer handed us. The code inside a Formula Node can be made to correspond one-to-one to the formula as defined in the customer's PDF. This leads to code that is much easier to understand, verify, and maintain.

 

It is a bit of a shame that performance needs to be traded off for readability, or vice-versa. Ideally both readability and performance would be achieved simultaneously.

0 Kudos
Message 9 of 12
(210 Views)

(Old thread, I know)

 

Formula nodes can be quite competitive in speed and that's why I didn't touch that topic.

 

I do have some kind of undiagnosed "formula node dyslexia" and have a hard time to "follow the flow" unless they are very simple.

 

Message 10 of 12
(206 Views)