banner

Siemens PLC Operational Principle

Jun 13, 2023

operational principle

 

After the PLC is put into operation, its working process is generally divided into three stages, namely input sampling, user program execution, and output refresh. Completing the above three stages is called a scanning cycle. During the entire operation period, the CPU of the PLC repeatedly executes the above three stages at a certain scanning speed.

 

 

 

Collapse input sampling

 

In the input sampling stage, the PLC sequentially reads in all input states and data in a scanning manner, and stores them in the corresponding units in the I/O image area. After the input sampling is completed, it enters the user program execution and output refresh phase. In these two stages, even if the input state and data change, the state and data of the corresponding units in the I/O image area will not change. Therefore, if the input is a pulse signal, the width of the pulse signal must be greater than one scanning cycle to ensure that the input can be read in any case.

 

 

 

Collapse User Program Execution

 

During the execution phase of the user program, the PLC always scans the user program (ladder diagram) in a top-down order. When scanning each ladder diagram, always scan the control circuit composed of each contact on the left side of the ladder diagram first, and perform logical operations on the control circuit composed of the contacts in the order of left to right, top to bottom. Then, based on the results of the logical operations, refresh the corresponding bit status of the logical coil in the system RAM storage area; Or refresh the state of the corresponding bit of the output coil in the I/O image area; Or determine whether to execute the special functional instructions specified in the ladder diagram.

 

 

 

That is, during the execution of the user program, only the state and data of the input points in the I/O image area will not change, while the state and data of other output points and software devices in the I/O image area or system RAM storage area may change. Moreover, the program execution results of the ladder diagram listed above will affect the ladder diagram below that uses these coils or data; On the contrary, in the ladder diagram below, the status or data of the refreshed logic coil can only be applied to the program above it in the next scanning cycle.

 

 

 

Collapse Output Refresh

 

After scanning the user program, the PLC enters the output refresh stage. During this period, the CPU refreshes all output latch circuits according to the corresponding state and data in the I/O image area, and then drives the corresponding peripheral devices through the output circuit. At this point, it is the true output of the PLC.

 

 

 

The same number of ladder diagrams, with different order of arrangement, result in different execution results. In addition, there are differences between the results of scanning user programs and the results of hard logic parallel operation of relay control devices. Of course, if the time occupied by the scanning cycle can be ignored for the entire run, then there is no difference between the two.

Need Help? Chat with us

leave a message
For any request of information or technical support, fill in the form. All fields marked with an asterisk* are required.
Submit
Looking for Service?
Contact us #
+8617665179102

Our hours

Mon 11/21 - Wed 11/23: 9 AM - 8 PM
Thu 11/24: closed - Happy Thanksgiving!
Fri 11/25: 8 AM - 10 PM
Sat 11/26 - Sun 11/27: 10 AM - 9 PM
(all hours are Eastern Time)      

home

products

whatsApp

Contact Us