To learn PLC programming you must have a background in creating ladder diagram of control engine. Because the basic level of PLC ladder is equal the control engine ladder diagram.
When learning PLC programming, the difficult concept is to understand the difference between the physical component and the component programs. We will connect physical components (switches, lights, Relays, etc) to the terminal outside the PLC. Then, all components connected to the PLC will be represented on the program as program components.
PLC programming can be seen from the picture below, circuit diagrams AND ladder consists of two push button switch connected in series with the lamp.
When we want to change the circuit in order to run the PLC, then the first time we need to remove all components and wiring back to the PLC system as shown below.
From the picture above we can see the obvious differences is both switches not connected in series but they connected into a separate component on the PLC input.
In other words we can make the circuit wire into the desired software. Two 120 V source in fact is the same, but the images are shown separately to be easy to see how the inputs and outputs are connected to the PLC and how each part is getting power.
After knowing the external components connected to the PLC, we can write the program. Switch1 connected to IN1 is called IN1 on the program, and Switch 2 connected to IN2 is called IN2 on the program. For Lamp1 that connected to OUT1 is called OUT1 on the program. Above program is to control the Lamp1 as shown in the following figure: