Small PLC scan cycle length depends on the scanning speed and the length of the user program

by:Coolmay     2020-06-18

to improving the efficiency of the PLC controller, shorten the execution time of the complete the same tasks.

01 can avoid using 'word' with 'double word', can use integers, try to avoid using real number.

02 priority use of surplus ( Hardware connection outside) The IB, IW, ID, QB,'ve, QD, followed by M, S; 03 to avoid data type conversion to unavailable, intermediate variable is stored in the AC as far as possible, reduce the frequency conversion. Or when programming to set aside the storage space, such as: VW2 store integers, VW0 vacated need not, can directly in the form of VD0 to access data in a VW2; 04, reduce unnecessary network scanning set can perform the condition of network ( Especially AIW, AQW) Conditions, classified into the subroutine call ( For example, timer interrupt) ; 05 XOR instruction is used to implement any invert ( This command slightly difficult, need more seriously counterpoint in debugging, advice when programming in a binary number) ; 06 under the premise that ensure the technological requirements, reduced the frequency of the interrupted; 07 subroutine should try to reduce the number of conditional, specifications, anti-fuzzy process parameters of imports and exports, thus reduce code redundancy. 08 for repetitive, time-consuming tasks, cycle processing should be adopted; Including: finish the initialization split into multiple cycles. Make multiple PID loop of the sampling time is slightly different, in order to avoid produce multiple interrupt call, in the same cycle to scan cycle is more uniform and stable. 09 for subroutine calls less input data, to determine whether the input data have change, if there is no change, Comparative method may refer to 48 floor) , you can skip the subroutine, reducing scan cycle. 10 as far as possible put in V in a variable in V511. 7, the use of high frequency of VB/VW/VD variables, arrange within V4095, can shorten the program scan cycle. 11 SM0。 If 0 and other signal series, only increase the program size and execution time, no other action ( If the network has been satisfied to the left side of the contact, there is no need to concatenate SM0. 0) ; 12 when there's no need to share the signal, placed in the same network multiple instructions, will generate additional in and out of a stack ( Concrete can be converted to STL to analysis) , and if it is not logic requirements, should avoid horizontal series, this can reduce at least one 'and' instruction. Good just put in a network, feel a little bit tight. 13 the rational use of IO immediately instructions ( To minimize the use) Save the PLC controller processing instructions immediately conversion time. 14 as far as possible using the calculation results in the calculation of the memory, instead of interim storage.


The manufacture marketing game of plc manufacturers is changing with each innovation, and businesses of all products need to be ready to pounce.
Compare the various types of that are available. At Coolmay PLC, the range is constantly being updated with new models, technical details and competitive prices.
Shenzhen Coolmay Technology Co., Ltd. always think about our customer first. To determine what the consumers would want out of their relationship on social, and work from there.
Shenzhen Coolmay Technology Co., Ltd. incorporates average length of the workweek, average growth in number of small businesses, startup per capita, average of growth of business revenues, five-year business survival rate, industry variety, entrepreneurship index and how digital a state is.
Custom message
Chat Online 编辑模式下无法使用
Chat Online inputting...