发表于:2007/9/12 13:15:00
#10楼
查了一下西门子的资料:
Process-Image Input/Output Tables
If the input (I) and output (Q) address areas are accessed in the user program, the program does not scan the signal states on the digital signal modules but accesses a memory area in the system memory of the CPU and distributed I/Os. This memory area is known as the process image.
Updating the Process Image
The following figure shows the processing steps within a scan cycle.
One of the internal tasks of the operating system (OS) is to read the status of inputs into the process image input table (PII). Once this step is complete, the user program is executed with all blocks that are called in it. The cycle ends with writing the process image output table (PIQ) to the outputs for the modules. Reading in the process image input table and writing the process image output table to the outputs for the modules is all independently controlled by the operating system.
One of the internal tasks of the operating system (OS) is to write the process image output table (PIQ) to the outputs for the modules and to read in the status of inputs into the process image input table (PII). Once this step is complete, the user program is executed with all blocks that are called in it. Writing the process image output table to the outputs for the modules and reading in the process image input table is all independently controlled by the operating system.
Advantages of the Process Image
Compared with direct access to the input/output modules, the main advantage of accessing the process image is that the CPU has a consistent image of the process signals for the duration of one program cycle. If a signal state on an input module changes while the program is being executed, the signal state in the process image is retained until the process image is updated again in the next cycle. The process of repeatedly scanning an input signal within a user program ensures that consistent input information is always available.
Access to the process image also requires far less time than direct access to the signal modules since the process image is located in the internal memory of the CPU.
Part Process Images (Process-Image Partitions)
In addition to having the process image (process-image input table, PII, and process-image output table, PIQ) automatically updated by the operating system, you can assign parameters to a maximum of 15 partial process images for an S7-400 CPU (CPU-specific, no. 1 to no. 15, see the S7-400, M7-400 Programmable Controllers Module Specifications Reference Manual). This means that you can update sections of the process-image table, when necessary, independently of the cyclic updating of the process image table.
Each input/output address that you assign with STEP 7 to a process-image partition no longer belongs to the OB1 process-image input/output tables. Input and output address can only be assigned once through the OB 1 process image and all process-image partitions.
You define process-image partition with STEP 7 when you assign addresses (which input/output addresses of the modules are listed in which process-image partition). The process-image partition is updated either by the user with SFCs or automatically by the system by connecting to an OB.
Exception: Process image partitions for synchronous cycle interrupt OBs are not updated on the system side, even though they are linked to an OB (OB 61 to OB 64).
Process-Image Input/Output Tables
If the input (I) and output (Q) address areas are accessed in the user program, the program does not scan the signal states on the digital signal modules but accesses a memory area in the system memory of the CPU and distributed I/Os. This memory area is known as the process image.
Updating the Process Image
The following figure shows the processing steps within a scan cycle.
One of the internal tasks of the operating system (OS) is to read the status of inputs into the process image input table (PII). Once this step is complete, the user program is executed with all blocks that are called in it. The cycle ends with writing the process image output table (PIQ) to the outputs for the modules. Reading in the process image input table and writing the process image output table to the outputs for the modules is all independently controlled by the operating system.
One of the internal tasks of the operating system (OS) is to write the process image output table (PIQ) to the outputs for the modules and to read in the status of inputs into the process image input table (PII). Once this step is complete, the user program is executed with all blocks that are called in it. Writing the process image output table to the outputs for the modules and reading in the process image input table is all independently controlled by the operating system.
Advantages of the Process Image
Compared with direct access to the input/output modules, the main advantage of accessing the process image is that the CPU has a consistent image of the process signals for the duration of one program cycle. If a signal state on an input module changes while the program is being executed, the signal state in the process image is retained until the process image is updated again in the next cycle. The process of repeatedly scanning an input signal within a user program ensures that consistent input information is always available.
Access to the process image also requires far less time than direct access to the signal modules since the process image is located in the internal memory of the CPU.
Part Process Images (Process-Image Partitions)
In addition to having the process image (process-image input table, PII, and process-image output table, PIQ) automatically updated by the operating system, you can assign parameters to a maximum of 15 partial process images for an S7-400 CPU (CPU-specific, no. 1 to no. 15, see the S7-400, M7-400 Programmable Controllers Module Specifications Reference Manual). This means that you can update sections of the process-image table, when necessary, independently of the cyclic updating of the process image table.
Each input/output address that you assign with STEP 7 to a process-image partition no longer belongs to the OB1 process-image input/output tables. Input and output address can only be assigned once through the OB 1 process image and all process-image partitions.
You define process-image partition with STEP 7 when you assign addresses (which input/output addresses of the modules are listed in which process-image partition). The process-image partition is updated either by the user with SFCs or automatically by the system by connecting to an OB.
Exception: Process image partitions for synchronous cycle interrupt OBs are not updated on the system side, even though they are linked to an OB (OB 61 to OB 64).