Scope an event output from stateflow chart

11 ビュー (過去 30 日間)
Marcello Ranucci
Marcello Ranucci 2025 年 4 月 10 日
編集済み: Altaïr 2025 年 4 月 14 日
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 日
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:

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by