Creating an Array in a CT Block

  1. In the Elements toolbar or palette, select Array from the Element Type combo box.
  2. Click the appropriate button to create the element you need.

    The Closedfollowing elements can be created as array.

    input

    output

    steplocal variable

    Note

    ESDL / C code only

    parameter

    dependent parameter

    discrete state

    continuous state

    constant

    global parameter

    Note

    block diagrams only

  3. In the X field, enter the maximum size of the array.

    You cannot use the Variant Size combo box because there are no system constants in CT blocks.

  4. In the Basic Type combo box, assign the element type.

    The basic scalar types and Enumeration and Record are available. If you select Enumeration or Record, the Closedfollowing happens.

    The Component combo box appears. It offers all enumerations or records in the database/workspace for selection.

    • Select a suitable enumeration or record.
  5. Adjust the other element properties as described in Editing the Configuration of an Array or Matrix, then click OK.
  6. If you exceeded the maximum size of the element in the X field, the following warning opens:

    The possible dimension max size has to be between 1 and (65535). Please adjust your settings.

    • Confirm the warning with OK.

If you want to optimize the generated initialization code of arrays of scalar or enumeration type, activate the Generating Sparse Arrays target option. See also Initialization of Arrays and Matrices.

See also

Array

Editing the Configuration of an Array or Matrix

Initialization of Arrays and Matrices