Add S-R flip flop to an if action subsystem, connected to a SwitchCase block.
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi,
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
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
Sai
2023년 2월 20일
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?
답변 (1개)
Suman Sahu
2023년 4월 7일
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:
- The flip flops use boolean data as inputs and outputs. So, make sure the data types are consistent.
- 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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Schedule Model Components에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!