Programmable Logic Controllers: Hardware and Programming