libplctag - PLC Communication Library

   
libplctag logo libplctag is an open-source C library for reading and writing tags in PLCs using EtherNet/IP and Modbus TCP. Available for Linux, Windows, and macOS, it’s been in production use since 2012 across industries including manufacturing, radio astronomy, fitness equipment, and food handling.

Latest Release

Quick Links:

WARNING - DISCLAIMER

PLCs control equipment where loss of property, production, or life can occur from programming mistakes. Always exercise caution when accessing or programming PLCs!

We make no claims or warranties about the suitability of this code for any purpose.

Key Features

PLC Support

For detailed feature lists, see the full README.

Tier One Platforms

These are OS/compiler combinations that are fully tested with each release:

OS OS Version Compiler Compiler Version Architecture Status
Alpine Linux v3.23.0-62 GCC 15.2.0 x86-64 Release branch CI status
Alpine Linux v3.23.0-62 GCC 15.2.0 Aarch64 Release branch CI status
macOS 14 Apple-Clang 17.0.0 x86-64 Release branch CI status
macOS 15 Apple-Clang 17.0.0 Aarch64 Release branch CI status
Ubuntu Linux 24.04 GCC 13.3.0 x86-64 Release branch CI status
Ubuntu Linux 24.04 GCC-musl 13.3.0 x86-64 Release branch CI status
Ubuntu Linux 24.04 GCC 13.3.0 Aarch64 Release branch CI status
Ubuntu Linux 24.04 GCC 13.3.0 x86 Release branch CI status
Windows 11 (Server 22) MSVC 19.44.35221.0 x86-64 Release branch CI status
Windows 11 (Server 22) MSVC 19.44.35221.0 x86 Release branch CI status
Windows 11 (Server 22) MSVC 19.44.35221.0 Aarch64 Release branch CI status
Windows 11 (Server 22) MinGW-GCC. 14.2.0 x86-64 Release branch CI status

Getting Started

  1. Download pre-built binaries for your platform
  2. Explore example code, starting with simple.c
  3. Read the API documentation on the wiki
  4. Build from source for your specific needs

Language Wrappers

The C core library is designed for easy wrapping in other languages:

Official projects in the libplctag organization:

Included with the C library:

Community wrappers:

Contributing

We welcome contributions including bug reports, fixes, new protocols, platforms, language wrappers, and testing. See how to contribute in the main repository.

Support & Community

License

Dual licensed under Mozilla Public License 2.0 (MPL 2.0) or GNU Lesser General Public License 2+ (LGPL 2+). See the main repository for license details.


For complete documentation, visit the libplctag wiki and main repository.