FromBase

This block outputs the value of the corresponding variable defined from the Base scope. If the variable is not defined in the Base, the variable default value is used.

    FromBase

Library

SignalImporters

Description

The FromBase block is used to return a value defined in the Base scope of OML. The first parameter of the block is a variable name, passed as a string.

If the variable is defined in the OML base workspace, the value is returned.

Else, if the variable is not defined in the base scope of the interpreter, the block will return a default value (defined by the second parameter of the block).

The variable value can also be created by a ToBAse block in an Activate model.

Parameters

FromBase_0

NameLabelDescriptionData TypeValid Values

varname

Variable name

If the variable is defined in the OML base workspace, the value is returned.

String

C

Variable default value

If the variable is not defined in the base scope of the interpreter, the block will return a default value.

typ

Output datatype

Defines the datatype of the output of the block. Available datatypes are: double, int32, int16, int8, unit32, uint16, uint8.

String

'double'
'complex'
'int32'
'int16'
'int8'
'uint32'
'uint16'
'uint8'
'boolean'
'string'
'inherit'

externalActivation

External activation

Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected.

Number

0
1

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

output

1

Port 2

activation

input

externalActivation

Advanced Properties

NameValueDescription

always active

no

Time Dependency = initially activated

direct-feedthrough

no

zero-crossing

no

mode

no

continuous-time state

no

discrete-time state

no

See Also