What are the three stages to complete the plc user program?
Three stages to complete the plc user program: 1. Input processing stage, PLC reads the input signals on all input terminals in scanning mode, and stores each input status into the corresponding input image register; 2 , In the program execution stage, the PLC follows the ladder diagram program scanning principle. Execute the program one by one from left to right and top to bottom; 3. In the output processing stage, the PLC sends the output variables in the output image area to the output latch, and then the latch generates the output of this cycle through the output module. Control output.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
PLC software system refers to a collection of various programs used by PLC. It includes system programs and user programs.
(1) System program
System programs include monitoring programs, compilers and diagnostic programs, etc. The monitoring program is also called the management program and is mainly used to manage the entire machine. Compilers are used to translate programming language into machine language. Diagnostic programs are used to diagnose machine malfunctions. The system program is provided by the PLC manufacturer and is solidified in EPROM. The user cannot directly access it, so user intervention is not required.
(2) User program
The user program is an application program compiled by the user in the PLC programming language according to the needs of on-site control to achieve various control requirements. The user program is typed into the PLC memory by the user using a programmer. The user program of a small PLC is relatively simple and does not need to be segmented, but is compiled sequentially. The user program of large and medium-sized PLC is very long and relatively complex. In order to make the user program compilation simple and clear, the user program can be divided into various program modules according to the functional structure or purpose of use. A user program is composed of a module structure. Each module is used to solve a certain technical function. It can make a long program easy to understand and make it easy to debug and modify the program.
For CNC machine tools, the user program in the CNC machine tool PLC is provided by the machine tool manufacturer and has been solidified into the user EPROM. The machine tool user does not need to write or modify it. Only when the machine tool fails, Find the fault point and perform repairs according to the ladder diagram and electrical schematic diagram provided by the machine tool factory.
Three stages of completion of plc user program
The completion of PLC user program is divided into three stages: input processing, program execution, and output processing. These three stages are completed in a time-sharing manner using the "cyclic scanning" working method.
(1) Input sampling stage.
In this stage, the PLC reads the input signals on all input terminals in a scanning manner, and stores each input status into the corresponding input image register. At this time, the input image register is flushed. 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 signal. It can be seen that when the PLC executes the program and processes the data, it does not directly use the input signal at the scene, but uses the data input into the image area during this sampling. Generally speaking, the width of the input signal must be greater than one scanning period, otherwise the signal may be lost.
(2) Program execution stage.
In the process of executing the user program, the PLC follows the ladder diagram program scanning principle. Generally speaking, the PLC executes the program one by one from left to right and from top to bottom. However, when a program jump instruction is encountered, the program jump address is determined based on whether the jump condition is met. During program execution, when the input and output status are involved in the instruction, the PLC "reads" the corresponding input terminal status from the input image register, and "reads" the current status of the corresponding component ("soft relay") from the output image register. . Then the corresponding operation is performed, and the operation result is stored in the output image register. For output image registers, the state of each element ("soft relay") changes as the program executes.
(3) Output refresh stage.
The operation results during the program execution phase are stored in the output image area instead of being 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 status of the internal output relay is "1", the output relay contact is closed and the external load is driven through the output terminal. The status of all output devices must be maintained for one scan cycle.
For more related knowledge, please visit the FAQ column!
The above is the detailed content of What are the three stages to complete the plc user program?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The default map on the iPhone is Maps, Apple's proprietary geolocation provider. Although the map is getting better, it doesn't work well outside the United States. It has nothing to offer compared to Google Maps. In this article, we discuss the feasible steps to use Google Maps to become the default map on your iPhone. How to Make Google Maps the Default Map in iPhone Setting Google Maps as the default map app on your phone is easier than you think. Follow the steps below – Prerequisite steps – You must have Gmail installed on your phone. Step 1 – Open the AppStore. Step 2 – Search for “Gmail”. Step 3 – Click next to Gmail app

To automate tasks and manage multiple systems, mission planning software is a valuable tool in your arsenal, especially as a system administrator. Windows Task Scheduler does the job perfectly, but lately many people have reported operator rejected request errors. This problem exists in all iterations of the operating system, and even though it has been widely reported and covered, there is no effective solution. Keep reading to find out what might actually work for other people! What is the request in Task Scheduler 0x800710e0 that was denied by the operator or administrator? Task Scheduler allows automating various tasks and applications without user input. You can use it to schedule and organize specific applications, configure automatic notifications, help deliver messages, and more. it

The operation of Windows is getting better and better with every version, with attractive features to improve the user experience. One feature users will want to explore on Windows 10 and 11 is the ability to sort photos by faces. This feature allows you to group photos of friends and family using facial recognition. Sounds fun, right? Read on to learn how to take advantage of this feature. Can I group photos by faces on Windows? Yes, you can use the Photos app to group pictures by faces on Windows 10 and 11. However, this feature is not available on the Photos app version. Additionally, you can link these photos to contacts using the People tab. Therefore, using this function you can

C++ is a widely used programming language that is very convenient and practical in writing countdown programs. Countdown program is a common application that can provide us with very precise time calculation and countdown functions. This article will introduce how to use C++ to write a simple countdown program. The key to implementing a countdown program is to use a timer to calculate the passage of time. In C++, we can use the functions in the time.h header file to implement the timer function. The following is the code for a simple countdown program

Is the clock app missing from your phone? The date and time will still appear on your iPhone's status bar. However, without the Clock app, you won’t be able to use world clock, stopwatch, alarm clock, and many other features. Therefore, fixing missing clock app should be at the top of your to-do list. These solutions can help you resolve this issue. Fix 1 – Place the Clock App If you mistakenly removed the Clock app from your home screen, you can put the Clock app back in its place. Step 1 – Unlock your iPhone and start swiping to the left until you reach the App Library page. Step 2 – Next, search for “clock” in the search box. Step 3 – When you see “Clock” below in the search results, press and hold it and

Do you frequently visit the same website at about the same time every day? This can lead to spending a lot of time with multiple browser tabs open and cluttering the browser while performing daily tasks. Well, how about opening it without having to launch the browser manually? It's very simple and doesn't require you to download any third-party apps, as shown below. How do I set up Task Scheduler to open a website? Press the key, type Task Scheduler in the search box, and then click Open. Windows On the right sidebar, click on the Create Basic Task option. In the Name field, enter the name of the website you want to open and click Next. Next, under Triggers, click Time Frequency and click Next. Select how long you want the event to repeat and click Next. Select enable

In iOS, many apps display different views when you rotate your iPhone from portrait to landscape. Depending on the app and how it's used, this behavior isn't always desirable, which is why Apple includes an orientation lock option in Control Center. However, some apps work more usefully with orientation lock disabled—think YouTube or the Photos app, where rotating the device to landscape provides a better full-screen viewing experience. If you prefer to stay locked down, you'll have to disable it in Control Center to get a full-screen experience every time you open these types of apps. Then when you close the app, you have to remember to turn orientation lock back on, which isn't ideal. Fortunately, you can create

Are you getting "Unable to allow access to camera and microphone" when trying to use the app? Typically, you grant camera and microphone permissions to specific people on a need-to-provide basis. However, if you deny permission, the camera and microphone will not work and will display this error message instead. Solving this problem is very basic and you can do it in a minute or two. Fix 1 – Provide Camera, Microphone Permissions You can provide the necessary camera and microphone permissions directly in settings. Step 1 – Go to the Settings tab. Step 2 – Open the Privacy & Security panel. Step 3 – Turn on the “Camera” permission there. Step 4 – Inside, you will find a list of apps that have requested permission for your phone’s camera. Step 5 – Open the “Camera” of the specified app