Is Siemens PLC Programming Difficult? Examples and Tips

Is Siemens PLC Programming Difficult? Examples and Tips

Previously, we learned some basic knowledge and programming components of Siemens PLC. Now let’s discuss the specific application programming methods, using the programming method for a material handling cart control system as an example.

The material handling cart is mainly used for transporting processed workpieces and is a common transport device in production workshops of industrial enterprises. The cart is driven by a three-phase AC asynchronous motor. The direction of movement is mainly achieved by the forward and reverse rotation of the motor. When the control system is operating normally, it is generally set to continuous operation (automatic control). However, during system debugging or equipment maintenance, it is often necessary to set the system to jog control (manual control). Therefore, the control of the material handling cart is essentially the jog and continuous forward and reverse control of the motor.

The material handling cart, driven by a three-phase AC asynchronous motor, can move left and right, as shown in Figure 1.

Is Siemens PLC Programming Difficult? Examples and Tips

Figure 1

1. In jog control, press the jog forward button, and the motor runs forward in a jog manner, moving the cart left; press the jog reverse button, and the motor runs in reverse in a jog manner, moving the cart right.

2. In continuous control, press the forward button, and the motor runs continuously forward, moving the cart continuously left; press the reverse button, and the motor runs continuously in reverse, moving the cart continuously right; pressing the stop button will stop the cart at any time.

3. The material handling cart should have interlock control functions for both hardware and software.

We are required to try to write PLC control programming (ladder diagram) using the programming components and methods we have learned:

(1) Program with contact coil instructions; (2) Program with set and reset instructions; (3) Program with jump and jump label instructions.

1. Design Electrical Schematic

1. Select electrical components and PLC model.

Input signals: 1 jog forward button, 1 jog reverse button, 1 continuous forward button, 1 continuous reverse button, 1 stop button, totaling 5 input signals, which will occupy 5 input terminals. Therefore, the PLC needs at least 5 input points. (Here it is noted that limit switches are not considered due to space constraints).

Output signals: 1 forward contactor, 1 reverse contactor, occupying 2 output terminals of the PLC, so the PLC needs at least 2 output points. According to the Siemens PLC user manual, the CPU221 main unit has 6 input points and 4 output points, which can meet the actual requirement of 5 input points and 2 output points. Since the PLC controls the motor, a relay output type PLC will meet the requirements, so we choose the CPU221 relay output type PLC.

2. Design the electrical schematic.

The electrical schematic is shown in Figure 2.

Is Siemens PLC Programming Difficult? Examples and Tips

2. Control Program Design

1. Programming with Contact Instructions

The control requirements for the material handling cart include both jog and continuous forward and reverse control functions. By using an intermediate relay for state transitions, it is easier to meet the requirements, as shown in Figure 3. Network 1 and Network 3 achieve both jog and continuous forward control, while Network 2 and Network 4 achieve both jog and continuous reverse control.

Is Siemens PLC Programming Difficult? Examples and Tips

2. Programming with Set and Reset Instructions

Programming with set and reset instructions can also achieve continuous control of the motor, as shown in the running program in Figure 4(a).

Is Siemens PLC Programming Difficult? Examples and Tips

Figure 4(a)

Jog control cannot use set and reset instructions; it can only be programmed with contact coil instructions. The motor running program that has both jog and continuous control functions is shown in Figure 4(b).

Is Siemens PLC Programming Difficult? Examples and Tips

3. Programming with Jump and Jump Label Instructions

Previously, we used 5 buttons to implement jog and continuous start-stop control of the material handling cart. In fact, jog and continuous control methods can also be selected using a rotary switch. In this case, the forward, reverse, and stop buttons are still needed, and the electrical schematic changes slightly. Input signals: 1 rotary switch, 1 forward start button, 1 reverse start button, 1 stop button, needing at least 4 input points. The output signals remain the same, with 1 forward and 1 reverse contactor coil, needing at least 2 points. We still choose the CPU221 (6 input points, 4 output points) relay output type.

The electrical schematic can be slightly modified based on Figure 1, using one less button for the input signals. The electrical schematic is not redrawn here, and in the program, I0.3 is assumed to be on for jog and off for continuous. The control program is shown in Figure 5.

Is Siemens PLC Programming Difficult? Examples and Tips

Is Siemens PLC Programming Difficult? Examples and Tips

As mentioned earlier, any actual control program can be written using different methods. What kind of program is suitable depends on whether the program is simple to write, easy to maintain, and reliable in operation, minimizing redundancy. What do you all think?

(Content sourced from the internet, copyright belongs to the original author)

Disclaimer: If there are copyright issues, please contact for deletion!Neither individuals nor institutions bear relevant legal responsibilities.

Is Siemens PLC Programming Difficult? Examples and Tips

Leave a Comment