Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.0.0 - Português


M_SWITCH

Multi-port switch

Block Screenshot

Description

The Multi-Port Switch block chooses between a number of inputs. The first (top) input is called the control input, while the rest of the inputs are called data inputs. The value of the control input determines which data input is passed through to the output port.

Parameters

  • number of inputs

    Specify the number of data inputs to the block.

    Properties : Type 'vec' of size 1

  • zero base indexing

    If selected, the block uses zero-based indexing. Otherwise, the block uses one-based indexing.

    Properties : Type 'vec' of size 1

  • rounding rule: int

    Select the rounding mode for the output.

    Properties : Type 'vec' of size 1

Default properties

  • always active: no

  • direct-feedthrough: yes

  • zero-crossing: no

  • mode: no

  • regular inputs:

    - port 1 : size [1,1] / type 1

    - port 2 : size [-1,1] / type 0

    - port 3 : size [-1,1] / type 1

  • regular outputs:

    - port 1 : size [-1,1] / type 1

  • number/sizes of activation inputs: 0

  • number/sizes of activation outputs: 0

  • continuous-time state: no

  • discrete-time state: no

  • object discrete-time state: no

  • name of computational function: mswitch

Example

Example 1

This sample model demonstrates signal selection with different parameters : with a 0 or 1 indexation and with different rounding modes.

Interfacing function

  • SCI/modules/scicos_blocks/macros/Branching/M_SWITCH.sci

Computational function

  • SCI/modules/scicos_blocks/src/c/mswitch.c (Type 4)

Report an issue
<< ISELECT_m Signalrouting_pal MUX >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Mar 27 09:49:59 GMT 2023