Basic structure of the modular PLC

S7-300/S7-400 belongs to the modular PLC, main frame, power supply module, CPU module, signal modules, modules, interface module, communications processors, equipment and programming, a variety of module is installed in a rack. Through communication interface in the CPU module or module, on the PLC are connected to the communications network, you can communicate with other computers, PLC or other device.
, The distribution of memory
S7-300 CPU memory is divided into four areas: loading memory, working memory (RAM), system memory and keep the memory area. S7-400 CPU memory can be divided into three areas: loading memory, working memory (RAM), system memory area.
Second, mounted memories
Mounted memories is a programmable module, it can be integrated in RAM or micro memory cards (MMC). S7-400, memory card (RAM or Flash EPROM) can extend the integrated load storage. Because the integrated load storage capacity is limited and requires that you have a memory card. Load memory save program is the role of the instruction block and block of data and system data (configuration, connections, and module parameters, and so on), you can also project the entire configuration data (including symbols and notes) saved in the MMC.
Four, the system storage (RAM)
Store integrated on the CPU of the system, and cannot be extended. It consists of the following memory areas:
Process mapping the input and output tables (PII, PIQ) memory (m) timer (t) counter (c) local stack (l).
Five, the process image I/O input/output table:
In memory of the PLC, setting up an area used to store the State of the input signal and the output signal, they are called the input and output process image process image. PLC ladder diagrams of other programming element also corresponds to the image store. Recycling process, the CPU does not directly access the input and output addresses in I/O modules, but access to the CPU internal process image. Write output stage, CPU to transfer the State of the output process image to the output modules.
Read input stage, PLC input circuits connect/disconnect all external reading input process image. A programming element corresponds to 1 State process image, called the programming element ON, bit is 0 the image State, called the programming element OFF.
Program execution stage, even if the external input signal status changes, enter the status of the process image is not changed, changed the status of the input signal can only be read in the next scan cycle input stages are read.
the advantages of process image
Compared with direct I/O access, provides a consistent image access can process signals image, for circulating the CPU program execution. If the signal on the input module program execution status changes, signals in the process image remains the same until the next cycle when the image was refreshed again. In addition, because the process image is saved in the system storage CPU, access speeds than direct access to the signal module significantly faster.
process image Refresh
Operating system can periodically refresh image.
Six, local data
Local data including: temporary variables, instructions to block startup information, routing parameters, tissue intermediate results
Seven, a temporary variable
When you build the block, you can declare a temporary variable (TEMP). The temporary variable is valid only at the time the block is executed, and then was covered. These local data in fixed length block of each organization. Before starting a read operation, they must be initialized. Each organization requires 20 bytes of local data, for its startup information. Access to local data more quickly than the data access to a data block.
CPU installation can save a temporary variable for the current execution block (partial data) of memory. The size of this storage area depends on the CPU. It is divided into the same amount of space allocated to each priority level, and each level has its own local data area.
Eight, keeping memories
Keep the memory in the S7-300, it is the non-volatile RAM, even if no backup battery is installed, the data will not be lost. Keep the memory effect is: keep the CPU property is set keep the memory option specified inmemory, timers, counters, and block of data.
Nine, memory cards and data retention
When RAM memory card is used, the system must be equipped with a battery. Once the power can rely on batteries to keep the memory card and the internal contents of the RAM. When using the FEPROM (Flash EPROM) memory card, the CPU can be run from the backup battery. User programs stored in the FEPROM in, there is a power failure can be safely kept.
When you remove or insert the memory card, the CPU requires memory reset. When you insert a RAM card, must be programmed by the user program loaded, when inserted into the FEPROM card, executable programs from the memory card (with load memory function) to the working memory. When the program execution memory card must be inserted in the CPU module.
When you modify a program block, modified block stored in the working memory. When uploaded to the block when the programmer, from working memory to the programmer. When a power failure (does not feature a battery), the working memory (RAM) is cleared. To keep a modified block, you need to: 1. When no EPROM memory card, save to your hard drive, 2. As with EPROM memory card, save to your hard drive or memory card. Via the SIMATIC Manager upload memory card blocks (inserted into programming), or PLC-> Download the use menu to write EPROM Memory Card directly on CPU to memory on the CPU card. Memory card must first erase. Individual blocks can be reloaded, but it cannot be deleted or overwritten.