Data exchange (Tc Interfaces)

Configuration in Simulink

Depending on the Simulink model, there are several groups of internal variables in addition to the input and output variables. ADS access and the process image type can be configured as required. These settings affect how the variables are linked with other process images in the TwinCAT development environment, and how they can exchange data. The following groups can be configured:

Group

Description

Input

Model inputs

Output

Model outputs

Parameter

Model-specific parameters: Parameters of Simulink blocks that can be "set"

BlockIO

Global output signals of Simulink blocks: Internal signals for which a "test point" was set or which were declared as global due to code optimizations of the code generator.

ContState

Continuous state variables

DWork

Time-discrete state variables

On the configuration page TC Interface in the coder settings, there are several possible settings for each of these variable groups. The options available for selection depend on the group, i.e. not all the described options are available in all cases:

Parameter

Options

GROUP access

(checkbox)

TRUE

The module enables access to variables of this group.

FALSE

The module denies access to variables of this group.

ADS access

Only relevant if "GROUP access"=TRUE

No ADS access

No ADS access

ReadOnly_NoSymbols

No ADS write access,

ADS communication is only possible via the Index group and the Index Offset information

ReadWrite_NoSymbols

Full ADS access,

ADS communication is only possible via the Index group and the Index Offset information

ReadOnly_CreateSymbols

No ADS write access,

ADS symbol information is generated

ReadWrite_CreateSymbols

Full ADS access,

ADS symbol information is generated

Process image

Only relevant if "GROUP access"=TRUE

No DataArea

Link to DataArea or I/O: no

Link to DataPointer: no

Standard DataArea

Link to DataArea or I/O: no

Link to DataPointer: yes

Input-Destination DataArea

Link to DataArea or I/O: yes

Link to DataPointer: yes

Output-Source DataArea

Link to DataArea or I/O: yes

Link to DataPointer: yes

Internal DataArea

Link to DataArea or I/O: no

Link to DataPointer: no

Retain DataArea

Enables linking to a "retain handler" (see retain data) for remanent data management.

The above setting options can be realized in the following mask via the corresponding drop-down lists.

Data exchange (Tc Interfaces) 1:

The restore default settings option can be used to undo all changes and reset the default settings. The default settings are shown in the diagram above.