From version 2.x.xxxx.x | Short introduction: TwinCAT ADS ADS data exchange between ADS devices takes place via the ADS router. As shown in the diagram above, data exchange between ADS devices implemented on the same system takes place via the system memory. If two ADS devices, e.g. MATLAB ® and the TwinCAT runtime are on different systems, a route can be created between two ADS routers. When creating the ADS route, the transport type (usually TCP/IP) for communication between the two ADS routers can be defined. Accordingly, an ADS device identifies itself via the AMS NetId of the ADS router and a port number, which then specifies the ADS device on the system.
For example, port 851 is the default port for the first PLC instance in the TwinCAT runtime. ADS services of an ADS device are then specified by two parameters, the index group and the index offset. For example, a PLC variable is accessible for reading or writing under a specific Index Group and Index Offset. Summary AMS NetId: Identifies the ADS router, i.e. the system. ADS Route: Specifies the connection between two ADS routers. Port: Identifies an ADS device. Index Group/Offset: Specifies the ADS system service, e.g. a variable for reading and writing.
In order to make the addressing of variables in a TwinCAT runtime more convenient for the user, TwinCAT creates ADS symbols, which can be searched with the Target Browser, for example. The Target Browser is also integrated in the interface for MATLAB ® and Simulink ® in the TC Symbol Interface, so that ADS symbols can be selected easily and quickly. An ADS symbol for a variable in TwinCAT then contains the information mentioned above: AMS NetId, Port, Index Group and Index Offset and furthermore the Bit Size as well as a symbol name and the data type of the variable. For more information on ADS, please see the following links: AMS NetId and Port:
ADS device identification Index Group and Index Offset: Specification for ADS devices ADS routes Connecting Devices with same AMS NetId: AmsNAT Using MQTT and Message Broker with ADS: ADS-over-MQTT TLS encrypted ADS: Secure ADS Target Browser: Target Browser Record ADS communication: ADS Monitor Basic ADS data communication Basically, ADS has three different ways/modes of communicating data: Synchronous reading or writing The ADS client waits for a response from the ADS server before proceeding with the execution of the code.
Asynchronous reading or writing The ADS client sends a read or write request to the ADS server, but does not wait for a response; instead, it continues to execute other parts of the program (e.g., requests to other variables). TE1410 28 Version: 1.3.1