![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/172959/image.jpeg)
Allowing no more than 1 invocation of a simulink block (that does I/O) in a model.
3 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I created an embedded target for the stm32f4 discovery board.
It has several blocks that control I/O devices, e.g. reading an ADC.
There often should be no more than 1 invocation of such a block in a model.
The question is, how can enforce this. E.g. that an error is displayed if i try to put a second block in the model. Maybe some trickery with callback functions? Or is there a better way to do this.
Thanks in advance,
Sietse
0 件のコメント
採用された回答
A Jenkins
2015 年 1 月 20 日
Make that block its own model. Reference the block from your top level model. Then set the "Total number of instances allowed per top model" of your I/O block.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/172959/image.jpeg)
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!