Add S-R flip flop to an if action subsystem, connected to a SwitchCase block.

7 visualizaciones (últimos 30 días)
I need to add flip flops and switch blocks to an "If action subsystem" block I'm working on but I'm constantly getting an error i can't fix, is it possible to add S-R Flip Flops to a "If action subsystem" connected to a SwitchCase block in Simulink?
The steps I followed are, Create SwitchCase block -> For case <x>, open "if action subsystem" -> Create Flip-flops to see if certain conditions from external inputs to the "if action subsystem" are met inside.
When trying to update the blocks for this model, i get the following error message:
Input data dependency violation due to function-call or action subsystems. See Subsystem Examples in the Simulink library for valid and invalid examples of function-call and action subsystems.
Component: Simulink | Category: Model error
Input ports (1) of 'If Action Subsystem10/S-R Flip-Flop/Logic' are involved in the loop.
This error repeats for every Flip-flop or switch block in the model.
Does the checking of the external inputs need to be done outside of the "If action subsystem" or is it possible to do it inside? It does look like it is "illegal" to check the values in the condition block.
Thanks in advance
  2 comentarios
Fangjun Jiang
Fangjun Jiang el 2 de Feb. de 2023
It's easier if you could attach an example model.
Sai el 20 de Feb. de 2023
Hi Telmo,
Can you please elaborate the sentence "Create Flip-flops to see if certain conditions from external inputs to the 'if action subsystem' are met inside." or attach any example model so that I could try from my end?

Iniciar sesión para comentar.

Respuestas (1)

Suman Sahu
Suman Sahu el 7 de Abr. de 2023
Hello Telmo,
The error message you are receiving suggests that there are input data dependency violations with the if action subsystem which could happen possibly due to following reasons:
  1. The flip flops use boolean data as inputs and outputs. So, make sure the data types are consistent.
  2. The input/output signals are not present at each time step when its time for execution. Note that all blocks in If Action Subsystem block must execute at the same rate as the driving if/switch case block.[link to the documentation]. So, make sure that input and output signals to the If Action Subsystem are generated at each time step.
Also, if you could provide an example model to reproduce the issue that you are facing.
Hope it helps.


Más información sobre Subsystems 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