From: Tim DeGrasse on
Im trying to connect an "If Action Subsystem" block to a "Multiport Switch". Im using an edge activated counter to feed into the control input of the Multiport switch. I get the error warning

"Input data dependency violation due to action subsystems. See Subsystem Examples in the Simulink library for valid and invalid examples of action subsystems"

Has anyone had an error like this at all or know any other methods to use an if/else situation to control a switch? thank you
From: Riccardo on
"Tim DeGrasse" <sokkerkid13(a)yahoo.com> wrote in message <hq0cou$j6o$1(a)fred.mathworks.com>...
> Im trying to connect an "If Action Subsystem" block to a "Multiport Switch". Im using an edge activated counter to feed into the control input of the Multiport switch. I get the error warning
>
> "Input data dependency violation due to action subsystems. See Subsystem Examples in the Simulink library for valid and invalid examples of action subsystems"
>
> Has anyone had an error like this at all or know any other methods to use an if/else situation to control a switch? thank you

Check the implications of using an action SS. The error message suggests that its execution context is incompatible with the logic you want to implement. May be changes to the connection between SS and switch may fix the issue.

If/else can be done with switch blocks as well - although not so efficiently as with action SSs.
From: Guy Rouleau on
"Tim DeGrasse" <sokkerkid13(a)yahoo.com> wrote in message <hq0cou$j6o$1(a)fred.mathworks.com>...
> Im trying to connect an "If Action Subsystem" block to a "Multiport Switch". Im using an edge activated counter to feed into the control input of the Multiport switch. I get the error warning
>
> "Input data dependency violation due to action subsystems. See Subsystem Examples in the Simulink library for valid and invalid examples of action subsystems"
>
> Has anyone had an error like this at all or know any other methods to use an if/else situation to control a switch? thank you

I recommend typing at the MATLAB prompt:

sl_subsys_semantics

This will open the demo which explains all types of error related action subsystems. You should be able to find a red example that reproduces the error your receive and a green that shows how to work around.

Guy