Do you really know PLC?
As a user of PLC products, do you really know PLC? As a product user, understanding the working principle and characteristics of the product is very helpful to the use of the product.Xiaobian as the PLC product developers, for you to introduce the working principle of the product.
When the PLC is put into operation, its working process is generally divided into three stages, namely input sampling, user program execution and output refresh. The completion of these three phases is called a scan cycle. During the entire run, the programmable logic controller's CPU repeats the above three stages at a certain scan rate.
Input sampling
During the input sampling phase, the programmable logic controller reads all input states and data in sequence in a scan mode and stores them into the corresponding cells in the I/O image area. After the input sampling is completed, it is transferred to the user program execution and output refresh stage. In both phases, the state and data of the corresponding cell in the I/O map remain unchanged even if the input state and data change. Therefore, if the input is an impulse signal, the width of the impulse signal must be greater than one scan cycle to ensure that the input can be read in any case.
User program execution
During the execution of the user program, the PLC always scans the user program (ladder diagram) from top to bottom. When scanning each ladder diagram, and always scan ladder diagram on the left side of the control circuit, composed of various contact and press the left right after the first, after the first order of composed of contact control circuit logic operations, and then according to the result of logic operation, refresh the logic coil in the system RAM memory area corresponds to a state; Or refresh the state of the corresponding bit of the output coil in the I/O image region; Or to determine whether special functional instructions specified in the ladder diagram are to be executed.
Namely, in the execution of a user program, the only input point in the I/O image in the state and the data will not change, while the other dots and soft devices in the I/O image area or the state of system RAM memory area and the data are likely to change, and in the ladder diagram above, the program execution results to row below those who use these coils or data of ladder diagram work; In contrast, the status or data of the logic coil being refreshed in the lower trapezoid diagram can only be applied to the program placed above it until the next scan cycle.
If immediate I/O instructions are used during program execution, I/O points can be accessed directly. Even if the I/O instruction is used, the value of the input process image register will not be updated. The program values directly from the I/O module, and the output process image register will be updated immediately, which is different from the input immediately.
The output refresh
When the scan user program is finished, the PLC enters the output refresh phase. During this period, the CPU refreshes all output latching circuits according to the corresponding state and data in the I/O image region, and then drives the corresponding peripheral through the output circuit. This is the real output of the programmable logic controller.
summary
According to the above process description, the characteristics of PLC working process can be summarized as follows: [5]
(1) PLC using centralized sampling, centralized output of the working mode, this way to reduce the impact of external interference.
The working process of PLC is the cycle scanning process, cycle scanning time depends on the length of the command execution speed, user program and other factors.
(3) the output of the input has a lag phenomenon. PLC adopts the working mode of centralized sampling and centralized output. When the sampling stage is over, the change of input state will not be received until the next sampling cycle, so the length of the lag time mainly depends on the length of the cycle. In addition, the factors affecting the lag time include input filtering time, output circuit lag time and so on.
(4) The contents of the output image register depend on the result of the scanning execution of the user program.
(5) The content of the output latch is determined by the data in the output image register during the last output refresh.
(6) The current actual output state of the output latch.
The selection of guangcheng technology PLC has the following characteristics :
(1) high reliability.
(2) easy programming.
(3) flexible configuration.
(4) complete input/output function modules.
(5) easy installation.
(6) fast operation speed.
Your choice is our greatest support and encouragement.
When the PLC is put into operation, its working process is generally divided into three stages, namely input sampling, user program execution and output refresh. The completion of these three phases is called a scan cycle. During the entire run, the programmable logic controller's CPU repeats the above three stages at a certain scan rate.
Input sampling
During the input sampling phase, the programmable logic controller reads all input states and data in sequence in a scan mode and stores them into the corresponding cells in the I/O image area. After the input sampling is completed, it is transferred to the user program execution and output refresh stage. In both phases, the state and data of the corresponding cell in the I/O map remain unchanged even if the input state and data change. Therefore, if the input is an impulse signal, the width of the impulse signal must be greater than one scan cycle to ensure that the input can be read in any case.
User program execution
During the execution of the user program, the PLC always scans the user program (ladder diagram) from top to bottom. When scanning each ladder diagram, and always scan ladder diagram on the left side of the control circuit, composed of various contact and press the left right after the first, after the first order of composed of contact control circuit logic operations, and then according to the result of logic operation, refresh the logic coil in the system RAM memory area corresponds to a state; Or refresh the state of the corresponding bit of the output coil in the I/O image region; Or to determine whether special functional instructions specified in the ladder diagram are to be executed.
Namely, in the execution of a user program, the only input point in the I/O image in the state and the data will not change, while the other dots and soft devices in the I/O image area or the state of system RAM memory area and the data are likely to change, and in the ladder diagram above, the program execution results to row below those who use these coils or data of ladder diagram work; In contrast, the status or data of the logic coil being refreshed in the lower trapezoid diagram can only be applied to the program placed above it until the next scan cycle.
If immediate I/O instructions are used during program execution, I/O points can be accessed directly. Even if the I/O instruction is used, the value of the input process image register will not be updated. The program values directly from the I/O module, and the output process image register will be updated immediately, which is different from the input immediately.
The output refresh
When the scan user program is finished, the PLC enters the output refresh phase. During this period, the CPU refreshes all output latching circuits according to the corresponding state and data in the I/O image region, and then drives the corresponding peripheral through the output circuit. This is the real output of the programmable logic controller.
summary
According to the above process description, the characteristics of PLC working process can be summarized as follows: [5]
(1) PLC using centralized sampling, centralized output of the working mode, this way to reduce the impact of external interference.
The working process of PLC is the cycle scanning process, cycle scanning time depends on the length of the command execution speed, user program and other factors.
(3) the output of the input has a lag phenomenon. PLC adopts the working mode of centralized sampling and centralized output. When the sampling stage is over, the change of input state will not be received until the next sampling cycle, so the length of the lag time mainly depends on the length of the cycle. In addition, the factors affecting the lag time include input filtering time, output circuit lag time and so on.
(4) The contents of the output image register depend on the result of the scanning execution of the user program.
(5) The content of the output latch is determined by the data in the output image register during the last output refresh.
(6) The current actual output state of the output latch.
The selection of guangcheng technology PLC has the following characteristics :
(1) high reliability.
(2) easy programming.
(3) flexible configuration.
(4) complete input/output function modules.
(5) easy installation.
(6) fast operation speed.
Your choice is our greatest support and encouragement.