Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - 日本語


SWITCH2_m

Switch2

Block Screenshot

Description

The Switch block passes through the first (top) input or the third (bottom) input based on the value of the second (middle) input. The first and third inputs are called data inputs. The second input is called the control input. You select the conditions under which the first input is passed with the Criteria for passing first input parameter. You can make the block check whether the control input is greater than or equal to the threshold value, purely greater than the threshold value, or nonzero. If the control input meets the condition set in the Criteria for passing first input parameter, then the first input is passed. Otherwise, the third input is passed.

Parameters

  • Datatype

    a scalar. Give the datatype of the inputs/output.

    • 1: matrix of real numbers,

    • 2: matrix of complex numbers,

    • 3: matrix of int32 numbers,

    • 4: matrix of int16 numbers,

    • 5: matrix of int8 numbers,

    • 6: matrix of uint32 numbers,

    • 7: matrix of uint16 numbers,

    • 8: matrix of uint8 numbers.

    Properties : Type 'vec' of size 1

  • Pass first input if: u2 ≥ a

    Select the conditions under which the first input is passed. You can make the block check whether the control input is greater than or equal to the threshold value, purely greater than the threshold value, or nonzero. If the control input meets the condition set in this parameter, then the first input is passed. Otherwise, the third input is passed.

    Properties : Type 'vec' of size 1.

  • Threshold a

    Assign the switch threshold that determines which input is passed to the output.

    Properties : Type 'vec' of size 1.

  • Use zero crossing: yes

    Select to enable zero crossing detection.

    Properties : Type 'vec' of size 1.

Default properties

  • always active: no

  • direct-feedthrough: yes

  • zero-crossing: yes

  • mode: yes

  • regular inputs:

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

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

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

  • regular outputs:

    - port 1 : size [-1,-2] / 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: switch2_m

Example

Interfacing function

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

Computational function

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

Report an issue
<< SELF_SWITCH Signal routing palette SWITCH_f >>

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 Jun 17 17:54:23 CEST 2024