![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/207232/image.png)
I need an entity gate that I can open and close based on an entity attribute.
3 次查看(过去 30 天)
显示 更早的评论
I'm writing a model for a production facility that needs to go through a cleaning cycle every 30 or so batches, and then goes back to production.
I've thought through two solutions (but havent gotten to work):
- Use a entity gate that opens and closes - but I cant find an example of how to open then close then open based on an attribute.
- Use a switch that sends the entity down a cleaning path or a production path.
Any suggestions?
0 个评论
采纳的回答
Krishna Akella
2019-3-7
编辑:Krishna Akella
2019-3-7
Hi Andrew,
The easiest way to do this is to use the 'Simulink Function' block and call the Simulink function from an event action. You can make use of the 'Message send' block to convert the signal to an entity. By making the Simulink function output a '0' or a '1', you can either close or open the gate. The below image illustrates a simple example:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/207232/image.png)
Krishna
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Messages 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!