Newcomer to learn the introduction of PLC programming - Database & Sql Blog Articles

Single chip microcomputer STM32L151CCU6
SMD aluminum electrolytic capacitor
Photocoupler

The monks originally graduated from the chemical industry. Later, due to work needs and personal interests, they switched to instrumentation and machinery. Ten years ago, when I first started using plc, it was also a fog. Taking advantage of his familiarity with hardware and engineering knowledge, and a succinct understanding of the configuration software, he took the task with a hard scalp. At that time, it was too late to receive training, and the relevant information was extremely scarce. The only reference material was an English S7-200 manual, and some examples of Western-speaking found on the Siemens website. The system was finally built within three months. , software preparation work. During the period of detours and failures, it was common practice, and I often made my tea and rice, and I also burned a PLC because of accidental operation. So I really understand the feelings of the netizens who are just getting started.

Here, I would like to roughly summarize my own learning path for the reference of netizens.

1. Programming requires strong perseverance and patience

People have their own strengths. Some people see programming as a lengthy and boring job; some people see programming as a fun intellectual game. If you are the former, I strongly recommend that you stay away from the job. After all, programming work is a challenge to people's perseverance and patience. In my lab, many students will be surprised to see that I am facing the focus of this pile of symbols. In fact, this is of interest. Interest has given me enough perseverance and patience. After countless failures, when I saw that the symbols were arranged neatly according to my thoughts, and the PLC was running in an orderly manner according to my requirements, the interest was greatly satisfied, just like opening a game gate. So, I told these students: You are seeing a bunch of boring and weird symbols, I see a group of passionate dancers, and I am their director.

2, programming needs confidence to practice

I once taught a student to learn AutoCAD, and my only requirement for her is practice. I told her: What do you do, you can't make a picture redraw; the worst result is a system crash, it doesn't matter, the system redo, come back; as long as the computer is not smashed, how can it do. Two years later, I saw the CAD drawings she made, and I also sighed.

By the same token, only by continuously running these instructions on the PLC and observing the results of the operation can the PLC instructions be clarified. Many beginners are confused about PLC's face, often because of fear and damage to equipment. And there is no reason for these fears. It is very important to read the manual carefully, but reading alone is not an engineer. What's more, the contents of the manual are not exhaustive. When I came into contact with unfamiliar instructions, I like to program a small program to let the PLC run. Then modify the conditions one by one, observe the results of the operation (MicroWin provides users with very good monitoring methods), and then re-understand the description of the manual, so that you can understand the role and use of these instructions very intuitively. Don't worry about any problems with the program you write, it will affect the normal operation of the PLC. There is no problem with the program, only the PLC can be found to run. Finding problems and solving problems is an improvement in one's ability. Regardless of the hardware operation, as far as the software is concerned, I have never encountered any damage to the PLC due to software problems. There is no need to worry about the possible consequences of the wrong connection of the relay circuit. Therefore, bold practice is the only way to plc programming.

Of course, bold practice is not a barbaric operation, but must follow the necessary norms. Another thing to note is that you should never mount the load until the program is verified without reliability, so as to avoid unnecessary losses. The digital output has an LED display; analog processing can be solved by some hardware or software simulation.

3, programming requires meticulous logical thinking

Programming itself is a logical thinking process. In high-level languages, the most used are conditional statements such as if then else and select. This is the causal relationship in logic. The PLC program is composed of these causal relationships: whether the condition is established, and then decides to execute the corresponding instruction. The original PLC was used to replace the relay logic circuit, so it inherits the description of the relay circuit with the contact as the trigger condition. In the PLC, the metal contacts of the relay are replaced by virtual contacts, and the logic relationship expressed by the relay circuit is completely preserved. Even if a numerical process that is difficult for the relay circuit is introduced, the PLC is fundamentally performing a causal relationship. Therefore, the logical relationship between the various events of the object is a preparation that must be carefully prepared before programming. After I received a task, the first thing was to sort out a logical relationship diagram, repeatedly discuss with the user, obtain the user's approval, and then actually enter the program writing process.

4. Indispensable knowledge

The PLC program is a specific process directly acting on the object, so the understanding of the specific process of the object is very important. In the process of communication with the user, I will use the knowledge of Unit Operation that I have mastered to analyze the user's process, assist the user to organize the various logical relationships in the process control, and even include the configuration of various instruments and hardware. This is due to the profession I have studied. Of course, you can't ask all engineers who work on PLC programs to have my experience. But there are two kinds of knowledge that are indispensable: First, the hardware knowledge of process instrumentation, including sensors, transmitters (secondary instruments) and PLC itself, which is the basis for building control systems; second, process control theory, including The principles and applications of various control models, the most important of which are the two-position adjustment and PID adjustment models. PID regulation is currently the most widely used process control method, and it is highly variable. The best way to learn PID is to read. Almost all books that explain process control have content about PIDs. Reading more basic related books is very useful for understanding PID. I found that many netizens lacked this knowledge when they entered the PLC field. This is not terrible; the terrible thing is that the parties cannot calm down to make up for the shortcomings of knowledge. We should not blame the school for not teaching the content, but to pay attention to how to learn this knowledge. Many of the problems encountered in the work are not mentioned in the school. This cannot be the reason for our refusal to work. We should respond to these issues with a positive attitude. My experience is that the knowledge that is learned to solve problems at work is easier to remember than the things that go to school.

5, develop good programming habits

Everyone has different habits and characteristics, and can't be consistent. But some good habits should still be followed by most people. First, rationalize the logical relationship, timing relationship, and compile the program block diagram; second, reasonably allocate the main program, subroutine and interrupt program; third, allocate the register reasonably and compile the register symbol table.

PLC programming is closer to single-chip microcomputer, or PLC is a modular single-chip microcomputer. Therefore, many operations of the PLC are directly directed to the register. If unreasonable register address overlap occurs in the program, unpredictable consequences will occur. Compiling the register symbol table not only avoids the above problems (MicroWin has a problem prompt), but also makes the program more readable. This is similar to the variables defined in VB.

VB programming is concerned with events, not emphasizing the concept of main programs and subroutines, because the work of the VB main program is done by the operating system of the PC. PLC is not. The PLC program is mainly based on the main program, and the CPU continuously executes the main program in a loop, and the subroutine or the interrupt program is called only when the trigger condition is established. That is, the tasks performed by the subroutine and the interrupt program are not required at all times. If you put these tasks in the main program, you will increase the workload of the main program and reduce the efficiency of the program. This is consistent with the programming idea of ​​the microcontroller. The use of subroutines can make the logic of the entire program clearer. And subroutines can be written, debugged, and finally "installed" to the main program. This way you can solve the problem one by one.

PLC programming, whether LAD or STL, is not as intuitive and interesting as VB, and not as good as CAD. But it is much more visible than the assembly language of the microcontroller. For beginners, the programming of LAD (Ladder) is relatively straightforward and easier to use.

Finally, PLC provides a wealth of instructions and modules, which is much more convenient than single-chip microcomputers. But beginners should try to use simple instructions to achieve the goal. Although it looks a bit earthy, it is a good way to get started, and it will help you understand the more complicated instructions. After having some experience, you should consider the application of complex instructions and the optimization of the program.

Stylus Pen For IPad

Product catagories of stylus pen for ipad, which is just for iPad Versions 2018 & 2019 and above.

It can work on following:

iPad 6th 2018: A1893/A1954
iPad 7th 2019: A2197/A2198/A2200
iPad 8th 2020: A2270/A2428/A2429/A2430
iPad air 3rd: A2152/A2153/A2154/A2123
iPad Air 4th: A2072/A2316/A2324/2325
iPad mini 5th: A2124/A2125/A2126/A2133
iPad Pro 1st/2nd 11: A1980/A2013/A1934/A1979/A2228/A2068/A2230/A2231
iPad Pro 3rd/4th 12.9: A2069/A2229/A2233/A2232/A1876/A2014/A1895/A1983



Stylus Pen For Ipad,Stylus Pen,Stylus Pen For Drawing,Touch Pencil

Shenzhen Ruidian Technology CO., Ltd , https://www.wisonens.com