LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

uCalc Fast Math Parser for LabVIEW?

Several customers have been using the uCalc math parser product with LabVIEW.  Recently one LabVIEW / uCalc user has attracted my attention to the fact that the new version of uCalc FMP is now harder to use with LabVIEW.  Direct support for LabVIEW was never figured into the design of uCalc.  It just so happened that the older uCalc version worked with it.  Now, I’d like to figure out if there are enough potential uCalc FMP users to make it worth adding direct support for LabVIEW.

 

uCalc FMP lets you evaluate math expressions that are defined at runtime.  You can define functions, operators, and variables, and use them in your formulas.  The older version that is easier to use with LabVIEW can be found at www.ucalc.com/mathparser/ucfmp20.zip (you won’t find the old version in the current download page for now).

 

I myself have no experience with LabVIEW.  However, with some 3rd party help, the user who contacted me recently was able to interface the new uCalc version with LabVIEW.  Perhaps LabVIEW developers may want to weigh in.  Might you be able to create an “official” uCalc FMP wrapper for the current version of uCalc, or give some tips on what it would take for me to do it?
---
Daniel Corbier
www.ucalc.com
0 Kudos
Message 1 of 10
(3,919 Views)

Sorry, I am not familiar with ucalc, but this sounds interesting. Do you have any more details how people were using it in the past and what the new problems are?

Newer versions of LabVIEW have an "import shared library" (menu...tools...import shared library (.dll)...) , that, given a dll, a header file and other info, will create a set of VIs that can be used directly in LabVIEW. I think it would be sufficient to ensure that your distribution contains enough information so this works without mayor problems. 🙂

(If you don't have LabVIEW and want to try for yourself, you can download an evaluation version)

Maybe somebody with a bit more experience with all this can provide more detail.

0 Kudos
Message 2 of 10
(3,911 Views)
In the previous DLL, I exported a series of functions such as an eval routine that returns the result of evaluating an expression, as in
 
ucEval("5+4")
 
which would return 9; a routine to define functions as in
 
ucDefineFunction("Area(length, width) = length * width")
 
or variables as in
 
ucDefineVariable("MyVar = 123") 
 
plus a list of other routines.
 
The new version was completely redesigned.  You can do a lot more.  However, one exported function named uCalc() encapsulates most of the component's functionality.  Instead of exporting many routines from the DLL, wrappers for routines like ucEval, ucDefineFunction, ucParse, etc., are defined in include files for the supported compilers.  On the surface, things run roughly the same for the supported compilers, despite the changes under the hood.  But apparently not so for LabVIEW.
 
ucDefineVariable for instance, which previously was directly exported from the uCalc DLL is now defined as follows in the include file for Visual Basic (classic):
 
Public Function ucDefineVariable(Definition As String, Optional ItemAddress As Long = 0, Optional ByVal t As Long = 0) As Long
   Dim ItemDef$
   ItemDef$ = "Var: " + Definition
   If ItemAddress Then ItemDef$ = ItemDef$ + " At " + Str$(ItemAddress)
   ucDefineVariable = uCalc(uc_Define, ItemDef$, 0, 0, 0, t)
End Function
 
By the way, what is the link to download the evaluation version of LabVIEW?  I found links for the tutorial.  And there's a "Test-Drive LabView" link that brings me to an online evaluation version.
---
Daniel Corbier
www.ucalc.com
0 Kudos
Message 3 of 10
(3,882 Views)


@Corbier wrote:
By the way, what is the link to download the evaluation version of LabVIEW?  I found links for the tutorial.  And there's a "Test-Drive LabView" link that brings me to an online evaluation version.

If you can get your hands on a newer LabVIEW CD or DVD, you can just install it without license number and it will be in evaluation mode. I could not find a download for 8.5, but the 8.2 version is at the following link:

ftp://ftp.ni.com/evaluation/labview/pc/labview_82.exe


 

Message 4 of 10
(3,877 Views)

Thanks for the link.  Greatly appreciated!

---
Daniel Corbier
www.ucalc.com
0 Kudos
Message 5 of 10
(3,854 Views)
Wow! Is the LabVIEW evaluation file really 500+ MB?  I started downloading.  But after 1 MB, there were 3+ hours left for the download.  Maybe I'll try the online version.
---
Daniel Corbier
www.ucalc.com
0 Kudos
Message 6 of 10
(3,817 Views)

I have now created a special wrapper DLL, which I hope will allow you to use LabVIEW with the current version of uCalc FMP (version 2.91).  Since I have no experience with LabVIEW myself, I will need the help of LabVIEW users to make sure this works just right.  Please visit:

www.ucalc.com/ubb/Forum8/HTML/000021.html

and download the uCalc wrapper DLL for LabVIEW.  Then go to the uCalc FMP download page at:

www.ucalc.com/download.html

to download the current version of uCalc FMP.

---
Daniel Corbier
www.ucalc.com
Message 7 of 10
(3,786 Views)
Great! Thanks. I'll check it out, probably over the weekend. 🙂
0 Kudos
Message 8 of 10
(3,787 Views)
Have you had a chance to check it out during the past week?  What did you think of it?
---
Daniel Corbier
www.ucalc.com
0 Kudos
Message 9 of 10
(3,719 Views)
A few months after that last post, a newer version of uCalc Fast Math Parser was released (in December) with better support for LabVIEW, thanks to the help of a LabVIEW user.  Please check out version 2.95 of uCalc FMP.  I'd like to hear more from LabVIEW users who have tried it with uCalc.
---
Daniel Corbier
www.ucalc.com
0 Kudos
Message 10 of 10
(3,483 Views)