You will have to open the simcoupler block from the file where PSIM is installed and then copy it into your simulink model.(Simulink ->Open-> DIrectory where PSIM is installed-> Lookfor PsimMOdule.mdl or Simcoupler.mdl
OR
just go the link and download it: http://www.psim-europe.com/psim_simcoupler.php
Hello @Ali i am still facing some problem even i followed above method as guided by Muhammad Ahsan.. When i browse for schematic in simulink in simcoupler then matlab generate some error (i.e; Error while evaluating UIControl Callback). and i also can not see the separate block in simulink library for simcoupler. Please help me with this problem
when i attache the simulation file of PSIM in the simulink using simcoupler then it generates an error when i press apply button. Following is the error message:
Error using PSimDialog>CloseBtn_Callback (line 217) Error reported by S-function 'SimCoupler' in 'chop1q_ifb_simulink_r_13/chop1q_ifb_psim': PSIM Message: %1 is not a valid Win32 application.
Error in gui_mainfcn (line 95) feval(varargin{:});
Error in PSimDialog (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)PSimDialog('CloseBtn_Callback',hObject,eventdata,guidata(hObject))
Please guide me with error gerated by Matlab. Thanks
Dear i am facing problem in simcoupler when i simulate the schematic in simulink it gives following error
Error reported by S-function 'SimCoupler' in 'simcoupler_model_psim_simulink/simcoupler_model_psim': PSIM Message: 1% is not a valid Win32 application.
If you are using the PSIM Time-Limited Version or a version that does not require a hardware key, from the PSIM directory, run the program “SetSimPath.exe”. This will set up the SimCoupler Module with the Matlab/Simulink, and will add the SimCoupler block into the Simulink library browser.
PSIM is for power electronics. I am not dealing with any power electronic circuits. Rather, am working on microelectronics, which is by Virtuoso Visualization tool of CADENCE, where one can simulate an analog circuit. I could see very few references for doing co-simulation of MATLAB & CADENCE. So, only I wrote here.
The readily available 32-bit v9.1 and 64-bit v9.0 are very old (2010-2011), so first of all you need older versions of MATLAB which are hard to find. Errors like:
Cannot find an exact (case-sensitive) match for 'PsimDialog'
The closest match is: PSimDialog in C:\Program Files\Powersim\PSIM9.0.3_TrialX64\PSimDialog.m
Error while evaluating uicontrol Callback
are due to incompatibility of versions. I got that error with MATLAB 2013,2017 and 2018.
In my case I used 64-bit 2011a MATLAB, if your license is expired like mine was, open the license file with Notepad++ and check out the expiry date ( in my case 1-nov-2017) and just change the time setting of your PC to a point before that like 2016 and that takes care of that.
Then you need to provide your MATLAB with the necessary files. In my 64-bit v9.0 PSIM, either the SetSimPath.exe in installation directory or utilities-->Simcoupler Setup did the trick. What this does is it copies the following files from PSIM directory:
to the following directory: 2011a/toolbox/simulink/SimCoupler.
You can do it manually as well.
Now when you open Simulink, a block named S-Function SimCoupler appears, double click it and browse the PSIM file you want to couple with simulink. Then run the simulation from Simulink not from PSIM.
If you have a 32-bit system, I reckon the process should be the same.