Upload
vikram-anand
View
230
Download
0
Embed Size (px)
Citation preview
8/9/2019 10_Working With SCL
1/16
Date: 16.01.2014File:ST-PCS7SY1_scl.1
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
Creating New Blocks with SCL
SFCCFC
SCL
WIN CC
Database
Y2
V5
V4
V3
0000.0 MBAR P4
0000.0 MBAR P5
0000.0 MBAR P6
0000.0 MBAR
P1
INERTGAS
ABLUFT1
ABLUFT2
ABLUFT3V6
V1Y1
V2
MBAR PC
%A1
0000.0
Reaktor01
0000.0
%
000.0
%
000.0
0000.0
produkt
M1
R1
0000
0000
F1
L i b r a r y
8/9/2019 10_Working With SCL
2/16
Date: 16.01.2014File:ST-PCS7SY1_scl.2
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
Overview
High-level languagefor defining ownfunction blocks
PASCAL-typesyntax, thereforevery powerful
Compiler anddebugger aresystem components
Definition of the block name, theinput parameters and outputparameters, including the defaultvalues
Algorithm description instructured text
Block compilation and debugging
Inserting into the existing block library
Using the block in the CFC Editor
SCL
8/9/2019 10_Working With SCL
3/16
Date: 16.01.2014File:ST-PCS7SY1_scl.3
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
User Block: Structures
Block type
Block attribute
VAR_INPUT
VAR_OUPUT
VAR_IN_OUT
VAR
VAR_TEMP
Algorithm
IFCASE
FORWHILEREPEAT
CONTINUEEXITGOTORETURN
FBFCOBDBUDT
?
8/9/2019 10_Working With SCL
4/16
Date: 16.01.2014File:ST-PCS7SY1_scl.4
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
Demonstration: Arithmetic Block
ARIT
Arithmetic block
R X2
R X1 Y R
• SCL source
• Templates
• Variable declaration
• Algorithm
•
Compile + Load• Test
R X3
8/9/2019 10_Working With SCL
5/16
Date: 16.01.2014File:ST-PCS7SY1_scl.5
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
Menu Insert
-> Block Template
OBFBFCCommentConstantParameter DBInstance DBDB Referencing UDTUDT
-> Control Structure
IFCASEFORWHILEREPEAT
8/9/2019 10_Working With SCL
6/16
Date: 16.01.2014File:ST-PCS7SY1_scl.6
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
Menü Einfügen
8/9/2019 10_Working With SCL
7/16
8/9/2019 10_Working With SCL
8/16
Date: 16.01.2014File:ST-PCS7SY1_scl.8
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
8/9/2019 10_Working With SCL
9/16
Date: 16.01.2014File:ST-PCS7SY1_scl.9
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
Compiler and Debugger
Project
S7 station
CPU
S7 program
Sources
Blocks
SCL
1. Edit block.
2. Compile.
3. Load in the CPU.
Symbols
4. Debug.
8/9/2019 10_Working With SCL
10/16
Date: 16.01.2014File:ST-PCS7SY1_scl.10
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
Appendix: Source Texts
Simulation blockREACTOR
•
8/9/2019 10_Working With SCL
11/16
Date: 16.01.2014File:ST-PCS7SY1_scl.11
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
8/9/2019 10_Working With SCL
12/16
Date: 16.01.2014File:ST-PCS7SY1_scl.12
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
8/9/2019 10_Working With SCL
13/16
Date: 16.01.2014File:ST-PCS7SY1_scl.13
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
8/9/2019 10_Working With SCL
14/16
Date: 16.01.2014File:ST-PCS7SY1_scl.14
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
8/9/2019 10_Working With SCL
15/16
Date: 16.01.2014File:ST-PCS7SY1_scl.15
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training
8/9/2019 10_Working With SCL
16/16
Date: 16.01.2014File:ST-PCS7SY1_scl.16
SIMATIC PCS 7Siemens AG 2001. All rights reserved.
SITRAIN
Siemens Automation and Drives Training