how wil i import mfile to vissim

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

Submitted by abida86 on Fri, 10/30/2009 - 15:40 

 

How can we import an mfile into vissim

Tagged:

Answers

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

    Submitted by Richd on Fri, 10/30/2009 - 19:35.

    Please note that you can import a .mdl file using the menu item: Tools > Import > Simulink Diagram...
    1) VisSim supports a batch matrix language syntax somewhat similar to an m-file. It supports common builtin functions but does not support user functions at this time. If the m-file consists of variable initializations then copy it to a .vml extension and it should run with minimal change. If you want to run it once at sim start time, enter the file path underSimulate > Simulation Properties... > Preferences > Startup Script File: Note that VisSim also has a built-in C-interpreter so you can specify a C-file here too.
    2) If your m-file specifies ABCD state space matrices, then the state space block can read the m-file directly to obtain the matrices.
    3) If you have Matlab installed, you can use the Matlab read/write blocks to read and write variables in the Matlab workspace. You can also specify a .m file in the Startup Script box above and it will send it to Matlab on sim start