如何使Simulink模型恒定? [英] How to make a Simulink model constant?

查看:83
本文介绍了如何使Simulink模型恒定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Simulink(2018a)中有一个模型,里面有更多模型.所以我有:

  parent.slx->child.slx 

我希望 child.slx 在整个模拟过程中仅执行一次,因此基本上它的输出在任何时候都是恒定的.

解决方案

您应该使用

您还需要确保子系统中的出口块在禁用时被设置为保留其值.

I have a model in Simulink (2018a) which has more models inside. So I have:

parent.slx --> child.slx

I want child.slx to execute only once in the whole simulation, so basically its output will be constant at all times.

解决方案

You should be using the Model Block to call the child model. Put this block into an Enabled Subsystem Block in the parent model and create the enable signal in the following way:

You also need to make sure that the outport blocks within the subsystem are set to hold their value when disabled.

这篇关于如何使Simulink模型恒定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆