Introducing plcLib Version 2.0

Some potential application areas of smart devices.
Figure 1. Some potential application areas of smart devices.

The plcLib – live environment consists of a simple JavaScript-based web IDE (Integrated Development Environment) a simulator, plus an associated C++ library. It allows development and testing of simple PLC-style programs in a web-based development environment. The resulting code may be downloaded to a range of low-cost microcontroller-based systems, provided they support the Arduino IDE.

So how is this different to a traditional PLC (Programmable Logic Controller)?

A traditional PLC is typically used to control the production process – i.e. to make products. PLCs are big, heavy, expensive, and are designed to operate in the electrically noisy and physically harsh environment of the factory floor. They are not portable, being often hidden away inside control cabinets and linked to heavy duty power supplies. Inside the cabinet, the PLC may be fixed in place to a DIN rail and connected via a fixed wiring harness to sensors and actuators. Specialist communication protocols allow each PLC to communicate with the wider production environment. Standards such as IEC 61131 are vitally important in such applications, allowing commonality of programming and operation, plus ensuring interoperability between systems produced by different vendors.

In contrast, the plcLib library allows PLC-style functionality to be embedded within the actual device itself, so it becomes part of the product and its functionality. The result is not a PLC, but rather a smart device which has access to the typical range of features of a PLC, including inputs, outputs, latches, time delays, counters, shift registers, pre-defined functions, finite state machines, and of course, simplified parallel programming.

New system development methodologies become possible, with this approach. For example, an alarm application could be specified in terms of its logical operation (both combinational and sequential logic), rather than as a flowchart or structure chart, while an oven might be designed as a finite state machine.

With the different focus comes a new set of challenges, such as the need to connect to a whole new range of devices and communication protocols. Arduino-based systems are renowned for their interfacing abilities and interoperability. The plcLib system therefore has features intended to simplify the integration of 3rd party software libraries. Exploration and testing of these possibilities will be one focus of this blog, moving forward.

A final point is that the plclib.org website and its associated resources is designed to be used for educational and related academic purposes. The associated C++ plcLib library is released under a permissive MIT licence, but does not come with any kind of warranty. Please see the Warranty and Disclaimer page for more details.


Posted

in

by