Added PLC Code

This is the first draft of the PLC code.