MATLAB Answers

0

How do I switch between subsystems which contain Simscape blocks, during simulation?

Asked by Saif Sayed on 18 Aug 2016
Latest activity Commented on by Saif Sayed on 23 Aug 2016
My subsystems are actuated via an external input which would change during simulation thus trigerring the switching of subsystems.

  0 Comments

Sign in to comment.

1 Answer

Answer by Swarooph
on 23 Aug 2016

You can use Enabled Subsystems. The system execution here depends on an input control signal (positive value results in execution). So you could have technically 2 enabled subsystems that are mutually exclusive by using a boolean signal and a not of that signal, enabling the 2 different systems. Then use the merge block to combine the input.

  1 Comment

If I use subsystems, the problem is that I want the same simscape connecting line to flow through each subsystem, so it's not even a physical signal but a connecting line which connects simscape blocks which I want to flow through my subsystems. Also, the merge block is used to get the output of the two subsystems, will I be able to implement and execute it when I have simscape connection lines as outputs of my subsystem?

Sign in to comment.