Use S7-200 to achieve automatic control of the car’s bidirectional movement.
The control process is as follows: when the start button is pressed, the car moves from left to right (and vice versa). When it reaches the right (or left) limit switch, the car automatically returns. It continues this back-and-forth movement until the stop button is pressed, at which point the car stops moving.

1. I/O Allocation Table

2. Ladder Diagram Program

3. PLC Wiring Diagram

4. Program Debugging and Result Analysis
When SB2, i0.0 (clicking i0.0f) is activated, Q0.0 is activated, and the car moves to the right (indicated by the lamp Q0.0 lighting up).
When the car reaches the right limit switch SQ2, i0.4 (simulating SQ2 being pressed by clicking i0.4f), it activates, causing the car to move left (lamp Q0.0 turns off, lamp Q0.1 lights up). When it reaches the left limit switch SQ1, i0.3 (clicking i0.3f), it activates again, causing the car to move right (lamp Q0.1 turns off, lamp Q0.0 lights up).
This back-and-forth movement continues until the stop button SB1, i0.2 (clicking i0.2f), is activated, stopping the car.
Appendix:

When the start button is pressed, the requirement is that within two seconds, the light should be on for one second and off for one second, repeating this cycle, causing the light to flash.
1. I/O Allocation Table

2. Ladder Diagram Program

3. PLC Wiring Diagram

4. Program Debugging and Result Analysis
Download the written program to the Siemens S7-200 PLC for debugging, and observe whether the running results meet the experimental requirements. Use the online control panel for debugging. When the I0.0f (i.e., I0.0 is activated) is pressed, Q0.0 has output, and the light connected to Q0.0 lights up, while timer T37 starts timing. After one second, due to T37’s action, its normally closed contact opens, so Q0.0 has no output, and the connected light goes out. At the same time, timer T38 starts timing. After one second, the normally closed contact in series with T37 opens, resetting T37, and T37’s normally closed contact returns to its normally closed state. At this point, Q0.0 has output again, and the connected light lights up.
Thus, the load connected to output Q0.0 flashes on for one second and off for one second continuously until the I0.1f (i.e., I0.1 is activated) on the online control panel is pressed, at which point the flashing circuit stops working.
If you want to change the flashing frequency of the light, just change the timer’s time to achieve the desired effect.
Use the Siemens S7-200 PLC to implement the star-delta connection for soft starting.
1. PLC Wiring Diagram

2. Program Debugging and Result Analysis
Download the written program to the Siemens S7-200 PLC for debugging. After downloading, 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, which means the circuit breaker QF is closed. Press the start button i0.0f (SB2), i.e., i0.0 is activated, causing the motor to start in star mode. Q0.0 and Q0.1 have output, indicating that the two lights L1 and L2 are on, while the timer starts counting. When the timer reaches 10 seconds, it switches to delta starting mode. At this point, Q0.1 has no output, and Q0.2 has output, meaning Q0.0 and Q0.2 are active, and the motor runs in delta mode. The lights L1 and L3 on the control panel are lit. Pressing i0.1f on the online panel (i.e., i0.1 is activated) stops the motor. All output points have no output.
Use the outputs Q0.0 to Q0.7 of the PLC to control eight color lights, turning one on every second in a loop. When I0.0 is activated, all lights go out. When I0.1 is activated, the cycle restarts from Q0.0.
1. I/O Allocation Table

2. Ladder Diagram Program



3. PLC Wiring Diagram

4. Program Debugging and Result Analysis
Download the written program to the PLC for debugging. After downloading, open the online control panel to debug and check if the running results meet the requirements.
Once the PLC is powered on, SM0.0 remains activated. Thus, T37 begins timing. After the delay, T38 is activated. When T38 times out, its normally closed contact opens, causing T37 to stop timing. T37’s normally open contact returns to its state, causing T38 to also stop timing. At this point, T38’s normally closed contact returns to its state, allowing T37 to start timing again, and counter C0 begins counting once. This process repeats. When the counter reaches 1, Q0.0 activates. When the counter reaches 2, Q0.1 activates, and so on.
This continues until the counter reaches 8, activating Q0.7. When the counter reaches 9, it resets to zero. When the online control panel’s I0.0f (i.e., I0.0) is activated, the counter and Q0.0~Q0.7 reset to zero, and no lights are on. When I0.1f (i.e., I0.1 is activated) is pressed, the counter starts counting again, and the lights light up one by one starting from Q0.0.
Record the goods entering and exiting the warehouse. The warehouse can hold a maximum of 6000 boxes. If the goods exceed 1000 boxes, the light L1 turns on; if it exceeds 5000 boxes, the light L2 turns on.
1. I/O Allocation Table

2. Ladder Diagram Program

3. Program Debugging and Result Analysis
Download the program to the S7-200 PLC for debugging. Before downloading, we first reduce the values in the program so that we can better and faster observe the experimental results.
We set the light L1 to turn on at 5. We set the light L2 to turn on at 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 have entered. After clicking I0.0f five times, the counter’s value becomes 5 (indicating that there are 1000 boxes in the warehouse), and thus light L1 turns on (i.e., Q0.0 has output).
Continuing to click I0.0f ten times results in the counter reaching 10 (indicating that there are 5000 boxes in the warehouse), and at this point, light L2 also turns on (i.e., Q0.1 has output). Continuing to click I0.0f increases the counter’s value.
When I0.1f on the online control panel is pressed, the counter starts to decrease. Clicking once decreases the counter’s value by one. When the counter’s value is less than 10, it indicates that there are less than 5000 boxes in the warehouse, and thus light L2 goes out (i.e., Q0.1 has no output). Continuing to click I0.1f decreases the counter’s value, and when it drops below 5, light L1 goes out (i.e., Q0.0 has no output). When I0.2f on the online control panel is pressed, the counter resets to zero, and both L1 and L2 go out (i.e., Q0.0 and Q0.1 have no output).
Use I/O wires to control eight color lights connected to Q0.0 to Q0.7 to shift in a loop. Use T37 for timing, shifting every 0.5 seconds. Initially, set Q0.0 to Q0.7 to have output, allowing Q0.0 and Q0.2 to be on first. Use I0.1 to control the direction of the color light shift.
1. I/O Allocation Table

2. Ladder Diagram Program

3. PLC Wiring Diagram

4. Program Debugging and Result Analysis
Download the program to the Siemens S7-200 PLC for debugging. After powering on the PLC, Q0.0 and Q0.2 will have output, meaning they are lit.
When the I0.0f (indicating I0.0 input) switch on the online panel is pressed, timer T37 starts timing. After 0.5 seconds, the color lights shift right by one position. When I0.1f (indicating I0.1 input) is pressed, the color lights shift left in the same manner.
Use the jump instruction to control two lights L1 and L2, connected to Q0.0 and Q0.1, with the switch position I0.0 controlling both lights and I0.1 and I0.2 controlling the switches. In manual mode, use the two control switches to control the lights. In automatic mode, the two lights alternate every second.
1. I/O Allocation Table

2. Ladder Diagram Program

3. Program Debugging and Result Analysis
Download the written program 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 (i.e., I0.1 and I0.2 are closed) turns on lights L1 and L2, with Q0.0 and Q0.1 having output.
When the online control panel’s I0.0f is pressed, I0.0 turns ON, and the program jumps to automatic mode. The two lights alternate every second, first L1 for one second, then L2. When I0.0 is pressed again, I0.0 turns OFF, and the program jumps back to manual mode.

2. Ladder Diagram Program

3. PLC Wiring Diagram


▲ Monitoring diagram of the program when the PLC is powered on, with blue indicating activation ▲
4. Program Debugging and Result Analysis
SM0.1’s characteristic is that it activates during the first scanning cycle and then does not activate again. When the online control panel’s I0.0f is pressed (i.e., I0.0 is activated), Q0.0 activates (i.e., lamp Q0.0 lights up), starting the inducer while timer T37 activates and starts timing. When the timer counts to 50 (i.e., lamp Q0.1 lights up), the blower starts, and both fans operate.
When the online control panel’s I0.1f is pressed (i.e., I0.1 is activated), the blower stops (i.e., lamp Q0.1 goes out), and timer T38 activates and starts timing. After 5 seconds, the inducer stops (i.e., lamp Q0.0 goes out).
Use S7-200 to achieve automatic control of liquid mixing. When the start button is pressed, liquid valve A opens, allowing liquid A to flow into the mixer. When the liquid level reaches the mid-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 mixing for one minute, the motor stops, and valve C opens, allowing the mixed liquid to flow out. When the liquid level reaches the lower limit, the container is emptied after 5 seconds, and valve C closes. Valve A opens, injecting liquid A. This cycle continues. If the stop button is pressed, the system must wait until one complete cycle is finished before stopping.

1. I/O Allocation Table


2. Ladder Diagram Program


3. PLC Wiring Diagram

4. Program Debugging and Result Analysis
When I0.03f (i.e., I0.3 is closed) is pressed on the online control panel, valve A opens (i.e., Q0.0 lights up). When I0.0f (i.e., I0.0 mid-limit is closed) is pressed, valve A closes, and valve B opens (i.e., Q0.0 goes out, Q0.1 lights up).
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 out, Q0.2 lights up), while timer T37 starts timing for one minute. After one minute, the mixer stops, valve C opens (i.e., Q0.2 goes out, Q0.3 lights up). When the liquid level reaches the lower limit, valve C continues to open (i.e., Q0.3 lights up), and timer T38 starts timing.
After 5 seconds, valve C closes, and valve A opens (i.e., Q0.3 goes out, Q0.0 lights up), 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 the end of one complete cycle.
Disclaimer: This article is reprinted from the internet, and the copyright belongs to the original author. If there are any copyright issues, please contact us promptly for deletion. Thank you!