Fixed-Point Blockset
  Go to block:
    Search    Help Desk 
FixPt Switch

The FixPt Switch block is a masked S-function that passes through input one or input three based on the value of input two. Input two is called the control input.

Input one is passed through when input two is greater than or equal to the value of the Threshold parameter. Otherwise, it passes through input three. The threshold value is converted to the data type of input two.

For a description of all other parameters, refer to "Block Parameters".

Note:
The output data type is determined by the input with the largest positive range. If input 1 has a larger positive range than input 3, then it specifies the output data type. Otherwise, input 3 specifies the output data type.

The block icon displays which input is being passed to the output.

Parameters and Dialog Box

Threshold
Switch threshold that determines which input is passed to the output.
Round toward
Rounding mode for the fixed-point output.
Saturate to max or min when overflows occur
If checked, fixed-point overflows saturate. Otherwise, they wrap.

Conversions

The Threshold parameter is converted offline to the second input's data type using round-to-nearest and saturation. Refer to "Parameter Conversions" in the manual for more information about parameter conversions.

Characteristics

Input Ports
Any data type supported by the blockset
Output Port
Same as input port one
Direct Feedthrough
Yes
Sample Time
Inherited
Scalar Expansion
Yes
States
0
Vectorized
Yes



[ Previous | Help Desk | Next ]