Design of PLC switch acquisition method based on group scan

1 Introduction

PLC is a modern industrial control technology developed in the past 40 years. It combines the advantages of flexible computer programming, complete functions, and wide application with the advantages of simple control, convenient use, strong anti-interference ability, and cheap price of the relay system. It has the characteristics of small size, low power consumption, stable performance and so on, so it has been widely used in industrial production process control and is called the three pillars of modern industrial automation (plc, CNC technology, industrial robot) one.

For systems with few input and output points, interface expansion may not be required; when there are more points, input and output expansion is required. The plc products of different companies have restrictions on the total number of system points and the number of expansion modules. When the expansion still cannot meet the needs, the network structure has to be used, which not only increases the complexity of the system, but also increases the system cost.

Aiming at the problem of a large number of switching signal input, taking the fx series plc of Japan Mitsubishi Corporation as an example, this paper designs a plc switching value acquisition method based on group scan input. With the help of the input interface board, multiple switching input signal connections can be realized. Enter a single input point of plc. Using this method, for a control system with a large number of input points, it can save the number of plc input points and improve the efficiency of plc's information collection efficiency.

2 Hardware design

For the digital signals such as switches and buttons that are often used in industrial scenes, the plc input point is usually connected according to the wiring method of FIG. 1, the method uses the com end as the common end of all digital input signals, each switch Or button to access a plc input point.


Figure 1 Common switching signal access methods

In order to solve the problem of a large number of digital input signals, the principle of signal scanning is used to control the copyright of Engineering Network. A plc digital input acquisition method based on group scan input is designed. The hardware structure is shown in Figure 2. In the figure, 16 switch input signals are taken as an example. These 16 switch input signals are divided into 4 groups, which are respectively connected to four interface boards (each interface board can be connected with 4 signals and output through diodes). After passing through the interface board, k1, k5, k9, k13 are all connected to the x1 input terminal of plc, and so on, k2, k6, k10, k14 are all connected to the x2 input terminal of plc, k3, k7, k11, k15 are all connected Into the x3 input of plc, k4, k8, k12, k16 are all connected to the x4 input of plc. The 16 digital input signals only occupy the four inputs of plc.

The four interface boards are gated by the four outputs of plc (drawn with dotted lines). For example, when y1 is valid and y2 to y4 are invalid, the interface board i is gated, and the signals of k1 to k4 are Sent into x1 ~ x4, when y2 is valid but y1, y3, y4 is invalid, the signals of k5 ~ k8 are sent into x1 ~ x4, and the other two signals are sent in the same way. In this structure, the output terminal y replaces com as the common terminal.

In this way, scanning 4 times per cycle, 16 signals can be sent to the input terminal of PLC in 4 times, and the state of x1 ~ x4 can be transferred to other positions in the program after each scan. The 16 input signals occupy only 4 input terminals and 4 output terminals, which saves half the number of plc input and output points. In actual use, it can also be flexibly expanded according to needs to obtain higher efficiency. If each interface board is connected with 8 switch input signals, 4 boards are connected with 32 input signals, occupying 8 input ends of plc, and the output ends are still 4.

When designing, pay attention to the selection of diodes in the interface board. Be sure to choose diodes with high quality and good stability. If the diodes are damaged or broken down, the input signal will not be correctly sent to the plc input or the input disorder . In addition, the number of input signal groups should not be too large. In Figure 2, there are 4 groups. If the interval of each scan is 100ms, the scan period of 4 scans is 400ms. The delay of the input signal may reach 400ms at the maximum. (If there are more than 10 groups), there will be a signal delay and the sensitivity of the system will decrease.


Fig. 2 plc switch quantity input hardware structure based on group scan
Figure 3 Software flow chart

3 Software design

There are two main issues to consider in software design. One is to periodically output a single scan strobe signal, which is used to select the corresponding interface board control engineering network. The second is to transfer the scanned data to other locations in time. In this PLC input design method, in each scanning cycle, one of each group of digital signals is sent to a plc input in turn, so that the state of the digital signals from the previous scan must be scanned before the next scan data Move to another location to save.

Fig. 3 is a software flowchart, and the software program (ladder diagram) based on the above considerations is shown in Fig. 4. Each scanning time interval is 100ms, 16 switch information is collected into plc and sent to m100 ~ m115 respectively, and the meanings of instructions ol and ref are left shift and output refresh respectively.


Figure 4 PLC input software implementation supporting multi-point scan input

4 Conclusion

This paper designs a plc switch quantity acquisition method based on group scan input. Using the signal scanning principle, it can effectively solve the problem of a large number of switch signal input in the industrial field. This method can greatly reduce the number of plc input points and reduce the control system design The cost, the system structure is stable, the scalability, the flexibility is good, has certain use value and promotion significance.

Aluminium Die-casting Roaster

Aluminium Die-Casting Roaster,Aluminum Baking Pan,Cast Aluminum Roaster,Aluminium Roaster

HOMEARTS INDUSTRIAL CO.,LTD , http://www.kitchenworks.cc

Posted on