Installation

The now preferred way to install the TwinCAT ADS .NET Communication API is to use the NuGet.org package manager. Alternatively, there is still the option to Add references manually via the "Add References..." Dialog in Visual Studio.

Beckhoff.TwinCAT.Ads package from Nuget.org repository.

This is the main package implementing the ADS client functionality. This is needed to establish ADS connections to local and remote devices.

Please follow the install instructions on the Nuget.org site.

Beckhoff.TwinCAT.Ads Nuget Package

Beckhoff.TwinCAT.Ads.Reactive package from Nuget.org repository.

This package installs Reactive extensions on top of the Beckhoff.TwinCAT.Ads Nuget Package and installs additional extensions to map ADSNotifications to observable events.

Please follow the install instructions on the Nuget.org site.

Beckhoff.TwinCAT.Ads.Reactive Nuget Package

Manually referencing the TwinCAT Ads .Net Communication Library (non-preferred, obsolete)

Add TwinCAT.Ads.dll manually in Visual Studio

  1. Create New project: Start Microsoft Visual Studio and create new project (e.g. Windows Forms Application).
  2. Adding reference: In order to select the TwinCAT.Ads class library you must choose the command Add Reference... under the Project menu . You will find the .Net Libraries per default in following TwinCAT folder:
  3. C:\TwinCAT\AdsApi\.NET\
  4. This opens the Add Reference dialog. In this dialog you have to press the Browse button and select the file TwinCAT.Ads.dll for your used .NET Framework runtime. In the Solution Explorer you can check, if the component has been added to the list of references.
  5. All accessible types (classes,structures ...) belong to the namespace TwinCAT.Ads. Therefore one has to insert the following line at the beginning of the source:C#
  6. using System.IO; using TwinCAT.Ads;
  7. This enables access to the types defined in TwinCAT.Ads without including the name of the namespace. The class TcAdsClient is the core of the TwinCAT.Ads class library and enables the user to communicate with an ads device. To begin with an instance of the class must be created. Then a connection to the ADS device is established by means of the Connect method.