as I recognized there's no common way to parse boolean strings with the parse formular string-functions. Operators like !=, ==, && etc. are not allowed.
The common way to nevertheless have such a functionality is to code it by yourself.
In this document I attached a common boolean parser. It's completely open and you can modify it when you want. It works quite simple. Just create a new object of the Parser class, initialize it and call the parse.vi. Afterwards you can achieve your result by calling the execute.vi of the result combination object.
To make it more simple, here a small introduction with Test.vi:
1) Start Test.vi 2) Insert String 3) Push Run 4) Look at the Boolean result
Strings that are allowed: - No variables are allowed (I do not need this, because my variables are resolved before the boolean procedure) - parsed is from left to right, with brackets () you can change the priorities, of course (see examples) - operators: true = true,TRUE false = false,FALSE AND = AND, and, && OR = OR, or, || NOT = NOT, not, ! equality = eq, == not equality = ne, != less = lt, < greater = gt, > less or equal = le, <= greater or equal = ge, >=
So, this should work (for example): true || false OR false !(true && false) || true (!false AND true) && true
but also: !(1 + 6 <= 7) && !(6 ne 7)
If you want to test it, tell me afterwards if you find any errors...and what you inserted to produce an error... By the way....don't try something like: sin(5) < 0 That does not work...(mathematical functions are not yet implemented, this is still on the To-Do list). Each mathematical function containing brackets produce a false result!
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.