Scope an event output from stateflow chart

Hi,
Is there a simple way to visualize in a scope an output event from a stateflow chart? I'm realizing a scheduler and I want to see if all triggers are generated correctly. Thank you very much!
Marcello

답변 (1개)

Altaïr
Altaïr 2025년 4월 14일
편집: Altaïr 2025년 4월 14일

1 개 추천

A Stateflow output event has a property called Trigger, which can be configured as follows:
  • To specify an edge-triggered output event, set the Trigger property to Either Edge.
  • To specify a function-call output event, set the Trigger property to Function call.
More details can be found here:
When the Trigger is set to Either Edge, a Scope block can be used to view the event, or the event signal can be logged to the Simulink Data Inspector. For logging a Function call event, connect a Function-Call Subsystem to the event output port and enable the "Show output port" option in the block parameter of the Trigger Port block inside the subsystem.
The Trigger Port block outputs values as follows:
  • 1 for a signal that causes a rising trigger
  • -1 for a signal that causes a falling trigger
  • 2 for a function-call trigger
  • 0 otherwise
Use Markers in the plot for better visualization of the triggers. For more information, refer to the following MATLAB Answer query:
Additionally, the Sequence Viewer can be used to visualize message transition events and the data carried by the messages. Further details are available here:

카테고리

도움말 센터File Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품

릴리스

R2023b

질문:

2025년 4월 10일

편집:

2025년 4월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by