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.
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.
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).
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.
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.
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. 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 |
Extrapolation mode | None | None: no extrapolation |
[*] 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 |