08-31-2020 04:05 AM
All,
I'm trying to eval y=min(x,5) using the "eval formula node" with no luck (other functions works great). Ill appreciate any input.
thanks, Erez
08-31-2020 04:14 AM - edited 08-31-2020 04:14 AM
08-31-2020 07:59 AM
@erezg wrote:
All,
I'm trying to eval y=min(x,5) using the "eval formula node" with no luck (other functions works great). Ill appreciate any input.
thanks, Erez
If you look in the sub VI "NI_Gmath.lvlib:Function Decomposition.VI", You'll notice min and max are not functions that are supported.
08-31-2020 08:07 AM
@GerdW wrote:
Hi Erez,
why do you need an "eval formula node"?
One reason to use eval formula node (the VI, not the formula node), is to get a function as a string from a configuration file....
I guess most of us made replacements...
09-02-2020 06:58 AM
thanks for the help 🙂
I guess Ill have to use a replacement as well.
09-02-2020 07:22 AM - edited 09-02-2020 07:23 AM
@erezg wrote:
thanks for the help 🙂
I guess Ill have to use a replacement as well.
I can highly recommend Dijkstra's Shunting-yard_algorithm as a starting point.
Not easy, but a lot easier that figuring it all out yourself.
Of course, someone might share a solution...
09-06-2020 12:51 AM
BTW, is there a way to add the max/min to the function decomposition?
thanks
09-06-2020 02:49 AM
I looked inside the eval function, and it looks like the final calculation is performed in
"three register calculation.vi" (all the allowed function are there). I tried to relapse the "+" with "min", but with no luck.
Any idea?
09-07-2020 03:06 AM
@erezg wrote:Any idea?
Keep trying?
I won't start with replacing the + with min. + is an operator, not a function. I'd start with replacing a 2 parameter function, Or a 1 parameter function if there isn't one. This will be closer to what you want. Next step would be to add the function in stead of replacing it. This needs to be don in two places. The parsing, and the execution.
09-07-2020 03:29 AM - edited 09-07-2020 03:29 AM
Hi,
wiebe@CARYA wrote:
@erezg wrote:Any idea?
I won't start with replacing the + with min. + is an operator, not a function. I'd start with replacing a 2 parameter function, …
I recommend to start with creating a copy of all those VIs from vi.lib before even thinking about editing them!
(Ofcourse only edit the copied VIs, not the ones from vi.lib!)