Calling A Code Block From Another Code Block; Easy-To-Use Programming Languages; Ladder Logic (Lad) - Siemens SIMATIC S7-1200 Manual

Easy book
Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents

Advertisement

Programming made easy

6.2 Easy-to-use programming languages

6.1.6

Calling a code block from another code block

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.
94
You can easily have any code block (OB,
FB, or FC) in your user program call an FB
or FC in your CPU.
Manual, 03/2014, A5E02486774-AF
Easy Book

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents