MATLAB Examples

Avoid Muxed Trigger Events with Binding

Binding events gives control of a function-call subsystem to a single state in a chart. This control does not work when you allow other events to trigger the function-call subsystem through a mux. For example, this model defines two function-call events to trigger a function-call subsystem using a Mux block.

In the chart, E1 binds to state A, but E2 does not. State B sends the triggering event E2 in its entry action.

When you simulate this model, the output does not reset when the transition from state A to state B occurs.

Binding is not recommended when you provide multiple trigger events to a function-call subsystem through a mux. Muxed trigger events can interfere with event binding and cause undefined behavior.