2014年8月24日星期日

The working principle of PLC user program execution stage

When the PLC into operation, their work is generally divided into three stages, namely the input sample, a user program execution and output refresh three stages. Completion of the three phases is called a scan cycle. During the entire operation, PLC's CPU to a scanning speed of repeating the above three phases. User program execution stage In the user program execution stage, PLC always sequentially from top to bottom in order to scan the user program (ladder). When scanning each ladder, and always scan the ladder to the left of the control line by the contact form, and then first left and right, the first order under the control of the line formed by the contact logic operation , then according to the results of plc analog io modules, refresh the logic coil corresponding bit in the system RAM storage area status; or refresh the output coil corresponding bit in the plc analog io modules image area of ​​the state; or to determine whether to execute the ladder Special function instructions provided. That is, during the execution of the user program, the only entry point will not change in the status and data plc analog io modules mapped area, while the other output point and soft devices plc digital io module image area or system RAM storage area The status and data are likely to change, and came in above the ladder, the program execution results came in below who will use these data ladder coil or work; contrary, ranked below the ladder, it is refreshed logic coil state or data can only scan to the next ranked above it on the program work.

没有评论:

发表评论