LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Formula node

Hi, Have a good day.

I am having trouble with the formula addition step, does anyone have any ideas about my mistake here or how I can solve it in a different way?

I am collecting data as voltage but I want to obtain it as inches after the formula. (I am using an ultrasonic transducer)

The formula is going to be:
y = (0.0332x3 - 0.5023x2 + 22.425x + 17.538)*0.393

y is going to be inches value I want.

x is an voltage value measured as an voltage.
If you have any other questions , please let me know!
Thanks!

 

Screenshot 2025-01-13 155525.jpg

 

0 Kudos
Message 1 of 7
(216 Views)

I don't see a formula node.

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 2 of 7
(201 Views)

Sorry, I uploaded wrong picture.

This is the original block diagram. 
I need to add that formula inside this block diagram, but not sure where and how to do that.

 

Screenshot 2025-01-13 155525.jpg

0 Kudos
Message 3 of 7
(197 Views)

I solved the problem.

 

Thank you !

0 Kudos
Message 4 of 7
(177 Views)

@Cerdem wrote:

I solved the problem.

 

Thank you !


While you might have solve that particular problem, there are still more problems

 

  • Index array is resizable, no need to branch the array wire.
  • You can use "array to cluster" with size set to two to eliminate index array and bundle. (there are other possibilities)
  • You can set the VI execute option to "clear indicators when called". No need for these local variables. Make "No Error" the default value for the error string if you like ("clear" means "display default" here). See image below.
  • Your clearing of the chart occurs in parallel to the while loop and you cannot guarantee that it happens first. Just wire the error out of the property node to the loop edge to ensure correct execution order. LabVIEW is fully parallel and execution order is not determined by code placement, but only by data dependencies).
  • Your interval control has the wrong representation (I32 instead of U32)
  • When asking for help, we prefer actual VIs over pictures.
  • ...

 

altenbach_0-1736804945035.png

 

 

altenbach_0-1736805781315.png

 

 

Message 5 of 7
(158 Views)

@Cerdem wrote:

The formula is going to be:
y = (0.0332x3 - 0.5023x2 + 22.425x + 17.538)*0.393


Assuming it should be applied to all array values, here's how to do that:

 

altenbach_0-1736806208013.png

 

Message 6 of 7
(144 Views)

@altenbach wrote:

@Cerdem wrote:

The formula is going to be:
y = (0.0332x3 - 0.5023x2 + 22.425x + 17.538)*0.393


Assuming it should be applied to all array values, here's how to do that:

 

altenbach_0-1736806208013.png

 


And if you move the multiplication before the polynomial evaluation, it will happen at edit time instead of run time.

paul_a_cardinale_0-1736810901298.png

 

Message 7 of 7
(115 Views)