blockSwitchN

Switching between inputs up to n times depending upon condition

Extends from Interfaces.PartialConverters.SI2SO (Converter with two inputs and a single output).

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

The SwitchN switches up to n times between the inputs u1 (u_cond = true) and u2 (u_cond = false). After each switching an internal counter will be increased and checked so that there are at most n switches.

See also

Switch

Parameters

TypeNameDefaultDescription
Integern1Maximum number of switchings

Connectors

TypeNameDefaultDescription
Connectors.RealInputu1 (from SI2SO)Input 1
Connectors.RealInputu2 (from SI2SO)Input 2
Interfaces.Connectors.BooleanInputu_condCondition

Components

TypeNameDefaultDescription
RealOutputy (from SO)