Jump to content

MuParser


Recommended Posts

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. 

Link to comment

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.

  • Like 1
Link to comment
  • 8 months later...

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.

muParserDemo2.PNG

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.