Knowledge Base
Welcome to OPAL-RT’s Knowledge Base
OPAL-RT offers a repository of support information for optimal use of its technology.
Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.
For optimal experience, use a desktop computer.
Reference Number: AA-01320// Views: AA-01320// Created: 2017-09-03 20:43:19// Last Updated: 2017-09-11 04:09:51 Problem & Solution Toolboxes paths not kept in the MATLAB "set path" after restart ProblemSome OPAL-RT or XILINX toolboxes are missing from the Simulink library browser, which can also generate "bad links" in the model. The associated paths are missing as well from the MATLAB "Set path" window. Adding these paths solves temprorarily the problem, but as soon as MATLAB is restarted, the paths are lost again. How to correct this ? SolutionThis problem comes from a lack of privileges on the computer when setting the paths. MATLAB does not allow to save these paths, thus generating the bad links 1) Open MATLAB from RT-LAB and type the command >> userpathIt should return something like 'C:\Users\ We are calling this the USERPATH. 2) Type the command >> matlabrootIt should return something like C:\MATLAB\R2015ASP1 or C:\Program Files\MATLAB\R2015SP1 We are calling this the MATLABROOT. 3) From folder MATLABROOT\toolbox\local, copy the file 'pathdef.m' and paste it into the USERPATH. This file contains the paths defined in the Set Path window 4) Copy the attached file 'startup.m' in the USERPATH. This will tell MATLAB to use the 'pathdef.m' file located in the USERPATH 5) Edit the 'startup.m' file and complete line 4: replace the tag pathdir = 'C:\Users\ 6) Save and close 'startup.m' 7) From MATLAB (again, the instance opened from RT-LAB), add the desired paths (using the Set Path window or any M-File provided with RT-LAB), and save. 8) Close and reopen MATLAB from RT-LAB 9) Check that the paths are there. 10) If the paths are there, you can Edit the model from RT-LAB, there should be no more bad links
|