Borrar filtros
Borrar filtros

Stateflow chart Output Error

2 visualizaciones (últimos 30 días)
Yuan
Yuan el 11 de Mayo de 2016
Respondida: Rangan M K el 12 de Mayo de 2016
Hi,
I'm working on designing a touchscreen with Altia Design, using Stateflow to define variables. In the Stateflow chart, I have two parallel states. Each state has two exclusive states. The logic is
  • pressing Button1 on touchscreen will enable/disable Button1
  • pressing Button2 on touchscreen will enable/disable Button2
  • pressing Button1 on touchscreen will disable Button2 if it was enabled
  • pressing Button2 on touchscreen will disable Button1 if it was enabled
'Btn1_enable' and 'Btn2_enable' in the screenshot below are defined as data outputs to Simulink.
If I use only one button to do the control, i.e. disable Button2, pressing on Button1 to enable/disable itself, or disable Button1, pressing on Button2 to enable/disable itself, there is no issue. Outputs of the chat change as the states of Button1 and Button2 change. However, if I enable Button2 and press on Button1 to enable Button1 and disable Button2 at the same time, the states of both Buttons change in the chart, but the outputs of the chart stay the same. The outputs change only if I press on Button1 again.
Can you please provide me a clue of why this is happening?
Thank you in advance.
Yuan

Respuestas (1)

Rangan M K
Rangan M K el 12 de Mayo de 2016
Kindly check by giving inputs using a signal builder because I tried the same sample as shown and it was working fine. And test by giving [input==constant] for transition to happen instead of the event type input.

Categorías

Más información sobre Complex Logic en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by