Conversion Blocks

Put the value in the right form.

Review the library's conversion components. Keep supported types and documented conversion behavior in view when connecting different parts of a model.

Conversion Block Models


Truncate

File: general_blocks/Conversions/truncate.sim
Description
The model converts a real number to an integer. The real number is
truncated to determine the value of the integer.

Ports

Input Ports

  • in     Data Type: REAL

Output Ports

- out    Data Type: INTEGER

Parameters

- none


Round

Round

File: general_blocks/Conversions/round.sim
Description
The model converts a real number to integer. The real number is rounded up if the decimal portion
is >= 0.5, and rounded down otherwise.

Ports

Input Ports

  • in     Data Type: REAL

Output Ports

  • out    Data Type: INTEGER

Parameters

- none


Int_to_Real

IntToReal

File: general_blocks/Conversions/int_to_real.sim
Description
The model converts the integer input in to type REAL, and places it on the output out.

Ports

Input Ports

- in Data Type: INTEGER

Output Ports

- out Data Type: REAL

Parameters

- none


This page is an editorial rewrite of source documentation. Historical status, availability, and platform notes are not independently verified for a current release. Technical examples are reference material, not a live simulator.