Function Block Diagram (Fbd); Scl - Siemens S7-1200 System Manual

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

Advertisement

6.5.2

Function Block Diagram (FBD)

Like LAD, FBD is also a graphical programming language. The representation of the logic is
based on the graphical logic symbols used in Boolean algebra.
Mathematical functions and other complex functions can be represented directly in
conjunction with the logic boxes.
STEP 7 does not limit the number of instructions (rows and columns) in an FBD network.
6.5.3

SCL

Structured Control Language (SCL) is a high-level, PASCAL-based programming language
for the SIMATIC S7 CPUs. SCL supports the block structure of STEP 7 (Page 172). Your
project can include program blocks in any of the three programming languages: SCL, LAD,
and FBD.
SCL instructions use standard programming operators, such as for assignment (:=),
mathematical functions (+ for addition, - for subtraction, * for multiplication, and / for division).
SCL also uses standard PASCAL program control operations, such as IF-THEN-ELSE,
CASE, REPEAT-UNTIL, GOTO and RETURN. You can use any PASCAL reference for
syntactical elements of the SCL programming language. Many of the other instructions for
SCL, such as timers and counters, match the LAD and FBD instructions. For more
information about specific instructions, refer to the specific instructions in the chapters for
Basic instructions (Page 203) and Extended instructions (Page 283).
You can designate any type of block (OB, FB, or FC) to use the SCL programming language
at the time you create the block. STEP 7 provides an SCL program editor that includes the
following elements:
● Interface section for defining the parameters of the code block
● Code section for the program code
● Instruction tree that contains the SCL instructions supported by the CPU
You enter the SCL code for your instruction directly in the code section. The editor includes
buttons for common code constructs and comments. For more complex instructions, simply
drag the SCL instructions from the instruction tree and drop them into your program. You can
also use any text editor to create an SCL program and then import that file into STEP 7.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Programming concepts
6.5 Programming language
To create the logic for complex operations,
insert parallel branches between the boxes.
181

Advertisement

Table of Contents
loading

Table of Contents