In my opinion the PLC is just a microcontroller with extra peripherals and serious protection circuits, if you are aware of these peripherals design and how to protect your circuit, beside good knowledge of some interfaces like RS-232, RS-485, CAN, GPIB then you can build your own PLC, if you are good enough in programming then you can a GUI interface to convert a ladder diagram to a C or BASIC code suitable for the microcontroller to create a hex file.
some of the engineering stuff PLC used doesn't need a PLC at all.