How to improve the operating efficiency of domestic PLC and shorten the execution time when completing the same task

Publisher:binggegeLatest update time:2022-03-01 Source: elecfansKeywords:PLC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

How to improve the operating efficiency of domestic PLCs and shorten the execution time to complete the same task. Let lower performance products complete higher performance processing requirements

1. When you can use a "word" (such as VW unit), try to avoid using a "double word" (VD unit). When you can use an integer, try to avoid using real numbers/floating point numbers.

2. Give priority to the use of surplus (other than hardware connections) IB, IW, ID, QB, QW, QD, followed by M and S;

3. Reduce unnecessary network scanning, and classify the networks that can be executed conditionally (especially AIW and AQW) into subroutines for conditional calls (such as timed interrupts);

4. Under the premise of ensuring process requirements, appropriately reduce the frequency of interruptions;

5. The subroutine should minimize the number of conditional judgments and standardize the subroutine import and export parameters to reduce code redundancy.

6. If SM0.0 is connected in series with other signals, it will only increase the program size and execution time, and will have no other effect (if the network already meets the required contacts on the left, there is no need to connect SM0.0 in series);

7. For subroutine calls with less input data, you can first determine whether the input data has changed. If there is no change (the comparison method can be referred to the 48th floor), you can directly skip the subroutine to reduce the scanning cycle.

8. Reasonable use of immediate IO instructions (minimize their use) can save the conversion time of domestic PLCs in processing immediate instructions.

9. Try to use calculation result memory instead of transition memory during calculation.

10. Avoid data type conversion. When necessary, use AC to store intermediate variables to reduce the number of conversions. Or reserve storage space when programming. For example, when using VW2 to store integers, leave VW0 empty and access the data in VW2 directly in the form of VD0.

11. Use the XOR instruction to implement the inversion of any bit (this instruction is slightly difficult and requires careful alignment during debugging);

12. For repetitive and time-consuming tasks, periodic processing should be adopted, including: allocating the initialization work to multiple cycles. Make the sampling time of multiple PID loops slightly different to avoid multiple interrupt calls in the same cycle, making the scanning cycle more uniform and stable.

13. Try to arrange the bit variables in the V area in V511.7, and arrange the frequently used VB/VW/VD variables in V4095, which can shorten the program scanning cycle.

14. When there is no need to share signals, multiple instructions placed in the same network will generate additional stack operations (which can be converted into STL for analysis), which will also increase the program size and execution time. The only benefit is that it is more compact in one network.

Keywords:PLC Reference address:How to improve the operating efficiency of domestic PLC and shorten the execution time when completing the same task

Previous article:Programming Skills of PLC in Automatic Tool Changing Process of Machining Center
Next article:Zero position of rotary encoder

Recommended ReadingLatest update time:2024-11-16 12:42

PLC Programming: Technical Summary Using Siemens Products as Examples
A programmable logic controller (PLC) is a rugged, microprocessor-based electronic device that is essential to all modern automation, including: Heavy processing sectors such as oil and gas, nuclear power, steelmaking and wastewater treatment Industries that emphasize controlling discrete tasks—
[Embedded]
PLC Programming: Technical Summary Using Siemens Products as Examples
Detailed explanation of PLC input point saving method
Introduction It is generally believed that the number of input points is determined by the number of system input signals. However, in actual applications, the purpose of saving PLC input points can be achieved through the following measures, which are introduced below using the FX1N series PLC. Meth
[Embedded]
Detailed explanation of PLC input point saving method
Common input devices of PLC and how to correctly connect input and output circuits
Common input devices of PLC include buttons, travel switches, proximity switches, conversion switches, encoders, various sensors, etc. Output devices include relays, contactors, solenoid valves, etc. Correctly connecting input and output circuits is the prerequisite for ensuring the safe and reliable operation of PL
[Embedded]
Common input devices of PLC and how to correctly connect input and output circuits
Types and characteristics of PLC ladder diagram programming language
PLC ladder diagram programming language is a programming language used to write automation applications. Its name comes from the shape of the ladder diagram, each ladder represents a logical function block. Ladder diagram programming language is a graphical programming language with the advantage of being easy to un
[Embedded]
Design of gypsum board production system based on CC-Link network PLC device
1. Introduction With the development of communication technology and control technology, as well as the popularization of industrial fieldbus, the previous analog speed regulation has been gradually eliminated in gypsum board manufacturers, and replaced by more advanced fieldbus control technology. Fieldbus con
[Embedded]
Design of gypsum board production system based on CC-Link network PLC device
Servo system components
Since the servo system serves many purposes, such as computer CD drive control, radar tracking system, feed tracking system, etc., the requirements for the servo system are also different. The technical requirements for the servo system in engineering are very specific and can be summarized into the following aspect
[Embedded]
Servo system components
Application of PLC analog quantity acquisition in industrial automation control
In complex industrial sites, it is often necessary to collect data on analog quantities such as temperature, voltage, current, pressure, etc., which can be controlled and collected with the help of PLC. However, there are many PLC analog quantity acquisition modules on the market. Different manufacturers and differe
[Embedded]
Massive data storage for communication between MCU and PLC
1. Use the existing mature PLC technology to collect the monitoring point data of each device; 2. Use single-chip microcomputer technology to read the data collected by PLC and store it in a storage device in a certain format. The storage device can be a USB flash drive, memory card, etc.; 3. Use a card reader to
[Microcontroller]
Massive data storage for communication between MCU and PLC
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号