https://automationforum.co/counters-in-plc-programming/
COUNTERS in PLC Programming