I want to check this property with code in Simulink StateFlow. I found that there is no direct identifier. Is there any way to check this option? (Create output for monitoring

1 visualizzazione (ultimi 30 giorni)
I want to check this property with code in Simulink StateFlow. I found that there is no direct identifier. Is there any way to check this option?
(Create output for monitoring:)

Risposte (1)

Divyajyoti Nayak
Divyajyoti Nayak il 17 Dic 2024
Modificato: Divyajyoti Nayak il 20 Dic 2024
To programmatically check the option “Create output for monitoring” in the Stateflow chart’s properties, you can make use of the “HasOutputData” property of the “Stateflow.Chart” object.
chart.HasOutputData = 1;
The 'OutputMonitoringMode' property can be used to set the mode of the output data.
chart.OutputMonitoringMode = ChildActivity;
To access your Stateflow chart object, the “find” function can be used.
chartArray = find(sfroot,"-isa","Stateflow.Chart");
Here’s some documentation to help you out:
'HasOutputData' :
“OutputMonitoringMode”:
  3 Commenti
Divyajyoti Nayak
Divyajyoti Nayak il 20 Dic 2024
Oh my mistake, then instead of the 'OutputMonitoringMode' property, you can use the 'HasOutputData' property. I'll edit the answer above.
Ying Fu
Ying Fu il 10 Feb 2025
Yes, you can remove the check box with this setting
chart.HasOutputData = 0;
This is the mode for modifying it
chart.OutputMonitoringMode = ChildActivity;

Accedi per commentare.

Categorie

Scopri di più su Simulink Functions in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by