Can I access Matlab from VisSim?

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

 

Submitted by Joe on Fri, 10/04/2013 - 02:18 


I was hoping to read and write variables from the Matlab workspace. Can I do it? If so, how?

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

     

    Submitted by karen on Fri, 10/04/2013 - 02:26.

    VisSim provides Matlab read, write and function call blocks. These blocks allow reading and writing to the Matlab workspace. Normally the Matlab blocks are installed if the VisSim install detects a prior Matlab installation. If this is not the case, then

    1. Download vsmML.DLL to your computer
    2. Copy vsmML.dll to the DLL directory of your MatLab installation
      • This is the directory that contains the libeng.dll and libmx.dll. In older installations they are in the same dir as matlab.exe (/bin). In new installations it is /bin/win32 or /bin/win64.
    3. In VisSim, go to Edit > Preferences > Addons and add the path to the DLL that you copied in 2. to the addon list.
  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Pedro Henrique ... on Wed, 04/06/2016 - 18:28.

    Greetings,

    I just did the procedure described above and I'm getting an error that says something like:

    • Matlab interface error 193 %1 is not a valid Win32 app;

    The MATLAB version is 7.8.0 64 bits and Vissim's is 8.0C0.

    I'm just wondering if it's something related to x64 version of MATLAB...

    Thanks in advance.