Posts

  • Solving Combinational Logic Circuits using plcLib

    Solving Combinational Logic Circuits using plcLib

    We previously used a 3-input inclusive OR gate, based on a logical function block, as part of a simple alarm application. Simpler instruction list style coding was used to build basic logical functions including inverters and logic gates with normal or inverted inputs. This article looks in more detail at plclib implementation options related to…

    Read more

  • Block Diagram-based (and Incremental) System Development

    Block Diagram-based (and Incremental) System Development

    Despite being a text-only system, a diagrammatic approach to system design can greatly aid the plcLib software development process. One of the surprising features of PLC-style programming is that block diagrams, logic diagrams and even certain types of electronic circuit diagrams, may easily be translated into equivalent program code – and it comes as an…

    Read more

  • Diving into the plcLib Scan Cycle

    Diving into the plcLib Scan Cycle

    The plcLib library implements a scan cycle which has some similarities – and also some important differences – to the traditional scan cycle of an industrial PLC. The scan cycle is defined as the repeating process of reading inputs, performing calculations and updating outputs. The scan cycle of a PLC takes place in well defined…

    Read more

  • Using the M5Stack CardKB mini keyboard

    Using the M5Stack CardKB mini keyboard

    The M5Stack CardKB is a full specification mini keyboard, with a built-in controller IC. It is supplied with a Grove connector and uses an I2C interface, plus the Wire library, to transfer keypress data to a connected Arduino-compatible microcontroller. Surprisingly, the entire keypad is the size of a credit card. The CardKB module offers a…

    Read more

  • Using Escape Sequences to Extend plcLib

    Using Escape Sequences to Extend plcLib

    The escape sequence ‘//$’ causes the current line to be ignored by the JavaScript interpreter, but the remainder of the line is passed unaltered to the C++ compiler. Suppose for example, you need to include a servo library in your C++ application. This may be achieved by adding the line ‘//$#include <servo.h>’ at the start…

    Read more

  • Working with Positive and Negative Logic

    Working with Positive and Negative Logic

    One of the challenges of electronics interfacing is dealing with the wide variety of electronics hardware that may be connected! Internally, a microcontroller deals with digital values that are either true or false, on or off, or 1 or 0. However, there is no single definitive mapping of internal logic values and external voltage levels.…

    Read more

  • Introducing plcLib Version 2.0

    Introducing plcLib Version 2.0

    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.…

    Read more