I. Reciprocating motion of the trolley
The S7-200 is used to automatically control the reciprocating motion of a small car. The control process is as follows: when the start button is pressed, the car moves from left to right (or right to left). When it reaches the right (left) side and encounters the limit switch on the right (left), the car automatically returns to the starting position. When it encounters the limit switch on the other side, it returns to the starting position again. This reciprocating motion continues until the stop button is pressed, at which point the car stops.
▲Electrical wiring diagram I/O allocation table
Ladder diagram program
PLC wiring diagram
Program debugging and result analysis
▲Control Platform Operation Panel When SB2 (i0.0) is pressed (click i0.0f), Q0.0 is activated, and the trolley moves to the right (indicator Q0.0 lights up). When the trolley encounters the right limit switch SQ2 (i0.4) (click i0.4f to simulate SQ2 being pressed down), the trolley moves to the left (indicator Q0.0 goes out, indicator Q0.1 lights up). When it reaches the left limit switch SQ1 (i0.3) (click i0.3f), the trolley moves to the right again (indicator Q0.1 goes out, indicator Q0.0 lights up). This back-and-forth movement continues until SB1 (i0.2) is pressed (click i0.2f), at which point the trolley stops. Appendix:
2
Flash circuit
When the start button is pressed, the light should flash intermittently for one second and then turn off for another within two seconds, repeating this process. (I/O allocation table)
Ladder diagram program
PLC wiring diagram
Program Debugging and Result Analysis: Download the written program to the Siemens S7-200 PLC for debugging. Observe whether the running results are the same as the experimental requirements. Debug through the online control panel. When I0.0f on the online control panel is pressed (i.e., I0.0 is turned on), Q0.0 has an output, and the load light connected to Q0.0 lights up. At the same time, timer T37 starts counting. After one second, T37 activates, and its normally closed contact opens, so Q0.0 has no output, and the connected load light goes out. At the same time the light goes out, timer T38 starts. After T38 counts for one second, it opens the normally closed contact connected in series with timer T37, so T37 resets, and the normally closed contact of T37 returns to its normally closed state. At this time, Q0.0 has an output again, and the connected load light lights up again. In this way, the load light connected to output Q0.0 flashes continuously at a frequency of one second on and one second off, until I0.1f on the online control panel is pressed (i.e., I0.1 is turned on), at which point the flashing circuit stops working. To change the flashing frequency of the light, simply change the timer's duration.
3
Star-delta reduced voltage start
Implement reduced-voltage starting using a Siemens S7-200 PLC with a star-delta connection. Circuit diagram and control diagram for star-delta reduced-voltage starting.
The flowchart is as follows:
I/O Allocation Table
Ladder diagram program
PLC wiring diagram
Program debugging and result analysis
Download the written program to the Siemens S7-200 PLC for debugging. After downloading, open the online control panel to debug and check if the running results meet the requirements. First, set the i0.2f button on the control panel to press down, i0.2 is on, indicating that the circuit breaker QF is closed. Press the start button i0.0f (SB2), i0.0 is on. At this time, the motor starts in star configuration, and Q0.0 and Q0.1 have outputs. In the experimental wiring diagram, the lights L1 and L2 for these two points are lit, simultaneously driving the time counter. When the timer reaches 10 seconds, it switches to delta start. At this time, Q0.1 has no output, but Q0.2 has an output. Therefore, Q0.0 and Q0.2 have outputs, and the motor runs in delta star configuration. The lights L1 and L3 on the wiring panel are lit. After pressing i0.1f on the online panel (i0.1 is on), the motor stops running. All output points have no output.
4
Colored Light Control
Eight colored lights are controlled using the eight output terminals Q0.0 to Q0.7 of the PLC, causing one light to illuminate every second in a cycle. When I0.0 is activated, all lights turn off. When I0.1 is activated, the cycle restarts from Q0.0. (I/O allocation table)
Ladder diagram program
PLC wiring diagram
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. After the PLC is powered on, SM0.0 remains on. Therefore, T37 performs a delay timer. After the delay, T38 starts timing. When T38 times out, its normally closed contact opens, so T37 stops timing. T37's normally open contact returns to normally open, so T38 also stops timing. At this time, T38's normally closed contact returns to normally closed, so T37 restarts timing, and counter C0 starts counting once. This counting process repeats. When the count is 1, Q0.0 is on. When the counter counts to 2, Q0.1 is on, and so on. When the counter counts to 8, Q0.7 is on. When the counter counts to 9, counter C0 is reset to zero. When I0.0f (i.e., I0.0) on the online control panel is pressed, the counter and Q0.0~Q0.7 are all reset to zero, meaning none of the lights are on. When I0.1f is pressed on the online control panel (i.e., I0.1 is turned on), the counter starts counting again, and the lights start lighting up one after another from Q0.0.
5
Comparison instructions
Record the goods entering and leaving the warehouse. The warehouse can hold a maximum of 6000 boxes of goods. When there are more than 1000 boxes, light L1 illuminates; when there are more than 5000 boxes, light L2 illuminates. I/O allocation table.
Ladder diagram program
Program Debugging and Result Analysis: Download the program to the S7-200 PLC for debugging. Before downloading, we reduce the numbers in the program to make it easier and faster to observe the experimental results. We set the value of L1 to 5 and L2 to 10. This allows us to see the experimental results more quickly. When I0.0f is pressed on the online control panel, I0.0 is activated, indicating that goods have entered. After clicking I0.0f five times, the counter value is 5 (meaning there are 1000 boxes of goods in the warehouse), and L1 should light up, i.e., Q0.0 has an output. After clicking I0.0f ten more times, the counter value is 10 (meaning there are 5000 items in the warehouse), and L2 should also light up, i.e., Q0.1 has an output. Continuing to click I0.0f on the online control panel will continue to increase the counter value. When I0.1f is pressed on the online control panel, the counter starts to decrease. Each click decreases the counter value by one. When the counter value is less than 10, it means there are fewer than 5000 boxes of items in the warehouse. At this time, light L2 turns off (i.e., Q0.1 has no output). Clicking I0.1f continues to decrease the counter value. When it decreases to less than 5 times, it means there are fewer than 1000 items in the warehouse. At this time, light L1 turns off, and Q0.0 has no output. Pressing I0.2f on the online control panel resets the counter to zero. Neither L1 nor L2 lights up (i.e., neither Q0.0 nor Q0.1 has any output).
6
8 colored light shift control
The eight colored lights connected to Q0.0 to Q0.7 are cyclically shifted using I/O wires. A timer (T37) is used to time the shift by one position every 0.5 seconds. During the first scan, initial values are set for Q0.0 to Q0.7, allowing Q0.0 and Q0.2 to output first. I0.1 controls the direction of the colored light shift. (I/O allocation table follows.)
Ladder diagram programming
PLC wiring diagram
Program Debugging and Result Analysis: The program was downloaded to a Siemens S7-200 PLC for debugging. Upon power-up, Q0.0 and Q0.2 showed outputs and lit up. When the I0.0f (indicating I0.0 has an input) switch on the online control panel was pressed, timer T37 started counting, and every 0.5 seconds, the colored light shifted to the right based on Q0.0 and Q0.2. When the I0.1f (indicating I0.1 has an input) switch on the online control panel was pressed, the colored light moved to the left in the same manner.
7
Jump instruction
Two LEDs, L1 and L2, are controlled using jump instructions, connected to Q0.0 and Q0.1 respectively. A toggle switch is used at I0.0, and the control switches for the two LEDs are I0.1 and I0.2. In manual mode, each LED is controlled by its own switch. In automatic mode, the two LEDs alternate lighting every second. (I/O allocation table)
Ladder diagram programming
Program Debugging and Result Analysis: Download the written program to the S7-200 PLC for debugging. When I0.0 is OF, the PLC runs the manual program. Pressing the set buttons I0.1f and I0.2f on the online control panel means (I0.1 and I0.2 are closed), lights L1 and L2 are on, and Q0.0 and Q0.1 have outputs. When we press I0.0f on the online control panel, I0.0 is ON, and the program jumps to automatic program operation. The two lights cycle on every second, with L1 lighting up for one second before L2 lights up. When I0.0f is pressed again on the online control panel, I0.0 is OFF, and the program jumps to manual program operation.
8
Sequential start-up control of blower and induced draft fan
I/O Allocation Table
Ladder diagram programming
PLC wiring diagram
▲ PLC power-on program monitoring diagram, blue indicates on. Program debugging and result analysis: Sm0.1 is characterized by being on in the first scan cycle and not on thereafter. When i0.0f is pressed on the online control panel, i0.0 is on, Q0.0 outputs (i.e., indicator light Q0.0 is on), the induced draft fan starts, and timer T37 is on and starts counting. When the timer counts to 50 (i.e., indicator light Q0.1 is on), the blower starts. At this time, both fans are running. When I0.1f is pressed on the online control panel, I0.1 is on, the blower stops running (i.e., indicator light Q0.1 is off), and timer T38 is on and starts counting. After 5 seconds, the induced draft fan stops running (i.e., indicator light Q0.0 is off).
9
Liquid Mixing
Automatic control of liquid mixing is achieved using an S7-200 system. 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 simultaneously 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 stirring. After stirring 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. Simultaneously, valve A opens, allowing liquid A to be injected. This cycle repeats periodically. If the stop button is pressed, a complete cycle must be completed before stopping.
I/O Allocation Table
Ladder diagram programming
PLC wiring diagram
Program Debugging and Result Analysis: When I0.03f on the online control panel is pressed (I0.3 closed), valve A opens (Q0.0 lights up). When I0.0f on the online control panel is pressed (I0.0 middle limit closed), valve A closes, and valve B opens (Q0.0 goes out, Q0.1 lights up). When I0.1f on the online control panel is pressed (upper limit I0.1 closed), valve B closes, the motor starts stirring (Q0.1 goes out, Q0.2 lights up), and timer T37 starts timing for one minute. After one minute, the mixer stops stirring, and valve C opens (Q0.2 goes out, Q0.3 lights up). When the liquid level reaches the lower limit, valve C continues to open (Q0.3 lights up), and timer T38 starts timing. After 5 seconds, valve C closes, valve A opens (Q0.3 goes out, Q0.0 lights up), and the next cycle begins. Pressing I0.4f (which means stop) on the online control panel will not stop the system immediately; instead, it will stop after one cycle has been completed.