Engee documentation

Bus Selector

Selects the required signals from the incoming bus.

bus selector

Description

The Bus Selector block outputs the items selected from the input bus. The block can output the selected items separately or in a new virtual bus.

Ports

Input

Port_1 - input virtual bus
bus

Input virtual bus.

When working with an array of buses, use the Selector block to select the desired bus, which you then connect to the Bus Selector block.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Output

Port_1 - selected elements of the input bus
scalar | vector | matrix | bus

By default, the block outputs each of the selected elements through a separate output port, which is labelled with the name of the corresponding bus element. If the Output as virtual bus parameter is enabled, the block outputs the selected elements grouped into a virtual bus through a single port.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Parameters

Elements in the bus - list of elements in the input bus
list of elements

This parameter is read-only.

The input element list includes all elements included in the block, including nested bus elements. An arrow next to an element indicates that the input element is a bus. Click the arrow to display the contents of that bus.

Usage in program code

Block parameter

InputSignals

Type

cell array

Values

element names

Selected elements - selected elements of the input bus
element list

Each element in this list is included in the block output signal.

To add items to the block output:

  1. Select one or more items from the Elements in the bus list.

  2. If you select multiple items from the Elements in the bus list, the order in which you select them determines their order in the Selected elements list.

To change the order of output elements, select an element or multiple adjacent elements in the list, then press Up or Down. Port cohesion is maintained when the order of items is changed.

To remove items from the block output, select the items in the list, then press Delete.

Usage in program code

Block Parameter

OutputSignals

Values

a vector of symbols in the form: 'signal1,signal2'

Output as virtual bus - output selected items as a virtual bus
enabled (by default) | disabled

Enable this parameter to output the selected items grouped as a virtual bus through a single output port.

Usage in program code

Block parameter

OutputAsBus

Values

on | off

By default

enabled

Additional options

C code generation: Yes