multiple trigger simulink stateflow

6 visualizaciones (últimos 30 días)
Le Dyk Zuy
Le Dyk Zuy el 9 de Ag. de 2021
im trying to do multiple trigger events in simulink stateflow. what i need is to create 2 clk (clk1 and clk2) with different frequency witch controls light as you can see on stateflow chart. but when i simulate my model it triggers when both clk are at the rising edge and holds light "ON", instead of switching light "OFF" on rising clk1 and "ON" on rising clk2

Respuestas (1)

Harikrishnan Balachandran Nair
Harikrishnan Balachandran Nair el 16 de Ag. de 2021
From my understanding, you are facing an issue in switching between states inside the chart, at the rising edges of the respective clock signals. You can achieve the same using 'Edge Detector' blocks. This block will generate a value one, when it detects a change in value in its input. The detection criteria can be made 'rising', 'falling' or 'either' . You can input 'clk1' and 'clk2' to two different edge detector blocks and the output from the blocks can be used to switch between the states 'on' and 'off' in the stateflow chart.

Categorías

Más información sobre Syntax for States and Transitions en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by