From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-18-2017 02:17 PM
Unfortunately, I cannot pull in external code libraries like that (Company policy). If it were up on the package manager without a GPL like license, I could. I'm also stymied with GPower... Trying to pull in paid libraries is a huge exercise (It took me a full year just to get LabView approved). So I'm stuck with the built in libraries and features of the LV Full license.
08-18-2017 02:42 PM
@xl600 wrote:
Unfortunately, I cannot pull in external code libraries like that (Company policy). If it were up on the package manager without a GPL like license, I could. I'm also stymied with GPower... Trying to pull in paid libraries is a huge exercise (It took me a full year just to get LabView approved). So I'm stuck with the built in libraries and features of the LV Full license.
We hear that a lot. A fun excercise for your financial controller would be to add the total cost of not purchasing a license to a toolkit like Expression Parser (or any similar tool), and see if that number exceeds the license price. For starters you wouldn't be wasting your time with this thread 😉
08-18-2017 02:45 PM
That argument falls on deaf ears here. And it's getting much worse. I guess it keeps me employed (Until the company goes out of business).
08-18-2017 02:50 PM
I understand, and I'm not offended in any way. I wasn't pitching EP, my idea was that the user guide to EP might be worth browsing through in any case. And that's free.
12-19-2017 03:43 PM
My solution has been to use muParser: http://beltoforion.de/article.php?a=muparser&hl=en&p=features
Open source, MIT License. It doesn't support mod() out of the box but you can easily add it.
I've released a muparser API for LabVIEW over on LAVA: https://lavag.org/files/file/295-lv-muparser/
Of course, I would prefer to use GPower's expression parser because it's faster, has more features, supports multiple data types, and is fully implemented in GCode. But for most projects muparser does the trick.
04-05-2022 05:19 AM
@altenbach wrote:
Here is the list of differences. Yes, "mod" is not supported.
ok.. 5 years on, using LabVIEW 2020 SP1. The help page for 2012 is still there and the help pages for anything else haven't been updated.
Documentation is appalling and goes in circles for Parsing formulae.
curiously, I can't get mod to work.
However... if I load the Formula express VI and type: mod(2,4) then it tells me that I have a valid variable - so either the express VI is broken or I haven't found the correct code.
I've already worked out that the express VI changes ** to ^ in the formula string under the hood before it passes it onto the "Parse Formula String.vi" in order for it to be a valid formula.
I'm expecting something similar in the express VI for mod, rem, max, and min as my syntax checks on my new dialog VI are failing.
Any chance anyone with superpowers can peek under the hood of the express VI? (or does anyone know anything about this)?
James
04-05-2022 06:12 AM
Hi James,
@James_W wrote:
Any chance anyone with superpowers can peek under the hood of the express VI? (or does anyone know anything about this)?
You can convert the ExpressVI to an ordinary subVI (using its context menu) and look for yourself. The ExpressVI scripts a formula node - and your mod() function is supported within the formula node…
04-05-2022 08:00 AM
@GerdW wrote:
Hi James,
@James_W wrote:
Any chance anyone with superpowers can peek under the hood of the express VI? (or does anyone know anything about this)?You can convert the ExpressVI to an ordinary subVI (using its context menu) and look for yourself. The ExpressVI scripts a formula node - and your mod() function is supported within the formula node…
Argh!!!
so If I don't know what the formula is going to be I can't use it? as I can't use scripting (only the parse) functions at runtime. 😫
04-05-2022 08:34 AM
Hi James,
@James_W wrote:
so If I don't know what the formula is going to be I can't use it? as I can't use scripting (only the parse) functions at runtime. 😫
When you want to change the formula at runtime you cannot use the ExpressVI at all. Point.
You can configure the ExpressVI only at edit time!
04-05-2022 10:33 AM
For runtime parsing and evaluation, have you taken a look at our Expression Parser toolset?
https://gpower.io/en/products/expression-parser/
There is a comprehensive user guide, take a look at the first few pages to see what it is and how it compares to the options shipping with LabVIEW. I wrote it, so let me know if you have any questions.