Siemens 6AV6651-7KA01-3AA4 - S7-1200 + KTP400 Basic Starter Kit 6AV6651-7KA01-3AA4 User Manual

Product codes
6AV6651-7KA01-3AA4
Page of 364
Programming made easy 
 
6.2 Easy-to-use programming languages 
 
Easy Book 
94
 
Manual, 03/2014, A5E02486774-AF 
6.1.6 
Calling a code block from another code block 
 
 
You can easily have any code block (OB, 
FB, or FC) in your user program call an FB 
or FC in your CPU.  
1.  Open the code block that will call the other block. 
2.  In the project tree, select the code block to be called. 
3.  Drag the block to the selected network to create a call to the code block. 
 
 
 
Note 
Your user program cannot call an OB because OBs are event-driven (Page 55). The CPU 
starts the execution of the OB in response to receiving an event. 
 
6.2 
Easy-to-use programming languages 
STEP 7 provides the following standard programming languages for S7-1200: 
●  LAD (ladder logic) is a graphical programming language. The representation is based on 
circuit diagrams. 
●  FBD (Function Block Diagram) is a programming language that is based on the graphical 
logic symbols used in Boolean algebra. 
●  SCL (structured control language) is a text-based, high-level programming language. 
When you create a code block, you select the programming language to be used by that 
block.  
Your user program can utilize code blocks created in any or all of the programming 
languages.  
6.2.1 
Ladder logic (LAD) 
The elements of a circuit diagram, such as normally closed and normally open contacts, and 
coils are linked to form networks.