otti / EspAdsLib

Simple Beckhoff ADS communication for ESP
6 stars 2 forks source link
ads arduino beckhoff esp esp32 library twincat

Simple ESP library for Beckhoff ADS

Features

How to install

Download this repository as zip file and import it to the Arduino libraries.
(Sketch -> Include Library -> Add .ZIP Library)

Usage

Writing CoE Values

Set the DestAmsAddr and the port in the code to the AmsAddr of the slave you want to access.

Writing PLC variables

Set the DestAmsAddr in the code to the AmsAddr of the target. This usually ends with .1.1

Set the port to the port of your PLC. The first PLC usually has port 851 on TwinCAT3 and 801 on TwinCAT2. The port is also available as define. (AMSPORT_R0_PLC_TC3)

Limitations

To save some memory, the lib can read and write a maximum ammount auf 64 bytes. This value can be increased by overwriting the #define ADS_MAX_DATA_SIZE in ads.h

Current status/To Do

Debugging