ADS consumer

The ADS Consumer sample retrieves corrected timestamps as described in the ADS API.

Download

Here you can access the source code for this sample.

Start the TwinCAT target system with which the ADS Consumer sample is to communicate. The PLC Consumer sample can be used.
1. Unpack the downloaded ZIP file.
2. Open the included vcxproj file in Visual Studio.
3. Adjust the target AmsNetID. (TcExternalTimeAdsClient.cpp, line 119)
The sample is ready for operation.

Description

The sample code can be found in the CPP file TcExternalTimeAdsClient.cpp

Different UseCases for receiving corrected timestamps are illustrated in the Main() method: