Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.0 - English

Change language to:
Français - 日本語 - Português

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab manual >> xcos > palettes > Integer palette > CONVERT

CONVERT

Data Type Conversion

Block Screenshot

Description

This block converts an input signal of any data type to a specified data type. The input can be real, complex or integer. When the output is an integer and when overflow occurs the block three different forms of results :

1- A normal non saturated result.

2- A saturated result.

3- An error message warning the user about the overflow..

The user can select one of these three forms by setting the "DO ON OVERFLOW" field to 0,1 or 2.

Dialog box

  • input type (1= double 3=int32 4=int16 5=int8 ...)

    It indicates the input data type, it can be a double or an integer.

    Properties : Type 'vec' of size 1.

  • output type (1= double 3=int32 4=int16 5=int8 ...)

    It indicates the output data type, it can be a double or an integer.

    Properties : Type 'vec' of size 1.

  • Do on Overflow(0=Nothing 1=Saturate 2=Error)

    When this parameter is set to zero the result is similar to a normal multiplication of two integer matrix. When it is set to 1, on overflow the block saturate the result. When it is set to 2, on overflow an error message box appears.

    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,-2] / type 1

  • regular outputs:

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

  • 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: convert

Interfacing function

  • SCI/modules/scicos_blocks/macros/IntegerOp/CONVERT.sci

Computational function

  • SCI/modules/scicos_blocks/src/c/convert.c

Authors

Fady NASSIF - INRIA

<< BITSET Integer palette DFLIPFLOP >>

Copyright (c) 2022-2023 (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:
Wed Jan 26 16:23:47 CET 2011