Category: Software
-
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…
-
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…
-
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…
-
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…
-
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…