getting this error message

6 views (last 30 days)
Manjunath Pattanad
Manjunath Pattanad on 15 May 2023
Edited: Shaik on 15 May 2023
Error:Unrecognized function or variable 'simmechanics.sli.internal.register_datatypes'.
  1 Comment
Shaik
Shaik on 15 May 2023
Edited: Shaik on 15 May 2023
Possible solution: Right click "CircuitSimulationOnramp" window then go to Model Properties then go to "Callbacks" then select "InitFcn*" and key in following statement in Model initialization function window to resolve the error addpath(fullfile(matlabroot,'toolbox/physmod/sm/sli/m')
Check for screenshot attached

Sign in to comment.

Answers (1)

Shaik
Shaik on 15 May 2023
Hi Manjunath,
The error message you encountered, "Unrecognized function or variable 'simmechanics.sli.internal.register_datatypes'", suggests that there is an issue related to the Simulink module called SimMechanics. This error typically occurs when there is a compatibility issue or a problem with the installation.
To troubleshoot this issue, you can try the following steps:
  1. Check Compatibility: Verify that the version of SimMechanics you are using is compatible with your version of MATLAB. Ensure that you have the latest version of SimMechanics that is supported by your MATLAB installation.
  2. Update MATLAB and SimMechanics: Make sure you have the latest updates for both MATLAB and SimMechanics. Check for updates by going to the MATLAB Home tab, clicking on "Help," and selecting "Check for Updates." If any updates are available for SimMechanics, install them and restart MATLAB.
  3. Repair Installation: If you suspect that the installation of SimMechanics might be corrupted, you can try repairing the installation. Open the MATLAB installer, select the SimMechanics module, and choose the "Repair" option. Follow the instructions to complete the repair process.
  4. Clear MATLAB Cache: Clearing the MATLAB cache can help resolve various issues. Exit MATLAB, locate the MATLAB cache folder (usually located in the user's home directory), and delete its contents. Restart MATLAB and check if the error persists.
  5. Reinstall SimMechanics: If none of the above steps resolve the issue, you may need to uninstall and reinstall SimMechanics. Completely remove SimMechanics from your MATLAB installation and then reinstall it using the installer or the MATLAB Add-Ons manager.

Communities

More Answers in the  Power Electronics Control

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!