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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FreeMat

I have a large amount of code that was written in FreeMat and am wondering what is the best way to deal with it, as I wish to integrate it into LabView. LabView would control the hardware, whilst FreeMat has some mathmatical scripts. What would be the best possible solution, either:

 

1) Somehow call the FreeMat files from LabView, although I do not know how to do this.

2) Copy and paste the FreeMat's code into a LabView Math Script, would this work?

3) Convert the FreeMat code to MatLab then call the MatLab Script Node in LabView, though this would mean getting a Matlab Licence?

 

 

0 Kudos
Message 1 of 3
(2,423 Views)

I am not familiar with FreeMat, but is it possible to create a dll?

If not, then try option 2 if the syntax is supported by MathScript.
Otherwise, you're stuck with option 3.

0 Kudos
Message 2 of 3
(2,418 Views)

Hi Steve,

 

Building into a dll is one option, though I struggled to find resources on how to do this for FreeMat. Once you've built the FreeMat .dll you can follow the functions below:

 

Calling a DLL in LabVIEW

 

If you have access to the Mathscript RT module then you should be able to call your FreeMat .m file directly within the LabVIEW engine.

 

 

Best Regards,

 

Chris

National Instruments - Tech Support
0 Kudos
Message 3 of 3
(2,372 Views)