The main parts of a PLC are,
1) Central Processing Unit consisting of a microprocessor, and memory unit. A microprocessor is essentially a logic solver. Memory unit is used to store operating system of PLC, user program and temporary data.
2) Power supply: A switched mode power supply is used which generates the required dc levels to power the internal circuit
3) Programmer/ Monitor: Programmer/monitor is device used to load program into PLC from a hand held terminal or a PC
4) I/O modules: The IO modules are for connecting outside world digital/analog input/output devices to PLC.
5) Analog I/O module: These for connecting analog input signals derived from different sensors and transducers