09-06-2011 03:29 AM
Hi
I need an expression evaluator which can resolve an expression at run time.
Can not use formula nodes as they can't be dynamically configured at run time.
What I need is sonmething like the exprerssion editor and evaluator in TestStand.
I.e. the user applies the equation : var1/var2 + (1/var4)*0.1254 - var5.
The variables and their values are known at the time of the evaluation.
Has anyone implemented this in LabVIEW
Kind regards Kahr
09-06-2011 04:46 AM
You could use lab python. I posted this example a few years ago.
09-06-2011 05:03 AM
09-06-2011 09:01 AM
09-09-2011 06:12 AM
I'm curious to know if this is useful for your application. I've seen this use-case suggested in the past and I'm interested to see your solution.
This solution requires you to install Python and the Lab Python tools, but it adds great flexibility in handling your dynamic formula input.
09-12-2011 12:25 PM
09-12-2011 01:58 PM
09-12-2011 02:01 PM
09-12-2011 02:09 PM
kablam!
Parse Formula String.vi and the Eval Parsel Formula String.vi are your friends!
09-12-2011 02:13 PM
Will the Parse Formula String.vi work for you? The formula is entered as a string. Most of the fucntions available for the Formula node can be used. The Formula VIs are in Mathematics >> Scripts & Formulas.
Lynn