When solving a Simulink model with Simcenter MAGNET Simulink plugin 2020.1 the error "Error reported by S-function 'Infolytica_MagNet_PlugIn' in 'PMSM_MagNet_FieldOrientedControl/MagNet Plug-in': Simcenter MAGNET Link DLL Error" occurs. Please upgrade to the latest release of MAGNET Simulink plugin to avoid this issue altogether.
When solving a Simulink model with Simcenter MAGNET Simulink plugin 2020.1 the error "Error reported by S-function 'Infolytica_MagNet_PlugIn' in 'PMSM_MagNet_FieldOrientedControl/MagNet Plug-in': Simcenter MAGNET Link DLL Error" occurs. Please upgrade to the latest release of MAGNET Simulink plugin to avoid this issue altogether.
The workaround for this issue in version 2020.1 of the Simulink plugin is to start Matlab with a bat file that sets some environment variables before starting Matlab. First download StartMatLab.zip to your computer, open it in Notepad and edit the path to the Matlab version that you have installed. Save the bat file then double click it to start Matlab.