PLC programming method and design rules

Publisher:真诚友谊Latest update time:2022-03-21 Source: elecfansKeywords:plc Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

PLC mainly works by running programs. In order to make the programmable controller play its full role, in addition to selecting the correct programmable controller model, suitable detection and execution devices, and rationally planning the system structure, it is also very important to compile a high-quality programmable controller working program.


1. Programming requirements

1. The program should comply with the relevant regulations of the PLC used. The main thing is to understand the instructions accurately and use them correctly. Various PLC instructions are similar, but there are also some differences. For those who have experience in using PLC, when choosing another unfamiliar model for programming, they must re-understand the instructions of the new model PLC, otherwise it is easy to make mistakes.


2. Make the program as concise as possible. A short program can save memory, simplify debugging, save time in executing instructions, and improve the response speed to input. To make the program short, you should pay attention to the programming method, use instructions well, use instructions cleverly, and optimize the structure. To achieve a certain function, generally speaking, when the purpose is the same, using instructions with strong functions may result in fewer program steps than using instructions with single functions.


3. Make the program as clear as possible. This will not only facilitate debugging, modification or supplementation of the program, but also make it easier for others to understand and read the program. To make the program clear, you must pay attention to the program level, modularization and standardization. Especially when compiling complex programs, you should pay more attention to the program level. You can accumulate your own experience and absorb others' experience, sort out some standard programs with typical functions, and make the program unitized as much as possible, like some commonly used subroutines in computers, which can be moved around and used. In this way, the design is simple and easy for others to understand.


5. The programmed program can run cyclically. The working characteristic of PLC is that it can run the same program repeatedly and uninterruptedly. The operation starts from the initialized state, and when the controlled object completes the working cycle, it returns to the initialized state. Only in this way can the controlled object get the same control in the new working cycle.


2. Programming methods Commonly used PLC programming methods include empirical method, analytical method and graphical method.

1. The empirical method is to use your own or other people's experience to design. Before designing, choose a successful example similar to the design requirements, and modify it, add or delete some functions or use some of the programs until it is suitable for your own situation. In the work process, you can collect and accumulate such successful examples, so as to continuously enrich your own experience.


2. The analytical method can use the theory of combinational logic or sequential logic and apply the corresponding analytical method to solve the logical relationship, and then draw a ladder diagram or directly write the program based on the solution. The analytical method is more rigorous and can use certain standards to optimize the program, which can avoid the blindness of programming and is a more effective method.


3. Graphical method Graphical method is to design by drawing. Commonly used methods include ladder diagram method, waveform diagram method and process method. Ladder diagram method is the basic method. Whether it is empirical method or analytical method, if the PLC program is converted into a ladder diagram, the ladder diagram method must be used. The waveform diagram method is suitable for time control circuits. After drawing the waveform of the corresponding signal, it can be easily designed according to the time logic relationship. The process method uses a block diagram to represent the execution process of the PLC program and the relationship between input conditions and outputs. When using step instructions, it is very convenient to use it for design.


Keywords:plc Reference address:PLC programming method and design rules

Previous article:Method of measuring analog signal by using high-speed counter in S7-200PLC
Next article:Rules for using PLC ladder diagram

Recommended ReadingLatest update time:2024-11-16 13:02

Omron CPM1A series PLC function instructions
Functional instructions are also called special instructions. The functional instructions provided by the CPM1A series PLC are mainly used to realize program control, data processing and arithmetic operations. This type of instruction generally does not have a corresponding instruction key on the simple programmer,
[Embedded]
ST releases G3-PLC Hybrid Powerline and Wireless Converged Communications Certified Chipset
STMicroelectronics Releases G3-PLC Hybrid Powerline and Wireless Converged Communications Certified Chipset Turnkey solution based on the proven ST8500 programmable multiprotocol power line communication SoC and ultra-low power sub-GHz S2-LP RF transceiver China, June 2, 2021 - STMicroelectronics' ST8500 and S2
[Internet of Things]
ST releases G3-PLC Hybrid Powerline and Wireless Converged Communications Certified Chipset
Explanation of all components of a typical PLC control cabinet
The Secret of PLC Control Cabinet PLC control cabinet refers to a complete set of control, an electrical cabinet that can realize the control of motors and switches. PLC control cabinet has overload, short circuit, phase loss protection and other functions. It has compact structure, stable operation,
[Embedded]
What should I learn first to learn Mitsubishi PLC programming?
Many PLC beginners will ask a question, what should I learn first when learning Mitsubishi PLC programming? First, you need to learn the introduction of Mitsubishi PLC programming and application, mainly including the digital circuit foundation of Mitsubishi FX series PLC, understanding of PLC, programming foun
[Embedded]
What should I learn first to learn Mitsubishi PLC programming?
Mitsubishi FX series PLC connected to touch screen and configuration software Ethernet communication case
CHNet-FX Ethernet communication processor is designed to meet the increasing demand for factory equipment informatization (equipment network monitoring and production management). It is used for Ethernet data acquisition of Mitsubishi FX1N/1S/2N/3S/3G/3GC/3U/3UC series PLC (compatible with Huichuan and Hechuan PLC),
[Embedded]
Mitsubishi FX series PLC connected to touch screen and configuration software Ethernet communication case
Mitsubishi PLC selection criteria
The number of input/output (I/O) points is the sum of the input signals and output signals that Mitsubishi PLC can accept, and is an important indicator for measuring the performance of Mitsubishi PLC. The more I/O points there are, the more external input devices and output devices can be connected, and the larger
[Embedded]
Wiring method and principle of sensor and PLC
Today, we will introduce the wiring method of sensors and PLCs, including 20 wiring diagrams. Isn’t it super rich? Let’s take a look together. 1 Overview The digital input interface of PLC is not complicated. In order to improve the anti-interference ability, the input interface of PLC uses photocoup
[Embedded]
Wiring method and principle of sensor and PLC
Siemens PLC instruction explanation
-1. Contact and coil instructions Programming principles of PLC ladder diagram language 1. The ladder diagram consists of multiple rungs. Each coil can constitute a rung. Each rung has multiple branches, and each rung represents a logic equation. 2. The relays, contacts and coils in the ladder diagram
[Embedded]
Siemens PLC instruction explanation
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号