Page 26

Petruzella_ProgrammableLogicControllers__5e

Input module Input device Processor memory Data O:4/7 O:4/7 I:3/6 I:3/6 I:3/6 O:4/7 Figure 5-11  Scan process applied to a single rung program. 80 Chapter 5  Basics of PLC Programming any input devices changes when the processor is in step 2 or 3, the output condition will not react to them until the next processor scan. Each instruction entered into a program requires a certain amount of time for the instruction to be executed. The amount of time required depends on the instruction. For example, it takes less time for a processor to read the status of an input contact than it does to read the accumulated value of a timer or counter. The time taken to scan the user program is also dependent on the clock frequency of the microprocessor system. The higher the clock frequency, the faster is the scan rate. Typical processor clock frequencies range between 1 to 10 MHz. There are two basic scan patterns that different PLC manufacturers use to accomplish the scan function • The processor then sets the output image table bit O:4/7 to 1. • The processor turns on output O:4/7 during the next I/O scan, and the output device (light) wired to this terminal becomes energized. • This process is repeated as long as the processor is in the RUN mode. • If the input device opens, electrical continuity is lost, and a 0 would be placed in the input image table. As a result, the rung is said to be FALSE due to loss of logic continuity. • The processor would then set the output image table bit O:4/7 to 0, causing the output device to turn off. Ladder programs process inputs at the beginning of a scan and outputs at the end of a scan, as illustrated in Figure 5-12. For each rung executed, the PLC processor will: Step 1  Update the input image table by sensing the voltage of the input terminals. Based on the absence or presence of a voltage, a 0 or a 1 is stored into the memory bit location designated for a particular input terminal. Step 2  Solve the ladder logic in order to determine logical continuity. The processor scans the ladder program and evaluates the logical continuity of each rung by referring to the input image table to see if the input conditions are met. If the conditions controlling an output are met, the processor immediately writes a 1 in its memory location, indicating that the output will be turned ON; conversely, if the conditions are not met a 0 indicating that the device will be turned OFF is written into its memory location. Step 3  The final step of the scan process is to update the actual states of the output devices by transferring the output table results to the output module, thereby switching the connected output devices ON (1) or OFF (0). If the status of Output device Input image table file Output image table file Output module Program Field-device power supply Field-device power supply Input image table 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 START END 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 Output image table Step 1 Read input module Step 2 Solve the ladder program Step 3 Transfer to output module Figure 5-12  Scan process applied to a multiple rung program.


Petruzella_ProgrammableLogicControllers__5e
To see the actual publication please follow the link above