Skip to content
forked from Beckhoff/ADS

Beckhoff protocol to communicate with TwinCAT devices.

License

Notifications You must be signed in to change notification settings

rockonedege/ADS

 
 

Repository files navigation

Notes specific to this fork
===========================
This fork adds support for CMake under Windows/Visual Studio 2015, among other opinionated source code re-factoring.

Assuming CMake is installed and added to the Path environment variable, after cloning or downloading the source code,
- open a "Developer Command Prompt for VS2015", and 
- navigate to root of source tree,
- run '.\run.bat'.

3 solutions will now be generated under ~temp\ ready for compilation, 1 NMake project, 2 VS2015 solutions(x32 and x64).

- run 'nmake' to compile the NMake project. 





This library is intended to provide easy use as ADS client applications running on non-windows systems (e.g. Linux, Mac OS...) to communicate with TwinCAT devices via TCP/IP.

To build this library a recent compiler with C++11 support is required. 

Currently (2015-07-24) tested with:
===================================
Ubuntu 14.04 LTS x86_64 | gcc 4.9.2
OSX 10.10               | clang 3.5
Win7 64-bit             | gcc 4.9.3 + cygwin64
Win7 64-bit             | gcc 4.9.3 + cygwin32
Win7 64-bit             | MS Visual C++ 2013 (untended)


compile & usage
===============
# clone the repository
git clone https://github.com/Beckhoff/ADS.git

# change into root of the cloned repository
cd ADS

# build the library
make

# copy compiled lib and headers to your client application
make install

# by default this will copy library and headers into the example/ subdirectory
# to change the target location adjust $(INSTALL_DIR) in the Makefile


Prepare your target to run the example
======================================
- Download your PLC project to your target e.g. "PLC-TestProject" of our GitHub repository.
- Authorise your ADS client for the TwinCAT target by adding an AMS route.

Sample AMS route:
  Name:           MyAdsClient     
  AMS Net Id:     192.168.0.1.1.1 # Derived from the IP address of your ADS client
  Address:        192.168.0.1     # Use the IP which is connected to the TwinCAT target
  Transport Type: TCP/IP
  
Routes can be configured by several possibilities
TwinCAT Engineering:  Go to the tree item SYSTEM/Routes and add a static route.
TwinCAT Systray:      Open the context menue by right click the TwinCAT systray icon. (not available on Windows CE devices) 
  TC2*: Go to Properties/AMS Router/Remote Computers
  TC3:  Go to  Router/Edit routes.
TcAmsRemoteMgr: Windows CE devices can be configured locally (TC2*/TC3). Tool location: /Hard Disk/System/TcAmsRemoteMgr.exe
IPC Diagnose: Beckhoff IPC’s provide a web interface for diagnose and configuration. Further information: http://infosys.beckhoff.de/content/1033/devicemanager/index.html?id=286

*Requires a TwinCAT restart.

- set "remoteNetId" and "remoteIpV4" in "example/example.cpp" according to your own setup

# make sure you are in the correct directory
cd example/

# build
make

# and run the example
make test

---
AMS/ADS Specification: http://infosys.beckhoff.de/content/1031/tc3_adscommon/html/tcadsamsspec_amstcppackage.htm

About

Beckhoff protocol to communicate with TwinCAT devices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.2%
  • C 4.7%
  • CMake 1.3%
  • Other 0.8%