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?

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.
Mathscript RT
Working with Mathscript RT and .m scripts.
Best Regards,
Chris
National Instruments - Tech Support

Similar Messages

  • Read out from OBD-II Freematic Emulator using ELM327 with USB and LabView

    Hello. I have an Freematic OBD-II mk2 emulator which simulates diagnostics of a real car. I have connected an ELM327 diagnostic device with USB cable to the emulator and a PC. The connection between emulator, diagnostic device and computer works. Now I need to read out parameters in LabView. How do I do it? I tried to use the NI VISA functions, but didn't manage to read out anything sensible. How can I for example read out Engine RPM? Do you have some example code?
    I want to avoid using Automotive Diagnostic Command Set, because it's to expensive for me. 

    Oh yes, I didn't realize what this hardware does.  Some beginners think that a DB9 is a standard interface for a CAN bus, and when they see the DB9 serial port on their computer they think they can just use that.  I was worried this was what you were attempting.
    So yes VISA is the right way to go.  Once you have this device installed and recognized in Windows it should appear as a COM port.  You can open the Windows Device Manager and by plugging and unplugging your device you should see a COM port appear and disappear.  
    Assuming you do launch LabVIEW and go to the example finder and search for Simple Serial.  This is an example VI that can send serial data to a COM port, wait, then read the response.  It can basically work like hyperterminal.  Assuming there are no already made LabVIEW drivers (I haven't seen any) this will be a good place to start.  Using documentation on your hardware you can start to come up with commands to do things like read and write CAN data, by sending the appropriate commands to the hardware over serial.
    http://www.elmelectronics.com/obdic.html
    Depending on what you want to do it might be a decent amount of work.  Of course if you do get anything good and working feel free to post your progress here so others can benefit.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

Maybe you are looking for

  • How much would it be to replace iPhone 4 with phone warranty?

    Ok I just drop my phone trying to run to catch the bus. I had a case but it didn't work....I don't have the apple warranty I have the 1 year warranty I got from sprint... How much do you think the copay would be? My mom says she doesnt want tofux the

  • Authorization error in XI

    Hi guys I  am not sure whether this is an error related to BASIS or XI. I get this error in SXMB_MONI, at the Call Adapter stage The termination occurred in system ERQ with error code 403 and for the reason Forbidden Its Quality system. I am able to

  • Idoc problem during upgrade from 4.0 to 4.6c

    Hi All, Currently we are upgrading our system from 4.0 to 4.6c. We uses Basic idoc type DELVRY01:it has so many segments which have new definition now in 4.6c, for example segment E1EDL20:- new definition of this segemnt has 3 new extra fields in 4.6

  • Safari 5.0.1 not recognised by Apple Safari site

    Safari 5.0.1 is not recognised by Apple's Safari site for Extensions i.e.: http://extensions.apple.com/ just to be sure, I even upgraded safari once more although I was sure I had the last version! I have not a problem as such, although Safari seems

  • Strategy 50

    Hi, in planning strtegy 50, how raw materials and finished products were manufactured. where will be pir's, how sales order consume the pirs. pls advise the back ground process.