The control requirements of the plc control object are various, but most actions can be decomposed into a combination of several basic actions (basic program functions). Therefore, as a plc programmer, proficiency in the programming of multiple, basic, and common actions through daily accumulation is an effective measure to improve programming efficiency and program reliability. The following are typical programs designed for several common basic actions, which can be used by netizens of the electrical automation technology network.
1. Generation of constant "1" and constant "O" signals During PLC programming (especially when programming function modules), it is often necessary to set the state of certain signals to "0" or "1". Therefore, most people who have been engaged in PLC programming for a long time will generally start at the beginning of the program, first program the block that produces constant "0" and constant "1", so that it can be used at any time in the program.
The ladder program that produces constant "0" and constant "1" is shown in Figure 9-3.1.
In Figure 9-3.1 (a), the state of MO.O is equal to the result of the AND operation of the state of signal M0.2 and the "non" signal of M0.2, and MO.O is always "O".
In Figure 9-3.1 (b), the state of MO.1 is equal to the result of the OR operation of the state of signal M0.2 and the "non" signal of M0.2, and MO.1 is always "1".
2. Self-holding signal generation In many control situations, some outputs (or internal relays) need to remain in this state after a certain signal is "activated" until the other signals are "off". This is the relay control system. The so-called "self-holding" (also known as "self-locking" or "memory").
There are two common programming methods for generating a "self-holding" program, namely, the "self-locking" method and the "set" and "reset" instructions, as shown in Figure 9-3.2 (a), Figure 9-3.3 (a) is shown in Figures 9-3.2 (b) and 9-3.3 (b).
“Self-hold†has two control modes: “Disconnect Priority†(also called “Reset Priorityâ€) and “Start Priority†(also called “Set Priorityâ€). The difference is that when the "start", "off" signals (or "set", "reset" signals) are active at the same time, their output states will be different.
The "Disconnect Priority" PLC ladder program is shown in Figure 9-3.2.
Figure 9-3.2 (a) uses the "self-locking" method, and Figure 9-3.2 (b) uses the "set" and "reset" methods.
In Figure 9-3.2, IO.1 is the “start†(“setâ€) signal. When IO.1 is “1†(normally open contact closed), output QO.1 is “lâ€; I0.2 For the "off" ("reset") signal, when I0.2 is "1" (normally closed contact open), the output QO.1 is "0". If IO.1 and I0.2 are both "1" and the QO.1 output is in the "0" state, it is called "disconnect priority" or "reset priority".
The "Launch Priority" PLC ladder program is shown in Figure 9-3.3. Under normal circumstances, it is the same as the working process of Figure 9-3.2. However, if IO.1 and I0.2 are both "1", the QO.1 output is in the "1" state, so it is called "start priority" or "set priority".
3. Edge Detection Signal Generation In many PLC programs, it is necessary to detect rising or falling "edge" signals for certain input and output signals to achieve specific control requirements. There are two typical programs for signal edge detection. The simple implementation is described in Section 9.2 of this chapter (see Figure 9-2.6). In addition, there are common, typical programs shown in Figure 9-3.4.
The advantage of the edge detection procedure shown in Figure 9-3.4 is that while the edge pulse is being generated, the edge detection state "flag" signal MO.1 is also generated internally, and MO.1 is "1" for edge generation.
Edge processing can be directly implemented using PLC programming instructions. Such as the S7-200 instructions "-|P|-", "-|N|-" and so on.
4. The generation of the two-way signal In the PLC control system, it is often necessary to use the repeated use of a button to alternately control the on/off requirements of the actuator, that is, when the output is "0", the output can be changed by the input. 1"; When the output is "1", the output can be turned into "0" by input.
The signal timing required for this control is shown in Figure 9-3.5 (b). In the figure, IO.1 is the input control signal (such as buttons), and QO.I is the actuator (such as indicator light). Since the input signal operating frequency required for such control is twice the output frequency, it is often referred to as "two-way" control.
Figure 9-3.5 (a) is a ladder diagram of the PLC program controlled by "two-way" control. The program can be divided into three parts: the generation of the "edge" signal (Networkl, Network2 in the figure), the generation of the "start"/"off" signal (Network3, Network4 in the figure), and the self-holding program (Network5 in the figure). .
The generation of the "edge" signal, the self-holding programming and the action process are exactly the same as before: the "start" / "off" signal is passed by the edge pulse MO.O of the input signal and the actual state of the current output element QO.1 Obtained after the "and" operation. When the current output QO.1 is "0", the "start" pulse signal M0.2 is generated, and the state of the output QO.1 is set to "1"; when the current output QO.1 is "1", the "disconnection" is generated. "Pulse signal M0.3 sets the output QO.1 state to "0".
Figure 9-3.5 (a) shows the "two-way" control program with clear operation and easy understanding, but it takes up 4 internal relays of MO.O~M0.3, which are used in large quantities on equipment with complicated control requirements. It may cause insufficient internal relays. In this case, the "two-way" control program shown in Figure 9-3.6 (a) can be used.
In Figure 9-3.6 (a), a “two-way†control occupies only one internal relay, and the program occupies a small capacity. The program's operation timing is shown in Figure 9-3.6 (b).
ZTTEK Batteries, For 5G backup base station .Customize the lithium ion battery packs according to the application and product requirements of the customers.
Lithium ion battery integration requires a special set of skill and expertise to optimize the performance and battery life.ZTTEK Batteries , using the most advanced technology delivers the best quality battery packs.
Our batteries are safe to use, better performance, higher shelf life and a very low maintenance cost.
48V100Ah Lithium Ion Battery,Lithium-Ion Battery For Home Backup Electricity,Lithium Ion Battery 48V 100Ah,48V Lithium Iron Phosphate Battery
Jiangsu Zhitai New Energy Technology Co.,Ltd , https://www.zt-tek.com