Well if you wish to develop a system that works just like the general purpose PLC systems utilized in industrial applications, I would first, if you haven't already, get a good understanding of their features and capablities:
The hardware side could be a pic with opto isolated inputs and relay outputs (most simple PLCs at least have that). The programming is something else altogether. You need to 1st understand ladder logic programming very well (the real time language simple PLCs are programed with) and then code the pic to accept a ladder logic format. Basically, in an endless loop, inputs are scanned, ladder program analysed to determine outputs required, and then output relays activated.
You also need to provide a way (on a PC, or in the PLC, with an operator interface) to enter the users ladder logic program.
This is all a serious undertaking, should take you all year, if your starting from scratch