Pinned topic Importing Simulink does not work.
I tested importing simulink model to rhapsody.
I tried to import a simulink model refer to user guide document(page 1431~).
But I can not find the menu 'Import/Sync Simulink Model' in the object of Rhapsody.
So, I failed the Matlab Interface test. Please reply as soon as possible.
<Tool Ver Info>
Rhapsody : v7.5 Developer
Product Name: rhapsody
OS Version=Windows XP
OS Service Pack=Service Pack 3
stevee 120000PEMC11 PostsACCEPTED ANSWER
Re: Importing Simulink does not work.2009-07-23T14:52:48Z in response to SystemAdminAfter adding the Simulink profile, applying a <<SimulinkBlock>> stereotype to a new Class, you can RIGHT click over the Class and get the "Import/Sync Simulink Model". Note , this import is not off Tools, it's a pop-up menu off the Class.
Re: Importing Simulink does not work.2009-07-24T05:40:25Z in response to steveeThank you for replying. I tried as your comment, but I can't find that option. I'll check the tool version and check whether it support this function. Could I get the example of this kind of project??
stevee 120000PEMC11 Posts
Re: Importing Simulink does not work.2009-07-28T08:29:53Z in response to steveeThank for your detailed reply. As your scaned image, I can see the menu 'Import/Sync simulink model'.
So, I tested a simple .mdl file and .c file such as 'A+B=C'
The selected options are Simulink Model File : ex.mdl, Generated Source Code : ex.c, Sampling Time : 100.
But, 'Failed in import data from Simulink' error displayed. Other models are also failed.
How should I do?
Re: Importing Simulink does not work.2009-07-28T11:00:46Z in response to SystemAdminTry this:
Set the environment variable to MATLAB_RESERVE_LO=0 to resolve the issue.
Below are the steps:
1. In the Windows Control Panel, select System > Advanced > Environment Variables.
2. In the User variables for your user name tab, click New.
3. Enter the name MATLAB_RESERVE_LO and set the value to 0.
4. Click OK to save your changes and close the Control Panel.
5. Log Out of Window and Log In again and MATLAB should now start correctly to allow Sync Simulink Code/Model to be performed from Rhapsody without errors.
if this still doesn't fix then manually start matlab server and perform Sync/Import
Re: Importing Simulink does not work.2009-07-29T04:47:49Z in response to SystemAdminThanks, I did all the steps as your comment.
However, 'Failed in import data from Simulink' error message is displayed, too.
I tried manulally start matlab and perform again, I got a same result.
It's very hard to resolve the import matlab issue. What should I do next?
ggge 270003S7CF2 PostsACCEPTED ANSWER
Re: Importing Simulink does not work.2010-12-16T21:24:55Z in response to SystemAdminI have the same problem. When I select import/sync simulink model, there's error message saying 'Failed in import data from Simulink' . I did put MATLAB_RESERVE_LO=0 to user variable, log off computer and log on again but still not working.
Re: Importing Simulink does not work.2009-08-04T14:29:43Z in response to SystemAdminI have exactly the same problem! it used to go well with simulink integration just few days ago and i can't remember any change i might have made. I also tried your solution, same error. Has anyone managed to solve this problem?
Re: Importing Simulink does not work.2010-12-19T08:08:07Z in response to SystemAdminHi,
Make sure that the current Matlab version is properlly installed and registered. To register Matlab, please do the following:
- Open a Command DOS window
- Browse to <MATLAB_ROOT/bin>
- type 'matlab /regserver'
In addition make sure the current matlab is added to the environments path, and if many Matlab version exist make sure the current Matlab is the first in the path list. To do so please do the follwing:
- R-Click on the 'My Computer' (either in the desktop or in the start
- Click on the 'Advanced' tab, and click on 'Environment Variable' button
- Look for the 'Path' variable in the 'System Variables', click on it and
- Add to the end of the path list (don't forget to add a ';' before each
example, on my machine its
L:\Program Files\MATLAB\R2010a\bin;L:\Program Files\MATLAB\R2010a\bin
- Click 'OK' on all dialogs to apply the change.
- Rhapsody and Matlab (if opened) must be restart again, to apply the
ggge 270003S7CF2 PostsACCEPTED ANSWER
Re: Importing Simulink does not work.2010-12-20T15:44:20Z in response to SystemAdminThanks, Chaim.
You pointed out the root cause of the problem for me. I have multiple Matlab in my laptop. I just registered Matlab and put the current Matlab before other Matlabs in the environment PATH list. It works!
Robert Duan 270001FWFF2 PostsACCEPTED ANSWER
Re: Importing Simulink does not work.2012-12-09T11:51:33Z in response to SystemAdminDear chaim,
I've tried with the steps you mentioned. But I found the problem still exists.
And I snap the screen as attachment. My Matlab version is 2012B and Rhapsody version is 184.108.40.206
My path environment snapshot and simulink block mark snapshot attached too.
Could you tell me how this problem happens?
TheTyke 270001Y84Y1 PostACCEPTED ANSWER
Re: Importing Simulink does not work.2014-03-18T10:36:43Z in response to SystemAdmin
I have tried running the PowerWindowWithSimulink sample from Rhapsody 220.127.116.11 and Simulink R2012b and it doesn't work.
When trying to Import/Synch the simulink model I get a MATLAB API Failure.
I have had the sample working from earlier releases of Rhapsody and Simulink.
The Rhapsody Help implies it only works with a specific earlier release of MATLAB.
I have tried the previous suggestions and saving the mdl file as a R2010b file without success.
Anyone know how to fix it?