Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

FixPt Relay  Anchor1425214252 Anchor1748417484 Anchor1425414254Switch output between two constants
Anchor1425814258.

Description

...

The FixPt Relay block is a masked S-function that allows the output to switch between two specified values. When the relay is on, it remains on until the input drops below the value of the Switch off point parameter. When the relay is off, it remains off until the input exceeds the value of the Switch on point parameter. The block accepts one input and generates one output.
Anchor1426114261

The Switch on point value must be greater than or equal to the Switch off point. Specifying a Switch on point value greater than the Switch off point value models hysteresis, whereas specifying equal values models a switch with a threshold at that value.
anchor8729087290

You specify the output scaling with the Output scaling parameter. Note that there are two dialog box parameters that control the output scaling: one associated with an edit field, and one associated with a parameter list. If Output data type is a generalized fixed-point number such as sfix(16), the Output scaling parameter list provides you with these scaling modes:

  • Anchor1426314263

    Use Specified Scaling - This mode uses the slope/bias or radix point-only scaling specified for the editable Output scaling parameter (for example, 2^-10).

    Anchor1426414264

  • Best Precision: Vector-wise - This mode produces the best precision based on the Output when on and Output when off parameters.

...

1426714267For a detailed description of all other block parameters, refer to Block Parameters.
Anchor1427314273

Parameters and Dialog Box

Anchor1427714277
Anchor1427814278

  • Switch on point

...

  • - The "on" threshold for the relay. 

...

  • Switch off point

...

  • - The "off" threshold for the relay.

...

  • Output when on

...

  • - The output when the relay is on.

...

  • Output when off

...

  • - The output when the relay is off.

...

...

  • Output data type and scaling

...

  • - Specify the output data type and scaling via the dialog box, or inherit the data type and scaling by back propagation.

...

  • Output data type

...

  • - Any data type supported by the Fixed-Point Blockset.

...

...

  • Output scaling

...

  • - Radix point-only or slope/bias scaling. Additionally, you can scale the Output when on and Output when off parameters using the constant vector scaling mode for maximizing precision.These scaling modes are available only for generalized fixed-point data types.

...

...

  • Override with doubles

...

  • - If checked, the Output data type is overridden with doubles.

...

Conversions

Anchor1429314293Both the Switch on point and Switch off point parameters are converted to the input data type offline using round-to-nearest and saturation.
Anchor1429414294

Characteristics

...

14297

Input Port 

anchor14299

14299

Any data type supported by the blockset

Anchor1430114301

Output Port 

Anchor14303

14303

Any data type supported by the blockset

Anchor1430514305

Direct Feedthrough

Anchor14307

14307

Yes

anchor14309

14309

Sample Time

Anchor1431114311

Inherited

Anchor14313

14313

Scalar Expansion

Anchor1431514315

Yes

anchor14317

14317

States

Anchor1431914319

0

Anchor1432114321

Vectorized

Anchor1432314323

Yes