TC ADS Async Read

The block "TC ADS Async Read" provides read access to TwinCAT ADS varaibles. You can find this block beneath the subfolder "Asynchronous" of the Beckhoff ADS Library inside the "Simulink Library Browser".

TC ADS Async Read 1:

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

Trig

Positive edge triggers the ADS request

Block output ports

Data

The value, read from the ADS variable

Busy

Boolean flag signaling that the block is currently waiting for an ADS response

Err

Boolean flag signaling an actual ADS error

ErrId

The ADS error code

Block parameters

TC ADS Async Read 2:

Block sample time

The Simulink block sample time, which is the ADS request interval (refered 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 output signal, which should be the data type of the transmitted ADS variable

Data width

The width of the Data output signal. Use values greater than 1 to transmit arrays.

ADS timeout

Simulink will wait on a response of the last ADS request until this timespan 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 supported only for the TwinCAT Target.