Detect change on Simulink bus with different data types

조회 수: 15 (최근 30일)
Thomas Kotwal
Thomas Kotwal 2020년 10월 12일
답변: Pratheek Punchathody 2020년 11월 27일
What is a good way to determine if any signal in a bus changes value, when the signals in the bus have different data types? The Detect Change block requires that all input elements have the same type.

답변 (1개)

Pratheek Punchathody
Pratheek Punchathody 2020년 11월 27일
Hi Thomas,
As per my understanding one approach would be to create a bus object from the bus creator in your model that creates the bus using the function Simulink.Bus.createObject. Write a MATLAB function that looks to see if any of the bus elements match your specific signal name/type/size.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Interactive Model Editing에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by