PLC user program execution process

Publisher:悠然自在Latest update time:2022-05-26 Keywords:PLC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

For PLC users, when writing user programs or selecting equipment, they must be clear about the three stages described below, that is, the principles of the user program execution process.


PLC adopts a centralized processing method, that is, centralized batch processing is used for input scanning signals, execution of user programs and output refresh.

(1) Input Scan In this phase, the PLC reads the input signals from all input terminals in a scanning manner and stores the input signals in the input image area. The input image memory is refreshed. During the program execution phase and the output refresh phase, the input image memory is isolated from the outside world and its content remains unchanged until the input scan phase of the next scan cycle, when it is refreshed by the re-read input signals.


It can be seen that when executing programs and processing data, PLC does not directly use the input signal at the time of the scene, but uses the data input into the image area during this sampling. If the input device can form a closed loop at the PLC input end, the internal input relay corresponding to the input end number is saved as "1", which is equivalent to the relay coil being turned on.


During the execution of the program, the contact corresponding to this number will be activated; if the input device can open the input circuit, the internal input relay corresponding to the input terminal number will be saved as "0", which is equivalent to the relay coil not being turned on. During the execution of the program, the contact corresponding to this number will not be activated.


If the state of the input device outside the PLC changes when the PLC is in the non-input scanning stage, the internal input relay will not change, and it will have to wait until the next input scanning stage to refresh according to the input state at this time. Therefore, input signals less than a dozen milliseconds are often not collected.


(2) Execution of the program During the execution of the user program, the PLC scans and executes one by one from top to bottom and from left to right in the order of the ladder diagram program, that is, it executes in the order of the mnemonic instruction table. However, when encountering a program jump instruction, the program jump address is determined based on whether the jump condition is met. During the execution of the program, the PLC takes the current state of the input variable from the input image area, and then performs logical operations or other operations determined by the program, and stores the operation results in the corresponding internal relays according to the program instructions, including output relays, internal auxiliary relays, timers, counters, etc. The signal of the output relay is stored in the output image area, that is, the output relay corresponds to the output point with the same number outside the PLC.


During the execution of a program, in the same cycle, the previous logical result affects the following contacts, that is, the program executed later may use the latest intermediate calculation result of the previous one; but in the same cycle, the calculation result of the later one does not affect the previous logical relationship. The final state (conduction or not) of all internal relays except the input relays in this scanning cycle will affect the opening and closing of each contact in the next scanning cycle.


(3) The calculation results of the output refresh program execution phase are stored in the output image area, but not sent to the output port. In the output refresh phase, the PLC sends the output variables in the output image area to the output latch, and then the latch generates the control output of this cycle through the output module. If the state of the internal output relay is "1", the output relay contact is closed. The state of all output devices must be maintained for one scan cycle.


Keywords:PLC Reference address:PLC user program execution process

Previous article:Sensors help robots develop further
Next article:PID regulation setting rules

Recommended ReadingLatest update time:2024-11-15 07:09

Translation of 94 instructions for Siemens PLC
Instruction (full English name): Meaning of instruction 1. LD (Load): normally closed contact 2. LDN (Load Not): Break contact 3. A (And and normally closed): used for normally closed contacts in series 4. AN (And Not and break): used for connecting break contacts in series 5. O (Or or norma
[Embedded]
Detailed explanation of industrial control systems SCADA/DCS/PLC
Industrial control system (ICS) is a general term that covers many types of control systems, including supervisory control and data acquisition (SCADA) systems, distributed control systems (DCS), and other smaller control system configurations, such as skid-mounted programmable logic controllers (PLCs) often used in i
[Industrial Control]
A brief discussion on the definition and application of PLC and DCS
DCS (Distributed Contorl System), also known as distributed control system, is a computer control system relative to the centralized control system. It is developed and evolved on the basis of the centralized control system. PLC (Program Logic Control), programmable logic controller. PLC and DC
[Embedded]
G3-PLC Alliance releases final version of G3-Hybrid dual-mode converged communication standard
G3-PLC Alliance releases final version of G3-Hybrid dual-mode converged communication standard Lianxintong assists in the formulation of dual-mode frequency hopping specifications Hangzhou City – February 3, 2023 – G3-Hybrid PLC + RF dual-mode integration is the industry’s first dual-mode communication standard, w
[Internet of Things]
G3-PLC Alliance releases final version of G3-Hybrid dual-mode converged communication standard
Siemens 1200/1500 PLC indefinite length array selection sorting programming example
The selection sort algorithm first selects all elements from the first position, selects the smallest element among all elements and gives it to that position, then selects the second position, and selects the smallest element among the remaining elements and gives it to that position; and so on, repeating the selec
[Embedded]
Siemens 1200/1500 PLC indefinite length array selection sorting programming example
What is the role of counter in program?
In addition to ladder diagrams, PLC programs also have FBD function blocks as instructions, which generally have background DBs. The PLC counter instruction enables it to count internal program events and external process events, thus saving the use of external counters. Each counter uses a structure
[Embedded]
What is the role of counter in program?
Siemens control system plc programming wiring diagram
This time we bring you some commonly used examples for beginners of PLC programming control. You can use them as a reference to shorten the progress bar of learning PLC and increase your mastery. The knowledge points contained in it are relatively complete, such as: I/O allocation table, PLC wiring diagra
[Embedded]
Siemens control system plc programming wiring diagram
How to read the program of Mitsubishi FX series PLC
Mitsubishi FX series PLC (Programmable Logic Controller) is a control device widely used in the field of industrial automation. They have powerful functions and flexible programming methods, which can meet various industrial automation needs. This article will introduce in detail how to read the program of Mitsubish
[Embedded]
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号