HollySys PLC - What are the design requirements that need to be met for PLC programs?

Create Date: 2024-8-30 12:03:23|Source: HollySys/HollySys

Simplicity

Make the PLC program as simple as possible. Simplicity means using a standardized procedural framework as much as possible and using simple instructions as much as possible.

In order to make the program simple, in a large way, it is necessary to optimize the program structure, simplify the program with process control instructions, and replace the single-function instructions with powerful instructions in a small aspect, and pay attention to the arrangement order of instructions.

  readability

The designed program is required to be readable. This is not only convenient for the programmer to deepen their understanding of the program and facilitate debugging, but also to make it easy for others to read your program and facilitate user maintenance. If necessary, the program can also be promoted.

To make a program readable, the program should be designed to be as clear as possible. Pay attention to the hierarchy and implement modularity to the point of designing with an object-oriented approach. Use more standard designs.

In case of special cases, language programming is used, and in most cases, please use ladder programming for easy reading.

The second is that the I/O allocation should be regular, easy to remember and understand. If necessary, do some annotation. The use of internal devices should also be regular, and do not use them casually.

Readability is something to keep in mind at the beginning of programming. It's not easy to do it completely. Because in the process of program debugging, the increase or decrease of instructions and the change of the use of internal devices may make the original clearer program become a little chaotic. Therefore, there is a certain leeway for debugging to increase or decrease during the design, and then tidy up after the debugging is completed, so that the designed program has higher quality.

The comments of the program should have at least the following aspects:

A. System note: the copyright company of the whole set of programs and the purpose of this set of programs

B. Block Notes: The main purpose and author of this block

C. Paragraph comment: The purpose of this piece of code

D. Variable annotation: Needless to say, the importance includes I/O annotation and intermediate variable annotation

As for the consideration of confidentiality, I think it should be considered in the encryption algorithm of the program or the encryption of the block, rather than the clever idea of reducing comments.

  correctness

The program of the PLC must be correct, and it must be verified by the actual work to prove that it can work correctly. This is the most fundamental requirement for the PLC program, and if this is not done, nothing else is useful.

In order to make the program correct, it is necessary to use the instructions accurately and use the internal components correctly. Accurate instructions are linked to an accurate understanding of instructions, and it is important to understand the meaning and conditions of use of instructions. If necessary, you can make some small programs to test some unclear instructions.

For the same instruction, due to the different factory batches of PLC or the different series and models of PLC, some instruction details may be different, and the programming manual should be carefully consulted.

It is also important that the internal components are used correctly. Some PLCs have power-off protection, while others do not. It must be done that the power-down protection device must be used, and the power-down protection device cannot be used.

In short, it is necessary to use instructions accurately, use internal devices correctly, and make the program work correctly, which is the most fundamental requirement for PLC programs.

As a simple example, the rising and falling edges of Siemens need to use a variable with storage function as an intermediate variable, such as M point or DB point, and if you use the temp variable of FC, it will be problematic.

  reliability

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

Some PLC programs can work correctly under normal working conditions or legal operation, but after abnormal working conditions (such as temporary power failure, and power on soon) or illegal operation (such as some buttons are not pressed in order, or several buttons are pressed at the same time), the program can not work normally. This kind of program is not very reliable, or unstable, and it is a bad program.

A good PLC program can identify the occurrence of abnormal working conditions, and can connect it with normal conditions, which can make the program adapt to a variety of situations. A good PLC program rejects illegal operations and leaves no "traces". Only lawful operations are accepted.

Interlocking is a common means of rejecting illegal operation, relay circuits commonly use this method, and PLC can also inherit this method.

  Easily modifiable

To make the program easy to modify, that is, to be easy to modify.

One of the characteristics of PLCs is that they are convenient and can be flexibly adapted to various situations. The way to do this is by modifying or redesigning the program.

When a redesign program is used to change the use requirements of a PLC process, not only the program is reprogrammed, but the I/O is also reassigned. In most cases, you don't need to reprogram the program, just make some changes. This requires the program to be easy to modify and easy to modify.

Easy to change is flexible, which requires only a few changes to achieve the purpose of changing parameters or easy to change actions.

  Scalability

Many programs may have been programmed before entering the site, but when they arrive on site, additional programs may need to be added, and in order to avoid disrupting the structure of the entire system, a certain amount of space needs to be reserved in each functional area as a backup.

Leave enough margin on the hardware, and the software will consider manual, automatic, and semi-automatic when writing, and leave the position.

  Complete alarm system

PLC system is often used in industrial environment, every accident will cause large or small losses, in order to achieve accident pretreatment or minimize the loss in the accident, we must pay attention to the alarm and protection of PLC, here it will be extracted as an important part of the system.

  Program simulation

In order to ensure the commissioning progress of the site or to show the customer, it is often necessary to carry out a fully automatic simulation of their own procedures before entering the site. To do this, it is necessary to add a simulation part to the program, which is disconnected after normal field operation. In order for the program to be emulation, you need to do the following:

(1) Convert the actual I/O points of the PLC into intermediate variables or data block variables of the PLC;

(2) Write the simulation program of each equipment according to the process requirements.
HollySys PLC - What are the design requirements that need to be met for PLC programs?

More on that
Hollysys DCS - Introduction to I/O in DCS control system Hollysys DCS - Introduction to I/O in DCS control system

The control system needs to establish the input and output channels of the signals, which is called I/O. The I/O in a DCS is generally modular, with one or more I/O channels on one I/O module for connecting sensors and actuators (control valves). The control unit of the DCS: a process control station is ...

Hollysys DCS - Introduction to the main features of DCS Hollysys DCS - Introduction to the main features of DCS

(1) High reliability DCS is designed to be fault-tolerant, so that when a computer fails, it does not cause the system to lose other functions. In addition, because the tasks undertaken by the individual computers in the system are relatively simple, it is possible to adopt a specific structure and ...

Hollysys automation solutions Hollysys automation solutions

Hollysys Automation provides automation solutions for many fields.   Intelligent TCM solutions In order to make the drug achieve the harmony and unity of the doctor's peace of mind, the pharmacist's formula, and the patient's peace of mind, higher requirements are put forward for the pharmacy environment and hospital management. But...

Hollysys PLC - What are the selection methods of PLC? Hollysys PLC - What are the selection methods of PLC?

1. Budget for input and output (I/O) points When budgeting I/O points, the appropriate margin should be considered, usually based on the calculated number of input and output points, and then add 10%-20% of the expandable, and after the margin, it will be used as the budget data of input and output points. When ordering in practice, it is also necessary to rely on the manufacturer's ...

Hollysys PLC - a component of the PLC control cabinet Hollysys PLC - a component of the PLC control cabinet

1. Open empty A master air switch that is the power control for the entire cabinet. 2. Power supply A 24VDC switching power supply. 3、PLC This should be chosen according to the needs of the project. If the scale of the project is small, the integrated PLC can be used directly; If the item ...

Hollysys PLC - what are the commonly used networking methods of PLC? Hollysys PLC - what are the commonly used networking methods of PLC?

1 Universal serial port module Based on the serial port communication module to realize the network connection, the network structure is shown in Figure 1, the form of computer link is adopted, the corresponding settings are carried out in the configuration software of the host computer, and the communication can be carried out with multiple PLCs without programming, and the FXlS of Mitsubishi ...

Common fault parts and maintenance of Hollysys PLC Common fault parts and maintenance of Hollysys PLC

1. Lack of motivation It may sound simple, but it's good to check the simple stuff first. Thoroughly inspect all power connections and cables for damage that could cause a short circuit. Make sure your power supply is functioning properly. Use a voltmeter to check if the grounding and voltage are correct. 2. Bad ...

Hollysys PLC - Electrical troubleshooting of PLC control loop Hollysys PLC - Electrical troubleshooting of PLC control loop

In general, PLCs are extremely reliable devices with a very low failure rate. The probability of hardware damage such as the CPU of the PLC or software running errors is almost zero; If the PLC input point is not caused by strong current intrusion, it will hardly be damaged; The normally open point of the PLC output relay, if it is not a short circuit of the peripheral load ...

The difference between Lysys plc - RS232 interface and RS485 interface The difference between Lysys plc - RS232 interface and RS485 interface

1. The physical structure of the interface 1. RS232 interface: One of the computer communication interfaces, usually RS-232 interface in 9 pin (DB-9) or 25 pin (DB-25) form, generally there will be two sets of RS-232 interfaces on personal computers, respectively called COM ...

Hollysys PLC - PLC should be noted in operation (2) Hollysys PLC - PLC should be noted in operation (2)

2. Interference in the control system and its sources On-site electromagnetic interference is one of the most common factors in PLC control system and most likely to affect the reliability of the system. It is therefore essential to know the source of on-site disturbances ...

Hollysys was once again certified by the China Software Industry Association Hollysys was once again certified by the China Software Industry Association

Recently, identified by the Beijing Software and Information Service Industry Association, after a strict audit and evaluation process, in accordance with the relevant provisions of the national "Software Enterprise Evaluation Standards" and "Software Product Evaluation Standards", the China Software Industry Association announced the latest batch of "software enterprises" list, Beijing Heli ...

Hollysys PLC - Six Fault Types of PLC and Troubleshooting Methods (1-3) Hollysys PLC - Six Fault Types of PLC and Troubleshooting Methods (1-3)

First, the type of failure of the PLC. 1. External equipment failure. External equipment refers to various switches, sensors, actuators, loads, etc., which are directly connected with the PLC operation process. The failure of these equipment will directly affect the control function of the PLC system. Therefore...

Hollysys PLC - the six application functions of PLC Hollysys PLC - the six application functions of PLC

1. It is used for switching control The ability of PLC to manipulate switching quantities is very strong. The number of points in and out of the control, less than a dozen points, dozens of points, more can be hundreds, thousands, or even tens of thousands of points, because it can be networked, the number of points is almost unlimited, no matter how many points can be controlled, the control ...

Hollysys PLC - How to maintain the PLC control cabinet? Hollysys PLC - How to maintain the PLC control cabinet?

1. Data backup When carrying out maintenance, we must cut off the power, data backup between power outages is an important link, for the data that needs to be archived for a long time, you can back up the historical trend data to the mobile hard disk, and then turn off the Windows-based operating system (Note...

Hollysys PLC - Classification and application of PLC Hollysys PLC - Classification and application of PLC

1. Switch logic control Switching logic control is the basis of PLC. It is the first use case and the most extensive of all. Replace the previous relay circuit control and realize logic sequence control; It can be used for the control of stand-alone equipment, and can also be used for group control and ...

Hollysys PLC - What are the applications of PLC in CNC machine tools? Hollysys PLC - What are the applications of PLC in CNC machine tools?

1. The application form of PLC in CNC machine tools PLC is used in CNC machine tools, and there are usually two forms: one is called built-in: the other is called free-standing. Built-in PLC is also known as integrated PLC, the CNC system in this way, at the beginning of the design of the NC and PLC combined ...

Hollysys DCS - the connection method between thermocouple and DCS Hollysys DCS - the connection method between thermocouple and DCS

1. The thermocouple uses a compensation wire, and there can be a node in the middle, but the corresponding compensation cable must be used to directly connect to the DCS thermocouple module, such as the LLMUX card in HONEYWELLTPS. Minimize nodes to reduce interference. In addition, in the DCS configuration, it is necessary to select the corresponding thermocouple model, and supplement the ...

Hollysys released a new 100% localized system Hollysys released a new 100% localized system

On the morning of October 20, 2021, at the Epec Industrial Products Exhibition, Hollysys released a new 100% localized system - 'HOLLiAS MACS IC fully autonomous and controllable DCS system'. The system integrates the controller microkernel architecture independently developed by Lisi, embedded ...

What are the three layers of the network structure of Hollysys DCS - DCS? What are the three layers of the network structure of Hollysys DCS - DCS?

The bottom layer, the field control layer, that is, the field instrument and signal transmission, is mainly the collection of signals and the transmission of control signals. From field devices to control CPUs. The middle layer, the system management layer, that is, the internal network layer of the DCS system, including the control station, the operation station, the historical server...

Hollysys DCS – the steps for DCS to properly power off and power on Hollysys DCS – the steps for DCS to properly power off and power on

DCS is properly blacked out When the DCS needs to be powered off for maintenance due to overhaul or other reasons, we often directly power off the DCS, but sometimes this non-standard operation will bring serious consequences, such as configuration loss, PID parameter loss, etc. So there is a need for blackouts and re-on...

CATEGORIES BYPASS
Customer Service Center

Online Consultation:QQ


ContactContact

Contact: Manager Huang

Contact QQ: 3271883383

Contact number: 13522565663


Scan the code to add WeChat (please save the picture first on the mobile phone)

working hoursworking hours

Weekdays: 9:00-17:00

Holidays: Only emergencies are handled

Contact us

Contact us

Contact number QQ consultation
QQ consultation

3271883383

Company address
Back to top