Tc Symbol Interface

Tc Symbol Interface is the central block for communication between Simulink® and TwinCAT via ADS. The configuration of the ADS symbols to be read and written is done via the integrated Target Browser.

Tc Symbol Interface 1:

TwinCAT Symbol Interface Configurator

Without configuration, no input or output ports exist on the block. These are first configured by the user via the TwinCAT Symbol Interface Configurator. The configurator opens by double-clicking on the block.

Tc Symbol Interface 2:

In the middle part the TwinCAT Target Browser is shown. For its use, see Scope View (Extension ADS) documentation.

With the TwinCAT Target Browser you can browse into the target systems connected with routes and search the ADS symbols.

To select symbols for reading or for writing (multi-select is possible), you just have to drag-and-drop the symbols to the right for reading (blue box) and to the left for writing (purple box).

Tc Symbol Interface 3:

A node will then appear in the left and right areas for each ADS symbol. By double-clicking on a node, you can specify the read or write properties of the node.

You can also select multiple nodes (Ctrl+Click) and use the button Edit to edit all selected nodes simultaneously with regard to the read or write properties.

Tc Symbol Interface 4:

Likewise, you can export the configuration here and import it again.

Double-clicking on a node or selecting the button Edit opens a new window.

Tc Symbol Interface 5:

The symbol information is entered in the upper area. These are not relevant for the type of data transport. With Multi-Select, this area is grayed out because it can only be assigned to one symbol and not several at the same time. In the lower area you can specify the property of reading and writing.

Symbols Reading

Parameter

Default value

Description

Sample Time (100 ns)

TwinCAT task cycle time

Period value with which the ADS symbol is to be read.

Read Via Notification

Yes

Yes: ADS Notification is logged in.

No: read by polling with SampleTime

Transmode

Cyclic

Only for notifications.
Cyclic: value is transferred with SampleTime to Simulink®.

OnChange: value is transferred to Simulink® when the value changes.

Timeout (ms)

1000

ADS time-out period

DelayTime (100 ns)

10*SampleTime

Buffer size on TwinCAT XAR side. Default are 10 values of the ADS symbol.

BufferSize

50

Buffer size in read samples on Simulink® page.

Interpolation mode

Nearest

None: no interpolation
Previous: uses the previous value.
Next: uses the next known value.
Nearest: uses the previous or next value, whichever is closer [*].

Extrapolation mode

None

None: no extrapolation
Constant: new value is set to the last known value.

[*] If the Simulink® SampleTime does not match the TwinCAT task cycle time of an ADS symbol, values for a specific time stamp may not be available. Further it can happen that during simulation with several SampleTimes a value with time stamp between existing values of Simulink® is expected. Accordingly, if there is enough data in the buffer (see BufferSize), you can interpolate or not interpolate between two values.

Symbols Writing

Parameter

Default value

Description

Sample Time (100 ns)

TwinCAT task cycle time

Period value with which the ADS symbol is to be written.

Timeout (ms)

1000

ADS time-out period

BufferSize

50

Buffer size in samples on Simulink® page.

Interpolation mode

Nearest

see above

Extrapolation mode

None

see above