Siemens 6AV6651-7KA01-3AA4 - S7-1200 + KTP400 Basic Starter Kit 6AV6651-7KA01-3AA4 사용자 설명서

제품 코드
6AV6651-7KA01-3AA4
다운로드
페이지 364
Programming made easy 
 
6.1 Easy to design your user program 
 
Easy Book 
88
 
Manual, 03/2014, A5E02486774-AF 
 
 
Calling block (or interrupted block) 
Called FB or BC (or interrupting OB) 
  Program execution 
  Instruction (or interrupting event) that initiates 
the execution of another block 
  Program execution 
  Block end (returns to calling block) 
You can nest the block calls for a more modular structure. In the following example, the 
nesting depth is 3: the program cycle OB plus 3 layers of calls to code blocks. 
 
 
  Start of cycle 
  Nesting depth 
 
 
By creating generic code blocks that can be reused within the user program, you can simplify 
the design and implementation of the user program.  
●  You can create reusable blocks of code for standard tasks, such as for controlling a pump 
or a motor. You can also store these generic code blocks in a library that can be used by 
different applications or solutions. 
●  When you structure the user program into modular components that relate to functional 
tasks, the design of your program can be easier to understand and to manage. The 
modular components not only help to standardize the program design but can also help 
to make updating or modifying the program code quicker and easier. 
●  Creating modular components simplifies the debugging of your program. By structuring 
the complete program as a set of modular program segments, you can test the 
functionality of each code block as it is developed. 
●  Utilizing a modular design that relates to specific functional tasks can reduce the time 
required for the commissioning of the completed application.