Scope an event output from stateflow chart

12 Ansichten (letzte 30 Tage)
Marcello Ranucci
Marcello Ranucci am 10 Apr. 2025
Bearbeitet: Altaïr am 14 Apr. 2025
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

Antworten (1)

Altaïr
Altaïr am 14 Apr. 2025
Bearbeitet: Altaïr am 14 Apr. 2025
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:

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by