LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I enter an equation in a Formula Node?

hi,
A part of my program consists in carrying out diferents operations between waveforms. I would like that the user can decide the operations to carry out.
For example: Curve = Curve1 + (Curve2 * Curve3)/2
For that I used the function "Formula Node" but I am not able to enter the equation wanted at the time of the execution of my program. I d'like to have some thing which resembles a function already present in Labview 7.1 but the configuration of the equation is not carried out by the user but by the programmer. This function is (for Labview 7.1 in English) in the pallet of fonctions/Analize/Mathematics/Formula/Formula. It is named "Formula Node". If somebody had already had same the concern and if it could help me. Cordially.
0 Kudos
Message 1 of 6
(2,436 Views)
I link my software...
0 Kudos
Message 2 of 6
(2,429 Views)
Hi,

Use the EvalFormulaNode function present in the same palette.
Onthat one you can connect the formula as a string.

Hope this helps,
Paulo
Message 3 of 6
(2,427 Views)
I would very strongly suggest to loose the formula node for these kinds of operations, it is clumsy and inefficient. Use wires!!! 🙂

Your code makes very little sense, for example your loop count is determined by the value of the biggest array element, which might or might not have any relation to the array dimension. You could well index into vacuum in many cases. Shouldn't it run for each row once???

In the case of the formula in your example code (result=X1+X2+X3+X4+X5+X6+X7+X8), you could use a very simple autoindexing construct such as in this picture. It can easily be modified for more complex arithmetic.


How many possible formulas do you need? Couldn't you predefine a set to be selected via a ring and case structure?

Message Edited by altenbach on 06-03-2005 10:29 AM

Message 4 of 6
(2,425 Views)
Thank you for your answers! I will test with the EvalFormulaNode function.
0 Kudos
Message 5 of 6
(2,415 Views)
The users can carry out any equation. The equation must be written with a similar panel to a calculator. Once the written equation, the equation is introduced into a Formula Node. I Hope that you see what I want to do.
0 Kudos
Message 6 of 6
(2,413 Views)