03-16-2012 04:05 PM
I can't seem to get mod to work in the Eval y=f(x) VI. I entered "mod(x,20)" for a formula and get error -23001 "Syntax error of parser". If I instead use "x-20*floor(x/20)" which should be the exact same thing, it works - no error. Any idea what I'm doing wrong with mod?
Solved! Go to Solution.
03-16-2012 05:58 PM
That function is not supported in the Formula Evaluation VIs. In fact, no function of two variables is supported. My usual workaround in similar cases is to use a little regex voodoo, in this case to replace the mod expression by its longhand equivalent.
You could also modify the Eval VIs to add the '%' function, which I did for the heck of it, but it is a jungle in there.
03-19-2012 08:07 AM
aah - that explains it. Thanks, and nice string parsing!