- Create a subsystem. Inside the subsystem, place a constant block connected to an output port. Set the value of the constant block to be "K"
- Mask the subsystem
- Edit the subsystem mask. Add 3 "Edit" parameters. 1 for the bus name, the second for the bus element name. The third should have the name "K" and uncheck the "Visible" box.
- On the mask "Initialization", add code that:
- Creates an instance of the bus specified in the first parameter
- Searches the bus to find the bus element specified by the second parameter
- Sets the workspace mask variable "K" created in step 3 to be the min or max value of the bus element
Simulink: Access bus element properties
2 次查看(过去 30 天)
显示 更早的评论
How to access one bus element properties (minimum and maximum values) in Simulink ? I would like to use these values to saturate a computed signal before assigning the signal.
Thanks
BR
0 个评论
采纳的回答
Mark McBroom
2020-5-14
编辑:Mark McBroom
2020-5-14
Here is one approach that might work. It requires some knowledge of block masking.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subsystems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!