Matlab/Simulink - Dymola Interface. Dymolablock out of Date - matlab

I'm trying to create a compound model of Matlab and Dymola.
Therefore I followed this tutorial:
Claytex tutorial
Instead of the DrivenPendulum model, I made a simple model myself.
I can translate the model in Dymola just fine, and the Compilation of the Dymola model in Matlab works like in the tutorial, too.
But as soon as I try to simulate in Simulink I receive the following error message:
Error evaluating 'InitFcn' callback of SubSystem block (mask) 'test/DymolaBlock/compmodel'. Block test/DymolaBlock is not up to date. Please recompile it!
Recompiling obviously doesn't work, I get this message again and again.
I'm using Dymola 2014 FD01 and Matlab 2010b with Visual Studio 2008 C++ Compiler.
Unfortunately I can't update Matlab at the moment as I'm working on an university computer, even though I assume this is the cause of the problem.
But maybe someone of you has an idea or even encountered this problem already?
Thanks in advance!

Related

Getting error when running after simulator task in my Matlab workflow

When i am running start simulator in my Matlab workflow i am getting below error.
The mex compiler '' is not supported for simulation builds. Use 'mex -setup' to select a supported compiler.
Scenario : In my matlab project i have *.mdl files. After generated diagram fro that mdl files, i clicked on one of my scope diagram then i am getting above error
Please let me know can i need any compilers, if so tell me i will do accordingly.
Any suggestions/methods to follow get sort out from this error.
Thanks in advance for you great valuable replies.

MATLAB C/C++ code generation error

I'm trying to build my simple Stateflow/Simulink design into C/C++, but I get this error. I used code generation before, but I don't know for this design it shows errors. Does anybody know what is wrong? And here, is my model.
In the Model toolbar select Simulation->Model configuration parameters. You have not setted the Code replacement library (CRL) in the Code Generation->Interface pane. Set it to C89/C90, C99, etc.
PS: If you want to use the code generation you must set a Fixed-step solver (with its Step time) in the Solver pane.

Scicos Code generation for rt_preempt system

Due to http://hart.sourceforge.net/, code generation should work for rt_preempt kernels, when using scilab 5.3.2 and hart toolsbox.
I installed both on ubuntu 12.04 LTS sucessfully, but I'm kind of lost with the code generation. I use one of the hart toolbox examples (realtime_demo), and try to compile and generate code.
First off all: Are these samples supposed to work with rt_preempt or only with RTAI? what code generation commands do I have to use for rt_preempt kernels?
If anybody managed code generation for rt_preempt kernels, I would aapreciate every hint I can get!
Code generation for rt_preempt is automatically enabled, if the hart-toolbox did not detect RTAI during installation. Thus, if you don't have RTAI, by compiling your schematic you should get code that runs using rt_preemption (if this is also not available, then your code will run as a normal Linux process). However at the moment there is no way to get data in or out of the real-time process, as the RTAI scopes, meters can not be used. To overcome this communication issue and also other limitations of Xcos concerning the implementation of real-time systems, you could also have a look at OpenRTDynamics as an alternative.

Compiling Simulink Code into .ELF object form

I have a simple model from simulink and I would like to generate code using the code generator in the simulink and then compile it using gcc into a .ELF object file. How can I proceed?
Thanks
You need the product called Simulink Coder (around matlab 2011b) or Real-time Workshop (for older matlab versions). Typing ver at the matlab command window will show what products and licences you have installed.
If Simulink Coder or RTW are installed, you use the menu Simulation->Configuration Parameters to set up the model for code generation.
If you have Embedded Coder you can set System Target File to ert.tlc, and this will produce a very concise main() routine to call your model code. Otherwise, use grt.tlc which produces a lot more bloat then ert, but is the only useful one available for on Windows.
There are a lot of options to go through and check - it really needs someone with a bit of experience to be present!
As you are requesting an ELF file, is this for an embedded system? If so, there is a lot more work to be done. If the target is not one of the already supported targets, then you need a target package, which will take either a lot of time and experience, or money to buy one.
Custom target development - a world of it's own:
http://www.mathworks.co.uk/help/toolbox/rtw/ug/bse3b2z.html

Failed to find library 'powerlib' matlab. Simulink program executing

When I tried to run a Simulink program under my R2009a Matlab, it showed an error message as follows: Failed to find library 'powerlib' referenced by 'dcmotor_openloop/Armature Current '. This library must be on your MATLAB path.
I'm wondering where I can find this powerlib.
As #Edric mentioned, powerlib is built into SimPowerSystems. The error you see can thus have two causes
(1) There is no installation of SimPowerSystems in your copy of Matlab. Type ver at the command prompt to check for what toolboxes you have installed. If SimPowerSystems doesn't show up in the list, you will have to get the toolbox, otherwise you won't be able to run the model.
(2) Your installation of SimPowerSystems is somehow corrupt. This has never happened to me in Matlab so far, but with modern technology, anything is possible. A fresh install should solve this.
powerlib is a Simulink library shipped as part of SimPowerSystems, see the product page here: http://www.mathworks.com/products/simpower/.
This should really be a comment on another answer, but I can't comment due to reputation.
From at least R2016b, perhaps earlier too, It's no longer called SimPowerSystems. It's now SimscapePowerSystems. You need that plus the bare Simscape package installed.