background simulation inside simulation
13 次查看(过去 30 天)
显示 更早的评论
I've got a problem and hopefully anyone can help me. There are 2 Simulink models. The first model ("Main Model") needs to execute another model("Submodel"), which can run in the background. The results of the submodel, need to be available for the main model (not necessarily in the next simulation step). The submodel should be realized inside the main model (one mdl file!).
The input for the submodel is a matrix which consists of time steps (e.g. [0;1;2;...10] and corresponding speed values. This matrix is created by the main model at a certain time....
At the moment I'm trying to implement the submodel as a model reference, which is running in SIL mode.
I get the following error message: "Block 'Subsystem/In1' uses continuous time, which is not supported with the current configuration. Consider selecting the support 'continuous time' option on the Configuration Parameters > Code Generation > Interface pane"
If I select the 'continous time' option I get another error message: "The referenced model "Subsystem" is configured to support continuous time. Continuous time is not supported by Model blocks in SIL or PIL mode. To avoid this error you can uncheck support for "continuous time" on the Code Generation > Interface pane of Configuration Parameters."
The subsystem consists only of an input, a gain block and an output block (for testing purposes)
Is it the right direction to realize this with a model reference block which is running in SIL mode???
Thanks a lot!
0 个评论
采纳的回答
Ryan G
2012-8-15
If you are trying to run PIL/SIL mode you cannot use continuous time blocks, such as an integrator or transfer function, because when code is generated for deployment in those applications it has to be discrete.
You can resolve the issue by replacing any continuous time blocks with discrete blocks such as discrete integrators and discrete transfer functions.
1 个评论
Kaustubha Govind
2012-8-15
Also, I would recommending turning on Sample Time colors in the model being referenced to figure out which blocks are configured with continuous time (denoted with black).
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subsystems 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!