This article introduces the set and reset functions of Siemens S7-200 PLC . These two bit operation instructions play a significant role in our programming, enabling us to accomplish tasks that cannot be done with conventional normally open and normally closed contact programming. They also make our PLC programs clearer and simpler.
These two bits almost always appear in pairs. If we use a set bit in one part of the program, a reset bit will be used in another. So it's always a balancing act; you wait for me, I wait for you, and I won't grow old until you come. The basic meaning of set and reset is that setting is writing a 1 to a bit (output), and resetting is writing a 0 (no output). Their usage is described below.
Figure 1
Figure 1 shows the start, hold, and stop control circuit and program for a Siemens S7-200 PLC. We know that the program on the right is written using simple normally open and normally closed bit operation instructions, which can achieve the self-locking function. If you don't understand, please refer back to the previous section. However, in addition to the above, this self-locking function can also be achieved using the set and reset operations we discussed today. The program is as follows.
Figure 2
Figure 2 shows the PLC program written using the set/reset method on the left. It's much clearer and simpler than previous programs, isn't it? The right side shows a breakdown of each part of the set/reset operation instruction, which is already quite clear and won't be explained further. If you still don't understand, continue reading to see the execution process of the PLC set/reset program, and you'll understand.
Figure 3
Figure 3 shows the set execution steps of the PLC set/reset program:
1. When the external normally open button is not pressed , I0.0 is not connected, and the Q0.1 set coil has no output.
2. When the external normally open button is pressed , I0.0 is turned on, and the Q0.1 set coil has an output.
3. When the external normally open button is released, I0.0 is disconnected and not connected . Although I0.0 is disconnected and not connected, the Q0.1 set coil still has an output, realizing the self-locking function. It will not stop output until a reset signal is received. This is the characteristic of the set operation instruction.
Simple, right? Next, let's look at the reset procedure.
Figure 4
Figure 4 shows the reset execution steps of the PLC set/reset program:
4. When the external normally closed button is not pressed , I0.5 is not connected, and Q0.1 reset coil has no output.
5. When the external normally closed button is pressed, I0.5 is turned on, and the Q0.1 reset coil has an output. This will reset the position coil Q0.1 , so Q0.1 will no longer have an output.
6. Even if the external normally closed button is released and I0.5 is no longer connected, the reset coil Q0.1 remains fixed in the reset state. Q0.1 then has no output, thus achieving the stop function.
It's very simple. Now let's take a look at Figure 5.
Figure 5
Figure 5 illustrates the use of PLC set and reset operation instructions to operate multiple output bits at once. When the number below the set or reset operation instruction is 3, it means that when the external normally open button is pressed, 3 output points can be set at once and kept there until a reset signal is generated.
The above are the basic usage methods of PLC set and reset operation instructions.