https://www.septentrion-design.com/introduction-plc-hardware/
Introduction to PLC hardware part 1