Almost all programmable logic controllers (PLCs) worldwide handle scanning in the same way. First, the CPU reads the physical inputs into a memory table, usually called the "input table." This table is then used as the program is evaluated. There are different types of registers that are used in different platforms; these registers are updated as the logic is processed left to right on each rung and top to bottom within each routine. This includes updating an output table, which will later be used to drive the physical devices connected to the PLC. The program might call different subroutines for different purposes; order can be important. Depending on where memory registers and output tables are updated, the physical outputs could be delayed by up to two scans. In either case, the program meanders through different routines as they are called before returning to wherever they were called from and eventually ends up at the end of the original cyclic routine. Most programs use an initial cyclic routine used to call all other routines. Some programs run periodically instead of continuously. Most use a continuous program that runs as fast as it can.
展开▼