

But, as soon as the need arises for programming parallel operations, it is necessary to change the program paradigm. The successive steps of such a program will be performed literally line by line, simple and logical. When the program is simple and comes down to performing sequential operations, regulators, without parallel events, it is enough to alternate operations with infinite nested loop test conditions and synchronous delays such as delay (). There are no restrictions on the execution time of the cycle, and it can work both once and for an infinite number of times - as planned by the programmer. From the point of view of the PLC programmer, the Arduino is a typical controller with one very fast or, conversely, a very slow loop loop ().


Arduino-compatible PLC CONTROLLINO, Part 1 on the attempt of the hardware implementation of Arduino in prom.

By the way, it would not be superfluous to say that the article led me to write this note. I agree, but talking about such systems is not in my plans, but I want to talk about (quasi, pseudo - choose) PLC single-tasking implementation (without interruptions) based on the Arduino microprocessor platform, in which there is only one main loop. Many may object to me, saying that modern PLCs are multivalued, they are with support for hardware interrupts. Updating the input and output process images takes place only at the boundary of the main loop, and the longer we sit inside one iteration of the loop, the less we will know about the real state of the control object, eventually the watchdog overflow of the loop execution time will work. One of the features of PLC programs is that the main program loop should be executed without significant delays it should not have internal loops with indefinite exit times or synchronous calls for “thoughtful” functions, especially with regard to communication over slow channels. It is designed to help with programming classic PLC tasks. And the library itself, like the programming languages CODESYS, is the embodiment of the IEC 61131-3 standard, i.e. Many of these units are constantly used in PLC programs. Everyone who dealt with this system knows that Standard.lib library is present in any project, which implements basic timers, triggers, counters, and some other functions and functional blocks. It happens to program controllers (PLC) in the environment CODESYS.
