Can Electrical Experts Understand These 9 PLC Programming Techniques?

1. Bidirectional Movement of the Cart

Implement automatic control of a cart moving back and forth using S7-200. The control process involves pressing the start button, causing the cart to move from left to right (and vice versa). When it reaches the right (or left) limit switch, the cart automatically returns. This back-and-forth movement continues until the stop button is pressed, at which point the cart halts.

Can Electrical Experts Understand These 9 PLC Programming Techniques?

▲ Electrical Wiring Diagram

I/O Allocation Table

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Relay Ladder Program

Can Electrical Experts Understand These 9 PLC Programming Techniques?

PLC Wiring Diagram

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Program Debugging and Result Analysis

Can Electrical Experts Understand These 9 PLC Programming Techniques?

▲ Control Platform Operation Panel

When SB2, i0.0 (clicking i0.0f with the mouse) is activated, Q0.0 is energized, and the cart moves to the right (indicated by the Q0.0 light). When the cart hits the right limit switch SQ2, i0.4 (simulated by clicking i0.4f), it moves left (Q0.0 light goes off, Q0.1 light goes on). When it reaches the left limit switch SQ1, i0.3 (clicking i0.3f), it moves right again (Q0.1 light goes off, Q0.0 light goes on). This back-and-forth motion continues until SB1, i0.2 (clicking i0.2f), is activated, stopping the cart.

Appendix:

Can Electrical Experts Understand These 9 PLC Programming Techniques?

2. Flashing Circuit

When the start button is pressed, the requirement is to have one second on and one second off within two seconds, repeating this pattern, causing the light to flash.

I/O Allocation Table

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Relay Ladder Program

Can Electrical Experts Understand These 9 PLC Programming Techniques?

PLC Wiring Diagram

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Program Debugging and Result Analysis

The prepared program is downloaded to the Siemens S7-200 PLC for debugging. Observe whether the running results meet the experimental requirements. Through the online control panel, when I0.0f (i.e., I0.0 is activated) is pressed, Q0.0 outputs, and the connected load light turns on, while timer T37 starts timing. After one second, T37 operates, its normally closed contact opens, so Q0.0 has no output, and the connected load light goes off. At the same time, timer T38 starts timing, and after one second, the normally closed contact in series with timer T37 opens, resetting T37, and its normally closed contact returns to closed. At this point, Q0.0 outputs again, and the connected load light turns on. Thus, the load light connected to output Q0.0 flashes on for one second and off for one second continuously until I0.1f (i.e., I0.1 is activated) is pressed, stopping the flashing circuit. To change the flashing frequency of the light, simply adjust the timer’s timing.

3. Star-Delta Reduced Voltage Start

Utilize the Siemens S7-200 PLC to implement a star-delta connection for reduced voltage starting.

Star-Delta Reduced Voltage Start Circuit and Control Diagram

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Flow Framework Diagram

Can Electrical Experts Understand These 9 PLC Programming Techniques?

I/O Allocation Table

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Relay Ladder Program

Can Electrical Experts Understand These 9 PLC Programming Techniques?

PLC Wiring Diagram

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Program Debugging and Result Analysis

The prepared program is downloaded to the Siemens S7-200 PLC for debugging. After downloading, we open the online control panel for debugging to see if the running results meet the requirements. First, set the I0.2f on the control panel to indicate that the button is pressed, i.e., I0.2 is activated, indicating that the circuit breaker QF is closed. Press the start button I0.0f (SB2), i.e., I0.0 is activated, and the motor starts in star mode, with outputs Q0.0 and Q0.1, indicating that both lights L1 and L2 are on, while driving the timer. When the timer counts to 10 seconds, it switches to delta starting mode, at which point Q0.1 has no output, Q0.2 has output, meaning Q0.0 and Q0.2 are energized, and the motor runs in delta mode. The lights L1 and L3 on the wiring panel are on. When I0.1f on the online panel is pressed (i.e., I0.1 is activated), the motor stops running, and all output points are off.

4. Color Light Control

Using the PLC’s outputs Q0.0 to Q0.7 to control eight color lights, turning one on every second in a loop. When I0.0 is activated, all lights turn off. When I0.1 is activated, the cycle restarts from Q0.0.

I/O Allocation Table

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Relay Ladder Program

Can Electrical Experts Understand These 9 PLC Programming Techniques?Can Electrical Experts Understand These 9 PLC Programming Techniques?Can Electrical Experts Understand These 9 PLC Programming Techniques?

PLC Wiring Diagram

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Program Debugging and Result Analysis

The prepared program is downloaded to the PLC for debugging. After downloading, we open the online control panel for debugging to see if the running results meet the requirements.

Once the PLC is powered on, SM0.0 remains activated. Therefore, T37 starts timing. After the delay, T38 starts timing. After T38 times out, its normally closed contact opens, causing T37 to stop timing, and T37’s normally open contact returns to open, so T38 also stops timing. At this point, T38’s normally closed contact returns to closed, so T37 starts timing again, while counter C0 begins counting. This process repeats. When the count reaches 1, Q0.0 is activated. When the counter reaches 2, Q0.1 is activated, and so on. When the counter reaches 8, Q0.7 is activated. When the counter reaches 9, the counter C0 resets. When I0.0f (i.e., I0.0) is pressed, the counter and Q0.0~Q0.7 all reset, meaning no lights are on. When I0.1f (i.e., I0.1) is pressed, the counter starts counting again, and the lights turn on one by one starting from Q0.0.

5. Comparison Instruction

Record the goods entering and exiting the warehouse. The warehouse can hold a maximum of 6000 boxes. If there are more than 1000 boxes, light L1 turns on; if there are more than 5000 boxes, light L2 turns on.

I/O Allocation Table

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Relay Ladder Program

Can Electrical Experts Understand These 9 PLC Programming Techniques?

PLC Wiring Diagram

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Program Debugging and Result Analysis

The program is downloaded to the S7-200 PLC for debugging. Before downloading, we first reduce the numbers in the program to better observe the experimental results. We set the light L1 to turn on when the count is 5 and L2 to turn on when the count is 10. This way, we can see the experimental results more quickly.

When I0.0f on the online control panel is pressed, i.e., I0.0 is activated, it indicates that goods are entering. After clicking I0.0f five times, the counter value is 5 (indicating that there are 1000 boxes in the warehouse), so light L1 turns on, meaning Q0.0 outputs. After clicking I0.0f ten times, the counter value is 10 (indicating that there are 5000 boxes in the warehouse), so light L2 also turns on, meaning Q0.1 outputs. When I0.1f is pressed, the counter starts to decrease. Each click decreases the counter value by one. When the counter value is less than 10, it indicates that there are fewer than 5000 boxes in the warehouse, so light L2 turns off (Q0.1 has no output). When the counter value decreases to less than 5, it indicates that there are fewer than 1000 boxes in the warehouse, so light L1 turns off (Q0.0 has no output). When I0.2f is pressed, the counter resets, and both L1 and L2 turn off (i.e., Q0.0 and Q0.1 have no output).

6. Eight Color Light Shift Control

Control the eight color lights connected to Q0.0 to Q0.7 using IO wires to shift in a loop, using T37 to time the shift every 0.5 seconds. Initially, set Q0.0 to Q0.7 to have outputs, allowing Q0.0 and Q0.2 to be energized first. Use I0.1 to control the direction of the color light shift.

I/O Allocation Table

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Relay Ladder Programming

Can Electrical Experts Understand These 9 PLC Programming Techniques?

PLC Wiring Diagram

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Program Debugging and Result Analysis

The program is downloaded to the Siemens S7-200 PLC for debugging. Once powered on, Q0.0 and Q0.2 are energized, meaning they light up. When the I0.0f (indicating I0.0 input) switch is pressed, timer T37 starts timing, shifting the color lights to the right every 0.5 seconds. When I0.1f (indicating I0.1 input) is pressed, the color lights shift to the left in the same manner.

7. Jump Instruction

Utilize jump instructions to control two lights L1 and L2, connected to Q0.0 and Q0.1, with switch I0.0 controlling the two lights’ control switches I0.1 and I0.2. In manual mode, the two lights are controlled separately using their respective switches. In automatic mode, the two lights alternate every second.

I/O Allocation Table

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Relay Ladder Programming

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Program Debugging and Result Analysis

The prepared program is downloaded to the S7-200 PLC for debugging. When I0.0 is OFF, the PLC runs the manual program. Pressing the online control panel’s set buttons I0.1f and I0.2f (indicating I0.1 and I0.2 are closed) turns on lights L1 and L2, with outputs Q0.0 and Q0.1. When the online control panel’s I0.0f is pressed, I0.0 becomes ON, and the program jumps to the automatic program. The two lights alternate every second, first L1 for one second, then L2.

8. Sequential Start Control of Blower and Inducer

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Can Electrical Experts Understand These 9 PLC Programming Techniques?

I/O Allocation Table

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Relay Ladder Programming

Can Electrical Experts Understand These 9 PLC Programming Techniques?

PLC Wiring Diagram

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Can Electrical Experts Understand These 9 PLC Programming Techniques?

▲ Program Monitoring Diagram when PLC is Powered On, blue indicates activation

Program Debugging and Result Analysis

The characteristic of SM0.1 is that it is activated in the first scan cycle and not activated afterward. When I0.0f is pressed (i.e., I0.0 is activated), Q0.0 is energized (i.e., the indicator light Q0.0 is on), starting the inducer, while timer T37 is activated and starts timing. When the timer counts to 50 (i.e., the indicator light Q0.1 is on), the blower starts. At this point, both fans are running. When I0.1f is pressed (i.e., I0.1 is activated), the blower stops running (i.e., the indicator light Q0.1 goes off), while timer T38 is activated and starts timing. After 5 seconds, the inducer stops running (i.e., the indicator light Q0.0 goes off).

9. Liquid Mixing

Implement automatic control of liquid mixing using S7-200. When the start button is pressed, liquid valve A opens, allowing liquid A to flow into the mixer. When the liquid level reaches the middle limit, valve A closes, and liquid valve B opens, allowing liquid B to flow into the mixer. When the liquid level reaches the upper limit, valve B closes, and the motor starts mixing. After one minute, the motor stops, and valve C opens, allowing the mixed liquid to flow out. When the liquid level reaches the lower limit, after 5 seconds, the container is emptied, and valve C closes. Valve A opens again, injecting liquid A. This cycle continues. If the stop button is pressed, the system must wait for one complete cycle to finish before stopping.

Can Electrical Experts Understand These 9 PLC Programming Techniques?

I/O Allocation Table

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Relay Ladder Programming

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Can Electrical Experts Understand These 9 PLC Programming Techniques?

PLC Wiring Diagram

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Program Debugging and Result Analysis

When I0.03f (i.e., I0.3 is closed) is pressed, valve A opens (i.e., Q0.0 is on). When I0.0f (i.e., I0.0 middle limit is closed) is pressed, valve A closes, and valve B opens (i.e., Q0.0 goes off, Q0.1 is on). When I0.1f (i.e., upper limit I0.1 is closed) is pressed, valve B closes, and the motor starts mixing (i.e., Q0.1 goes off, Q0.2 is on). At the same time, timer T37 starts timing for one minute. After one minute, the mixer stops mixing, valve C opens (i.e., Q0.2 goes off, Q0.3 is on). When the liquid level reaches the lower limit, valve C continues to open (i.e., Q0.3 is on), and timer T38 starts timing. After 5 seconds, valve C closes, and valve A opens (i.e., Q0.3 goes off, Q0.0 is on), entering the next cycle. When I0.4f (i.e., stop I0.4 is closed) is pressed, the system does not stop immediately but waits until one cycle is completed before stopping.

Source: Technical Training Compilation

Can Electrical Experts Understand These 9 PLC Programming Techniques?

Can Electrical Experts Understand These 9 PLC Programming Techniques?Click hereCan Electrical Experts Understand These 9 PLC Programming Techniques?Free PLC and Electrical Courses, click to read the original text

Leave a Comment