TC ADS Sync Write
The block "TC ADS Sync Write" provides write access to TwinCAT ADS variables. You can find this block beneath the subfolder "Synchronous" of the Beckhoff ADS Library inside the "Simulink Library Browser".
Block input ports
NetId |
The target AMS NetId |
Port |
The target ADS Port |
IdxGrp |
The target ADS Index Group |
IdxOffs |
The target ADS Index Offset |
Data |
The value to be written to the ADS variable |
Block output ports
Err |
Boolean flag signaling an actual ADS error |
ErrId |
The ADS error code |
Block parameters
Block sample time |
The Simulink block sample time, which is the ADS request interval (referred to the Simulink time but not to the real time) |
Abort simulation on ADS error |
Stop simulation at the first ADS error |
Data type |
The data type of the Data input signal, which should be the data type of the transmitted ADS variable |
Data width |
The width of the Data input signal. Use values greater than 1 to transmit arrays. |
ADS timeout |
Simulink will wait on a response of the last ADS request until this time span is exceeded (in each time step) |
Direct feed through |
Evaluate the input values in the output method of the block. This ensures, that the values at the output ports in the current time step belong to the ADS parameters at the input ports of the same time step. Otherwise the output values belong to the input ADS parameters of the previous time step. Activating this option can significantly slow down the simulation. |
Create signal labels |
Signal labels are created for the signal lines, connected to the output ports |
Code generation
Code generation is not supported. The reason is, that synchronous ADS communication requires to wait for the ADS responses. Due to nondeterministic ADS response times, this could lead to big jitter and cycle time exceedings in real time applications. Use asynchronous ADS blocks for use in real time applications instead.