libplctag/libplctag logo

libplctag/libplctag

Free

This C library provides a portable and simple API for accessing Allen-Bradley and Modbus PLC data over Ethernet.

FreeFree tier
Type
Open Source

About libplctag/libplctag

libplctag is an open source C library for reading and writing tags in Programmable Logic Controllers (PLCs) over Ethernet. It supports both EtherNet/IP (Allen-Bradley) and Modbus TCP protocols, running on Linux, Windows, and macOS. In production since early 2012, the library is used for industrial automation tasks including controlling radio telescopes, precision manufacturing, fitness equipment, and food handling. Key features include a stable and simple API, low memory footprint, high performance, extensive example programs, and language wrappers for C#/.NET, Julia, and others. The library is licensed under MPL 2.0 or LGPL 2+ and is free to use.

Key Features

EtherNet/IP support (Allen-Bradley)
Modbus TCP support
Open source (MPL 2.0 or LGPL 2+)
Cross-platform (Linux, Windows, macOS)
Supports x86, ARM, and MIPS architectures
Stable API with minimal changes since 2012
Low memory usage and high performance
Simple API designed for easy wrapping in other languages
Extensive example programs for all features
Language wrappers for C#/.NET, Julia, and others

Pros & Cons

Pros
  • Free and open source with permissive licensing
  • Cross-platform support (Linux, Windows, macOS)
  • Stable and field-tested since 2012
  • High performance with low memory footprint
  • Simple API with bindings for multiple languages
  • Comprehensive documentation and example code
Cons
  • Only supports EtherNet/IP and Modbus TCP protocols
  • Requires direct network connectivity to PLCs
  • Native usage requires knowledge of C programming

Best For

Controlling radio telescopesLarge and precision manufacturingControlling fitness equipmentFood handling and processingIndustrial automation and PLC tag reading/writing

FAQ

What protocols does libplctag support?
libplctag supports EtherNet/IP (for Allen-Bradley PLCs) and Modbus TCP.
Is libplctag free?
Yes, libplctag is free and open source, licensed under MPL 2.0 or LGPL 2+.
What platforms does libplctag run on?
It runs on Linux, Windows, and macOS, supporting x86, ARM, and MIPS architectures.
Can I use libplctag from other programming languages?
Yes, wrappers are available for C#/.NET, Julia, and other languages, and the simple C API makes it easy to create new bindings.