All Projects → libplctag → Libplctag

libplctag / Libplctag

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

Programming Languages

java
68154 projects - #9 most used programming language
c
50402 projects - #5 most used programming language
go
31211 projects - #10 most used programming language
golang
3204 projects
pascal
1382 projects

Projects that are alternatives of or similar to Libplctag

Icsmaster
ICS/SCADA Security Resource(整合工控安全相关资源)
Stars: ✭ 582 (+85.35%)
Mutual labels:  plc, modbus
Node Ethernet Ip
A Lightweight Ethernet/IP API written to interface with Rockwell ControlLogix/CompactLogix Controllers.
Stars: ✭ 163 (-48.09%)
Mutual labels:  plc, ethernet
Isf
ISF(Industrial Control System Exploitation Framework),a exploitation framework based on Python
Stars: ✭ 690 (+119.75%)
Mutual labels:  plc, modbus
Easymodbustcp.net
Modbus TCP, Modbus UDP and Modbus RTU client/server library for .NET implementations
Stars: ✭ 358 (+14.01%)
Mutual labels:  plc, modbus
Industrial-Security-Auditing-Framework
ISAF aims to be a framework that provides the necessary tools for the correct security audit of industrial environments. This repo is a mirror of https://gitlab.com/d0ubl3g/industrial-security-auditing-framework.
Stars: ✭ 43 (-86.31%)
Mutual labels:  modbus, plc
Hslcommunication
An industrial IoT underlying architecture framework, focusing on the underlying technical communications and cross-platform, cross-language communication functions, to achieve a variety of mainstream PLC data reading and writing, to achieve modbus of various protocols read and write, and so on, to support the rapid construction of industrial upper computer software, configuration software, SCADA software, factory mes system, To help enterprise Industry 4.0 take-off, to achieve intelligent manufacturing, smart factory goals. The main PLC contains Siemens, Mitsubishi, Omron, Panasonic, Modbus, AB-PLC, Redis
Stars: ✭ 816 (+159.87%)
Mutual labels:  plc, modbus
Sharpscada
C# SCADA
Stars: ✭ 2,043 (+550.64%)
Mutual labels:  plc, modbus
EasyModbusTCP.Java
EasyModbusTCP library for Java implementation
Stars: ✭ 76 (-75.8%)
Mutual labels:  modbus, plc
Fuxa
Web-based Process Visualization (SCADA/HMI/Dashboard) software
Stars: ✭ 262 (-16.56%)
Mutual labels:  plc, modbus
Modbus-STM32-HAL-FreeRTOS
Modbus TCP and RTU, Master and Slave for STM32 using Cube HAL and FreeRTOS
Stars: ✭ 272 (-13.38%)
Mutual labels:  modbus, plc
iot-master
物联大师是开源免费的物联网智能网关系统,集成了标准Modbus和主流PLC等多种协议,支持数据采集、公式计算、定时控制、自动控制、异常报警、流量监控、Web组态、远程调试等功能,适用于大部分物联网和工业互联网应用场景。
Stars: ✭ 119 (-62.1%)
Mutual labels:  modbus, plc
node-drivers
Industrial protocol drivers in node.js
Stars: ✭ 20 (-93.63%)
Mutual labels:  modbus, plc
Iotclient
这是一个物联网设备通讯协议实现客户端,将会包括主流PLC通信读取、ModBus协议、Bacnet协议等常用工业通讯协议。本组件终身开源免费,采用最宽松的MIT开源协议,您可以随意修改和商业使用(商业使用请做好评估和测试)。
Stars: ✭ 311 (-0.96%)
Mutual labels:  plc, modbus
Home Assistant EDP Box
Integração das EDP Box com Home Assistant Core
Stars: ✭ 91 (-71.02%)
Mutual labels:  modbus
Cygwinportable
Portable Cygwin
Stars: ✭ 280 (-10.83%)
Mutual labels:  portable
solaredge modbus
SolarEdge Modbus data collection library
Stars: ✭ 49 (-84.39%)
Mutual labels:  modbus
modbus
No description or website provided.
Stars: ✭ 17 (-94.59%)
Mutual labels:  modbus
T1ha
One of the fastest hash functions
Stars: ✭ 302 (-3.82%)
Mutual labels:  portable
Harvesters
🌈 Friendly Image Acquisition Library for Computer Vision People
Stars: ✭ 274 (-12.74%)
Mutual labels:  ethernet
sha-2
SHA-2 algorithm implementations
Stars: ✭ 122 (-61.15%)
Mutual labels:  portable

libplctag - a C library for PLC communication

OS Architecture/CPU Version 64-bit 32-bit
Ubuntu x86, Arm 18.04 Supported Supported
Windows x86, Arm 10 (Server 19) Supported Supported
macOS x86 10.15 Supported Not Supported

libplctag CI

libplctag is an open source C library for Linux, Windows and macOS uses EtherNet/IP or Modbus TCP to read and write tags in PLCs. The library has been in production since early 2012 and is used by multiple organizations for many tasks including controlling radio telescopes, large and precision manufacturing, controlling fitness equipment, food handling and many, many more.

Current Stable Version: 2.3

Old Stable Version: 2.2

WARNING - DISCLAIMER

Note: PLCs control many kinds of equipment and loss of property, production or even life can happen if mistakes in programming or access are made. Always use caution when accessing or programming PLCs!

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

Be careful!

Get It!

Do you know what you want already? Download it from the releases page!

Features

High Level Features

  • EtherNet/IP and Modbus TCP support.
  • Open source licensing under the MPL 2.0 or LGPL 2+.
  • Pure C library for portability across Linux, Windows and macOS as well as 32-bit and 64-bit.
  • Support for x86, ARM and MIPS, and probably others.
  • Very stable API with almost no changes other than feature additions since 2012.
  • Low memory use and very high performance and capacity. Uses protocol-specific features to increase performance.
  • Simple API with minimal use of language-specific data to enable easy wrapping in other languages.
  • Extensive example programs showing use of all library features.
  • Wrappers for higher level languages like C#/.Net, Julia etc.
  • Free!

Detailed Features

PLC Support

  • support for Rockwell/Allen-Bradley ControlLogix(tm) PLCs via CIP-EtherNet/IP (CIP/EIP or EIP).
    • read/write 8, 16, 32, and 64-bit signed and unsigned integers.
    • read/write single bits/booleans.
    • read/write 32-bit and 64-bit IEEE format (little endian) floating point.
    • raw support for user-defined structures (you need to pull out the data piece by piece)
    • read/write arrays of the above.
    • multiple-request support per packet.
    • packet size negotiation with newer firmware (version 20+) and hardware.
    • tag listing, both controller and program tags.
  • support for Rockwell/Allen-Bradley Micro 850 PLCs.
    • Support as for ControlLogix where possible.
  • support for older Rockwell/Allen-Bradley such as PLC-5 PLCs (Ethernet upgraded to support Ethernet/IP), SLC 500 and MicroLogix with Ethernet via CIP.
    • read/write of 16-bit INT.
    • read/write of 32-bit floating point.
    • read/write of arrays of the above (arrays not tested on SLC 500).
  • support for older Rockwell/Allen-Bradley PLCs accessed over a DH+ bridge (i.e. a LGX chassis with a DHRIO module) such as PLC/5, SLC 500 and MicroLogix.
    • read/write of 16-bit INT.
    • read/write of 32-bit floating point.
    • read/write of arrays of the above.
  • extensive example code. Including
    • tag listing.
    • setting up and handling callbacks.
    • logging data from multiple tags.
    • reading and writing tags from the command line.
    • getting and setting individual bits as tags.
  • Support for Omron NX/NJ series PLCs as for Allen-Bradley Micro800.
  • Support for Modbus TCP.

Platform Support

  • CMake build system for better cross-platform support on Windows, Linux and macOS.
    • Native CMake support is present in recent versions of Microsoft Visual Studio.
  • Semantic versioning used and supported with specific library APIs for compatibility and feature checking.
  • C library has no dependencies apart from libc (and pthreads on some platforms).
  • Binary releases built for Ubuntu 18.04, macOS 10.15 and Windows 10. All 64-bit, with 32-bit binary releases for Windows and Ubuntu.
  • RaspberryPi supported. Both Linux and Windows IoT-based (some effort required to configure Visual Studio to build).

Alternate Programming Languages

The C library is designed for easy wrapping. Wrappers for many other languages exist:

Code

How to Get The Code

The code for the core library is at libplctag. Stable code is on the default release branch. If you check out code from GitHub, it will default to the release branch.

If you want pre-built binaries, we have them available on the releases page. Just pick the one you want and download the ZIP file for your system. We have 32 and 64-bit builds for x86 Linux and Windows and 64-bit builds for x86-64 macOS.

Go to the main project at the libplctag organization to see the other wrappers. We are in a state of transition right now as we move more alternate language wrappers into the GitHub organization.

Example Code

Oh, wait, you want code! There are many examples in the examples directory.

A good place to start is simple.c.

This code reads several 32-bit signed integers (DINT), updates them, then writes them back out and rereads them from a tag named TestBigArray in a Logix-class Allen-Bradley PLC.

The README file in the examples directory describes some of the more interesting ones.

API

Most of the functions in the API are for data access. Direct support for single bits, 8-bit, 16-bit, 32-bit and 64-bit words (integer and floating point) are provided by the library.

See the API for more information.

Help Wanted!

We need and welcome help with the following:

  • bug reports! We may not have your hardware so your bugs can help us make sure the library works in cases we cannot find!
  • bug fixes.
  • other protocols like Modbus, SBus etc.
  • other platforms like Android, iOS etc.
  • changes and additions for other PLCs.
  • additional compilers.
  • more language wrappers!
  • patches and updates for existing language wrappers!
  • Testing and more testing!

How to Contribute

We love contributions! Many users have contributed wrappers, extra functionality and bug fixes over the years. The library is much better for all the help that users have provided. We ask that your code contributions to the core library are under the same dual MPL/LGPL license.

Testing is difficult for us as we do not have access to all the different hardware out there. If you can, a great way to contribute is to test prereleases. These are on the prerelease branch! We appreciate all the help we get from our users this way.

The easiest way to contribute to the core library is to raise a PR on GitHub.

Wrappers in other languages are generally split off into separate projects. Those may have different licenses and contribution processes. Please look at the documentation for the wrapper in question.

History

See the wiki history page for more details on how libplctag was created and why we built it.

Contact and Support

There are two ways to ask for help or contact us.

libplctag Forum

If you have general questions or comments about the library, its use, or about one of the wrapper libraries, please join the Google group libplctag!

The forum is open to all, but is by request only to keep the spammers down. The traffic is fairly light with usually a small number of emails per month. It is our primary means for users to ask questions and for discussions to happen. Announcements about releases happen on the forum.

GitHub

If you find bugs or need specific features, please file them on GitHub's issue tracker for the main C library project. Each individual wrapper project has its own issue tracker.

If needed, we will initiate private communication from there.

License

See the license files (LICENSE.MPL or LICENSE.LGPL) for our legal disclaimers of responsibility, fitness or merchantability of this library as well as your rights with regards to use of this library. This code is dual licensed under the Mozilla Public License 2.0 (MPL 2.0) or the GNU Lesser/Library General Public License 2 or later (LGPL 2+).

This dual license applies to the core C library. Additional wrappers for other languages may be under different licenses. Please see those projects for more information.

Attributions and Trademarks

PLC5, SLC 500, MicroLogix, Micro8X0, CompactLogix and ControlLogix are trademarks of Rockwell/Allen Bradley. Windows and Visual Studio are trademarks of Microsoft. Apple owns the trademark on macOS.

Please let us know if we missed some so that we can get all the attributions correct!

End Note

Have fun and let us know if this library is useful to you. Please send test cases if you run into bugs. As PLC hardware is fairly expensive, we may not be able to test out your test scenarios. If possible, please send patches. We do not ask that you transfer copyright over to us, but we do ask that you make any submitted patches under the same licenses we use. We will not take any patches under the GPL license or licenses that are incompatible with the MPL 2.0 license.

We hope you find this library as useful as we do!

  • the libplctag team
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].