benb
benb

Reputation: 351

Stop Simulink using From block

I have made a short simulation to display a ballistic trajectory.

I had like to set a condition that if altitude <= zero and time > 1 second, to stop the simulation.

I initialized the simulation to be for example 100 seconds but I expect it to stop when needed.

I tried the following:

enter image description here

However im getting an error saying:

Port 1 of
'Simulation/If'
can only be
connected to an
action subsystem
and may not be
connected to more
than one action
subsystem

Upvotes: 1

Views: 1465

Answers (1)

Phil Goddard
Phil Goddard

Reputation: 10762

You shouldn't be using If-Else blocks for this. You should be using Compare to Constant blocks.

The output of the If block is designed to be used as an enable signal for an Action subsystem, which is what the error is trying to tell you.

Upvotes: 1

Related Questions