HollySys PLC - the usage and principle of PLC programming interrupts

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

When the PLC understands the interrupt function, it needs to understand the PLC's operating cycle or scan cycle. It is necessary to talk about the process of PLC sequential control loop execution, which is a prerequisite for understanding interruptions and must be mastered. It is divided into three parts, input processing, program processing, and output processing.

1. Input processing: Before the program is executed, the programmable controller will read the ON/OFF status of all input terminals of the programmable controller into the input image area, even if the input changes during the program execution, the content of the input image area will not change, and the changes will be read when the input processing of the next cycle is executed.

2. Program processing: PLC reads the on/off state of each software component from the image area of the software component such as the input image area according to the instruction content in the program memory, and then operates sequentially from step 0, and writes the result obtained each time to the image area, therefore, the image area of each software component gradually changes its content with the execution of the program. In addition, the internal contacts of the output relay perform actions based on the contents of the output image area

3. After the output processing and all instructions are executed, the on/off state in the output Y image area will be transferred to the output latch memory, which will be used as the actual output of the programmable controller.

The time it takes to perform an action is the operation cycle, also known as the scanning time. So what's the connection between outages and scan cycles? Interrupts are not fully executed in order from top to bottom, but rather that interrupt programs preferentially run programs individually, output immediately, and do not participate in the entire loop operation.

What is the purpose of the outage? We know that the PLC scan cycle is very short, so it is difficult for us to see the execution of the PLC sequence control. Here, we might as well assume that the scan cycle is 10s, i.e. it takes 10s to execute all the procedures. There is a very simple program LD X0, OUT Y0. When X0 is ON, Y0 will not output immediately, but will output after 10s. When X0 is disconnected, Y0 does not shut down immediately. So in our practical application, the PLC can't work because it doesn't use any equipment. In this case, interrupt processing is required, and the input interrupt function is used to execute the input immediately. In fact, the running time of PLC is very short, only a few milliseconds, which can fully meet the needs. However, certain timings, such as high-frequency pulse input and pulse capture in the microsecond range, must be affected by periodic operation.

Therefore, if you want to complete the on/off state processing multiple times in a cycle, you must use the interrupt function. In general, we rarely use interrupts. Even if a PLC with interrupt function is required for high-speed instructions, there is no need to write a special interrupt subroutine. For example, a high-speed counter uses an interrupt mode to process high-speed pulses from a specific input relay, so it can count regardless of the operating time.

You can use the special comparison command of the high-speed counter to output the counting results immediately, or you can use the high-speed counter interrupt method to process the count value of the high-speed counter. High-speed counters are not used to count high-frequency pulses. We use the interrupt function to count high-speed inputs.
HollySys PLC - the usage and principle of PLC programming interrupts

More on that
What are the functions of Hollysys PLC - PLC data acquisition gateway? What are the functions of Hollysys PLC - PLC data acquisition gateway?

1. Rich networking and interface functions, easy to deploy It supports 5G/4G/3G/WIFI/Ethernet, WAN/optical fiber and other network access modes, network port/serial port/IO port/CAN port and other equipment access, and supports LoRa wireless transmission, disconnection reconnection and multi-network mutual backup function. 2. Abundant ...

Hollysys debuted at the 13th Berlin International Rail Transit Exhibition Hollysys debuted at the 13th Berlin International Rail Transit Exhibition

On September 20, 2022, Berlin time, the 13th Germany Berlin International Rail Transit Exhibition (InnoTrans 2022) opened at the Berlin International Exhibition Center in Germany. Following the 2018 exhibition, Hollysys once again appeared at the Berlin International Railway Exhibition (hereinafter referred to as the Berlin Exhibition) ...

Century Qualcomm and Hollysys reached a strategic cooperation Century Qualcomm and Hollysys reached a strategic cooperation

With the inclusion of "exploring the construction of digital twin cities" in the 14th Five-Year Plan, the field of intelligent transportation is being endowed with more new business value. Recently, Century Qualcomm and Hollysys reached a strategic cooperation, based on the principle of "giving full play to advantages, mutual promotion, long-term cooperation, mutual benefit and win-win", ...

What are the characteristics of Hollysys PLC - PLC program? What are the characteristics of Hollysys PLC - PLC program?

1. Correctness (low debugging cost) First of all, the PLC program must be able to work correctly to meet the requirements of the actual control process. This is the essence of the PLC program, and if you don't do that, nothing else makes sense. 2. Reliability (low maintenance cost) Not only to ...

Hollysys DCS - How to deal with DCS system failure? Hollysys DCS - How to deal with DCS system failure?

1. View the data on the monitoring screen When the following situations occur, it means that there is a problem with the control system, and the microcomputer maintenance personnel should be notified immediately for maintenance, and the operator should go to the site to deal with it. (1) Frequently changing data does not change for a long time, and several or all data do not ...

Hollysys won the 2022 China Intelligent Transportation Association Science and Technology Award" Hollysys won the 2022 China Intelligent Transportation Association Science and Technology Award"

On October 18, 2022, the China Intelligent Transportation Association released the list of winners of the "2022 China Intelligent Transportation Association Science and Technology Award", which includes the Science and Technology Progress Award, the Technology Invention Award, and the Outstanding Innovative Talent Award. Among them, Beijing Hollysys System Engineering Co., Ltd. ...

Hollysys DCS - What is DCS distributed control system? Hollysys DCS - What is DCS distributed control system?

DCS is the English abbreviation of distributed control system (Distributed Control System), distributed control system is referred to as DCS, which can also be literally translated as "distributed control system" or "distributed computer control system". The decentralized control system is based on the microprocessor, and the control function is decentralized.

Hollysys PLC - PLC serial communication knowledge Hollysys PLC - PLC serial communication knowledge

1. What is serial communication? Serial is a very versatile protocol for device communication on a computer (not to be confused with Universal Serial Bus or USB). Most computers contain two serial ports based on RS232. The serial port is also an instrument ...

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

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. If you want the program to be simple, in a big way, you should optimize the program structure, simplify the program with process control instructions, and ...

Hollysys will make a blockbuster appearance at the first Shenzhen Nuclear Expo in 2022 Hollysys will make a blockbuster appearance at the first Shenzhen Nuclear Expo in 2022

From November 15th to 17th, the 2022 China Nuclear Energy High-Quality Development Conference and Shenzhen International Nuclear Energy Industry Innovation Expo (hereinafter referred to as the "2022 Shenzhen Nuclear Expo") will be grandly reopened at the Shenzhen World Convention and Exhibition Center.   The theme of this year's Nuclear Expo is "Nuclear Gathering in the Bay Area, Activating the World".

Hollysys PLC - Introduction to the composition of PLC control cabinet Hollysys PLC - Introduction to the composition of 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 is the use of the PLC interrupt function? Hollysys PLC - What is the use of the PLC interrupt function?

PLC understands the interrupt function in this way, when understanding the interrupt, we must first understand the PLC operation cycle or the scanning cycle, it is necessary to say that the PLC sequential control cycle execution process, which is the premise of understanding the interrupt, must be mastered, divided into three parts, input processing, program processing, output ...

Hollysys DCS - the development trend of DCS Hollysys DCS - the development trend of DCS

There are many new developments in the field of DCS-related, which are mainly manifested in the following aspects. (1) The system function is developing in the direction of openness. The structure of traditional DCS is closed, and it is difficult to be compatible with DCSs from different manufacturers. The open DCS will allow users to set a larger system ...

Hollysys PLC - PLC maintenance and use skills Hollysys PLC - PLC maintenance and use skills

With the development of society, PLC programmable controller has been widely used in industrial production, but its maintenance and overhaul methods and skills, many engineers are not lawful, the following is to introduce the experience and skills of PLC use process. 1. PLC input and output A ...

Hollysys PLC - Precautions in the operation of PLC (1) Hollysys PLC - Precautions in the operation of PLC (1)

First, the working environment (1) Temperature The PLC requires that the ambient temperature is 0-55oC, and it cannot be placed under the components with large heat generation during installation, and the surrounding ventilation and heat dissipation space should be large enough. (2) Humidity In order to ensure the insulation performance of PLC, the relative humidity of the air ...

Localization transformation: Hollysys assisted in the successful transformation of the DCS system of the first Shell coal gasification unit in China Localization transformation: Hollysys assisted in the successful transformation of the DCS system of the first Shell coal gasification unit in China

Since the reform and opening up, China's economy has developed rapidly, and many enterprises have improved production efficiency by introducing foreign production equipment and DCS systems. However, with the growth of the use years, many foreign DCS systems and equipment have gradually aged and are not suitable for the current production needs, so they are localized.

Hollysys PLC - common causes and treatment methods of PLC failures in operation Hollysys PLC - common causes and treatment methods of PLC failures in operation

1. Peripheral circuit component failure This type of failure often occurs in the failure of the PLC after a certain period of work. In the PLC control loop, if there is a component damage fault, the PLC control system will immediately and automatically stop working. The input circuit is a PLC that accepts switching quantities, analog ...

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 successfully signed a contract with Luxi Chemical for a 1.2 million tons/year bisphenol A plant project Hollysys successfully signed a contract with Luxi Chemical for a 1.2 million tons/year bisphenol A plant project

Recently, Hollysys successfully signed a contract with Luxi Chemical Group Co., Ltd. (hereinafter referred to as Luxi Chemical) for a 1.2 million tons/year bisphenol A equipment project. The project is a key project in Shandong Province in 2021, which will not only greatly improve the competitiveness of Luxi Chemical polycarbonate in the industry, but also have a significant impact on China's phenol ...

Hollysys DCS - What are the four contents of DCS spare parts management? Hollysys DCS - What are the four contents of DCS spare parts management?

DCS spare parts In the process of using the DCS control system, its management is more important. The requirements of general DCS spare parts management are summarized in four aspects: storage, inspection, preparation for use, and use. 1. Storage DCS system, spare module storage should meet the requirements ...

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