Porter Posted November 18, 2016 Report Share Posted November 18, 2016 Has anyone taken a crack at calling MuParser or MuParserSSE from LabVIEW? http://beltoforion.de/article.php?a=muparser&p=interface Quote Link to comment
Porter Posted November 18, 2016 Author Report Share Posted November 18, 2016 In particular, how can LabVIEW interface with the DefineVar function: http://beltoforion.de/article.php?a=muparser&hl=en&p=defining_variables I see that the function expects a pointer to a variable from LabVIEW. MuParser stores this pointer internally and dereferences it in the Eval function. I doubt that the value that I passed along the wire into the DefineVar function will (reliably) remain at the same memory address by the time Eval is called. Quote Link to comment
ned Posted November 18, 2016 Report Share Posted November 18, 2016 Use DSNewPtr, which you can call through a Call Library Function Node with the library name set to "LabVIEW". See the LabVIEW help or posts on the NI forum about this function and the other memory manager functions. You then use MoveBlock (same idea) to copy data between LabVIEW and that pointer. 1 Quote Link to comment
Porter Posted November 19, 2016 Author Report Share Posted November 19, 2016 Thanks ned! I hadn't come across this function yet. I'll have a look at it this weekend. Quote Link to comment
Porter Posted August 17, 2017 Author Report Share Posted August 17, 2017 Thanks again ned! DSNewPtr and MoveBlock did the trick. There is also a nice GetValueByPointer.xnode that really helps getting string values from pointers. muParser seems to be about 3x faster than the expression parser provided with labview and it supports logical operators. Quote Link to comment
Zyga Posted August 18, 2017 Report Share Posted August 18, 2017 Hello Porter, I've been looking on this library for a while, but I wasn't able to make it work with labview. Would you share your code? Zyga Quote Link to comment
Porter Posted August 18, 2017 Author Report Share Posted August 18, 2017 I will ask permission from my employer to share the code on LAVA. I'll keep you posted. 1 Quote Link to comment
Zyga Posted August 21, 2017 Report Share Posted August 21, 2017 OK, If you will not be able to do so, it is not a big deal, at least I know that it is possible Quote Link to comment
Popular Post Porter Posted August 26, 2017 Author Popular Post Report Share Posted August 26, 2017 (edited) Permission granted. Find it in the CR here: Looking forward to hearing your comments & suggestions. I'm sure that there are many things that can be done differently. So far I'm just happy that I stopped (frequently) crashing LabVIEW. Edited August 26, 2017 by Porter 3 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.