Programmable controller is essential in industrial control, so PLC course is a very important professional course. This course requires logical thinking, and we know that PLC has many programming methods, such as instruction list, ladder diagram and sequential function diagram. Because everyone has different thinking modes, the implementation of each project is also different.
Today, we take several color lights as control objects, and use trapezoidal diagram and functional instructions to realize them respectively. We compare the differences between the two methods. Ladder diagram language follows the form of relay control circuit. It simplifies the symbols based on the logic control of relay and contactor. It has the characteristics of image, intuition and practicality. It is easy for electrical technicians to accept. It is the most commonly used way in the three programming languages. But the disadvantage of this method is that when encountering data operation, processing, branch jump, cyclic logic and so on, or when controlling multiple objects step by step, the ladder diagram will occupy more space, and the method is too single. But if functional instructions are introduced into the ladder diagram, the effect will be much better, because the functional instructions are dynamic instructions. An appropriate instruction can control multiple objects. In this paper, multi-color lights are taken as control objects, which are realized by introducing functional instructions into ordinary ladder diagrams respectively. The advantages of introducing functional instructions are studied by comparison. There are eight color lights, connected to the Y0-Y7 of PLC. Now it is required that the color lights start from Y0 to Y7 every other second, then turn on from Y7 to Y0, and cycle.
Observing the figure above, because of the use of multiple timers to design the project, the whole ladder diagram will look very cumbersome, and if the control object of the project increases again, only the number of timers will increase, and the program will be more lengthy.
This method is not applicable to the color lamp project, at this time, functional instructions can be considered. Because the frequency of eight color lights in this project is 1 second, it is possible to consider using special auxiliary relay M8013, which can generate a constant pulse with a period of 1 second. When the color lights start from Y0 to Y7, they can be considered as moving left. Similarly, when Y7 returns to Y0, thermostatic element they can be considered as moving right.
According to the above factors, it can be considered to complete the control of eight color lights by using the left and right shifts of functional instruction bits. In the above ladder diagram, instructions RORP and ROLP are added P after normal instructions to indicate the mode of pulse execution, that is, the condition is that the instructions are executed once from interruption to on-time, rather than successively per scan cycle. By comparing the two ways of realizing the project, it is found that when there are many control objects in the project and the mode of operation has certain rules to follow, functional instructions can be considered. Therefore, it is suggested that different methods should be chosen for mixed programming according to different process control requirements, which will make the project program much simpler and more utilizable. Learner’s understanding.