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
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | 1 | Maximum number of switchings |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Connectors.RealInput | u1 (from SI2SO) | Input 1 | |
| Connectors.RealInput | u2 (from SI2SO) | Input 2 | |
| Interfaces.Connectors.BooleanInput | u_cond | Condition |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| RealOutput | y (from SO) |