In the SIEMENS S7-300/400 series PLC in a variety of blocks, as shown (in the manager right click a blank area on the right), are: organization blocks (OB), Function Block (FB), function (FC), data blocks (DB) and the system functions (SFC) and system function blocks (SFB) and so on. Note: The shortcut menu in the other two: data types and variables table. Data type (UDT) is used to specify the size of program data elements and format; variable table (VAT) is used to debug and run the program and monitor variables to modify the content (in the address bar enter the address, the symbol column will automatically shows the definition in the symbol table symbol). This block features several brief description is as follows: 500)this.width =500" border =0> Say > That: Call block: OB, FB, FC (except OB block can call other programs outside the block); Called block: FB, FC, SFB, SFC. 1, OB tissue OB called automatically by the system, and block the implementation of user programs written in OB, so OB s basic role is to call the user program. Programming block in the OB maximum capacity, S7-300 is 16KB, S7-400 is 64KB. In addition to the main program loop OB1, other OB are interrupted by the events triggered. 2, the function FC function FC has two roles: (1) as a routine use; (2) as a function of use, function, usually with a shape parameter. Function in the process of maximum capacity, S7-300 is 16KB, S7-400 is 64KB. FC s formal parameters is often referred to as Interface Zone, parameter types are divided into input parameters, output parameters, input / output parameters and temporary data area. FC in the preparation of the output function parameters should be avoided there is no direct output (otherwise, output a random value may affect the process of judging). Can be the beginning of the function will clear the output parameter word 0, bit output parameter reset. "Times New Roman"> 3, function block FB FB compared with FC, FB each call must be assigned a background block, used to store the interface data area (TEMP types excluded) and the operation of intermediate data. Other programs can directly use the background data area data. FB in the process of maximum capacity, S7-300 is 16KB, S7-400 is 64KB. FB FC interface zone more than a static data area (STAT), used to store intermediate variables. program called FB, the formal parameters must be assigned as unlike FC, you can directly assign a background block. as FB with background data block, the output parameter does not output a random value, you can not write the initialization procedure FB. 4, the data block DB DB used to store user data and process the intermediate variables, as global variables. DB s maximum capacity, S7-300 is 32KB, S7-400 is 64KB. DB can be divided into shared data block (Share DB), the background data block (Instance DB) and user-defined data (UDT) types of data blocks. ????? shared data blocks all programs can be used as global variables, under the conditions allowed by the CPU, aA program can create any number of DB, the maximum capacity of each DB 64KB. default conditions, the sharing of data blocks for the power-down to maintain, in its properties menu, select "Non Retain" data loss can be changed to brown. such as the CPU, not enough to save the data of internal storage space, the data can be saved to the specified shared data block. Stored in the shared data block data block can be any one other call (global variable). And background data block that is different from the background data block can only be designated function block (FB) using the background data stored in the data block can only be effective in this function block. ????? background data blocks associated with the FB and SFB, is also a global variable. Background data blocks and shared data blocks when compared with FB or SFB Save interface data area (Temp) related data. Background data block has a more specific block of data, known as multiple background data block. Multiple background data about the usage of block and notice, see "How to use multiple background data block." ????? UDT data block is based on global variables, providing a fixed format data structure, user-friendly. 5, the system function (SFC) and system function blocks (SFB) SFC and SFB integrated in the CPU, the equivalent of the system provided for the user program calls the FC or FB, and the CPU to achieve some of the features related to the system, such as the CPU clock to read and write functions. SFB need to call the background data block.