How to evaluate a good PLC program - Database & Sql Blog Articles

L0504-Murata muRata common mode inductor 90Ω 150mA
SMD aluminum electrolytic capacitor

Let's take a look at some aspects of a good plc program:

First, shortness

Keeping the PLC program as short as possible is also the goal to be pursued.

A short program saves user memory; in most cases, it saves execution time, improves response to input, and improves program readability.

Whether the program is short or not, generally can be measured by the number of instructions used by the program. The number of instructions used is small, and the program is naturally short.

In order to simplify the program, in a big way, to optimize the program structure, use the flow control instructions to simplify the program, from a small point of view, it is necessary to replace the single-function instructions with powerful instructions, and pay attention to the order of the instructions.

Second, time saving

Short program time can save program running time, but short and time saving is not exactly the same thing. Because the running time is related to the number of instructions owned by the program, and also related to what instructions are used. The PLC instructions are different and the execution time is different. Moreover, some instructions are different when the logic condition is ON and the time when it is OFF. In addition, since the flow control instruction is used, not all instructions are executed in the program. Therefore, the time calculation for running the program is more complicated. However, it is necessary to require less average time and less time. This can improve the response speed of the PLC.

The key to saving time is to use process control instructions. Determine the instructions that must be executed according to the situation, and make the necessary parts. The rest can be executed according to the program, selectively executed, or designed for time-sharing work, to avoid the maximum time is too long.

Third, readability

The program designed is required to be readable. This not only makes it easier for the programmer to understand the program, but also to debug it, and it is also convenient for others to read your program and maintain it for the user. Programs can also be promoted when necessary.

To make the program readable, the program you design should be as clear as possible. Pay attention to the hierarchy and modularize it so that it is designed with an object-oriented approach. Use more standard designs.

Then there is a regularity in I/O distribution, which is easy to remember and understand. If necessary, do some annotation work. The use of internal devices should also be regular, and should not be used casually.

Readability should be noted at the beginning of programming. This is not easy to do completely. Because in the process of program debugging, the increase or decrease of instructions, the use of internal devices changes, may make the original clearer program, it is a bit messy. Therefore, there is a certain room for debugging increase and decrease at the time of design, and then finishing after debugging, so that the designed program has higher quality.

Fourth, correctness

The PLC program must be correct, and it must be verified by actual work to prove that it can work correctly. This is the most fundamental requirement for PLC programs. If this is not possible, the other ones will not be useful.

To make the program correct, be sure to use the instructions accurately and use the internal components correctly. Accurate use of instructions is associated with accurate understanding of the instructions, for which the meaning of the instructions and the conditions of use must be clarified. If necessary, you can program small programs to test some unclear instructions.

The same instruction, due to the different factory batches of PLC or different series of PLC models, some instruction details may be different, you should consult the programming manual carefully.

It is also important that the internal components are used correctly. If some PLCs have power-down protection, some PLCs do not. Be sure to use the power-down protection device for this power-down protection, and vice versa.

In short, to accurately use the instructions, the correct use of internal devices, so that the programmed program can be done correctly, this is the most fundamental requirement for the PLC program.

V. Reliability

The program must be not only correct but also reliable. Reliably reflects the stability of the PLC program, which is also a basic requirement for the PLC program.

Some PLC programs can work correctly under normal working conditions or legal operation, and abnormal working conditions (such as temporary power failure, and then re-energized) or illegal operations (such as some buttons are not pressed in order, or After pressing a few buttons at the same time, the program will not work properly. This kind of program is not very reliable, or unstable, it is a bad program.

A good PLC program can be identified for abnormal working conditions and can be interfaced with normal conditions to adapt the program to a variety of situations. A good PLC program can reject illegal operations without leaving "marks." Only legal operations are accepted.

Interlocking is a common means of refusing illegal operations. This method is commonly used in relay circuits, and PLC can also inherit this method.

Six, easy to modify

To make the program easy to change, it is easy to modify.

One of the features of the PLC is its convenience and flexibility for a variety of situations. The solution is to modify or redesign the program.

The redesigned program is used to change the application requirements of the PLC process, not only the program is reprogrammed, but also the I/O is redistributed. In most cases, you don't need to reprogram the program, you can make some modifications. This requires the program to be easy to modify.

Easy to change is also flexible, requiring only a few changes to achieve the purpose of changing parameters or correcting actions.

The best evaluation criteria for PLC programs is practice.

In the process of designing the PLC program, it is a good program to be able to meet the requirements of the above six aspects.

Rechargeable Vape Pen Kit

Rechargeable Vape Pen Kit are so convenient, portable, and small volume, you just need to take them
out of your pocket and take a puff, feel the cloud of smoke, and the fragrance of fruit surrounding you. It's so great.
We are China leading manufacturer and supplier of Disposable Vapes puff bars,rechargeable vape pen kit disposable,
rechargeable vape pen kit for beginners,rechargeable vape starter kit, and e-cigarette kit, and we specialize in disposable vapes,
e-cigarette vape pens, e-cigarette kits, etc.


rechargeable vape pen kit disposable,rechargeable vape pen kit for beginners,rechargeable vape starter kit,rechargeable vape pen kit with battery,rechargeable vape pen kit 900mah

Ningbo Autrends International Trade Co.,Ltd. , https://www.mosvapor.com