This is a simple library reproducing IEC-61131 standard function blocks to use with arduino micro-processor or any compatible processor (Atmel AVR, Espressif, STM32, etc.).
Version | Comment | Release Date |
---|---|---|
0.1 | Initial commit | Jan 2017 |
0.2 | blink class added | May 2017 |
The library is in an early stage of development and contains the following classes:
- trigger: trigger objects can be used for edge detection (rising and/or falling edges)
- ton: allows to instantiate objects similar to IEC-61131 TON function block
- tof: allows to instantiate objects similar to IEC-61131 TOF function block
- ctu: counter up objects can be created using this class
- ctd: counter down objects can be created using this class
- blink: blink objects are used to create square signals with configurable time high and time low options (this is a non standard IEC function)
Check the attached examples folder for more details
//declaring a timer off object
tof timer(sensor, 1200000);
//assign timer off output to digital out
digitalWrite(relay, (uint8_t)timer.out());