Siemens Fitness Equipment TOA portal module 040-020 Manuale Utente
Industry Sector, IA&DT
SCE Training Curriculum
Page 11 of 30
To be used only at Educational and R&D Facilities
TIA Portal Module 040-020, Edition 03/2013
Unrestricted / © Siemens AG 2013. All Rights Reserved
SCE_EN_040-020_R1209_Startup Programming in High-Level Languages with S7-SCL and SIMATIC S7-300
The interface parameters for the 'calculate_tankcontent [FC140] block used in our sample program are
as follows.
Interface of the function FC140:
calculate_tankcontent
Type
Name
Data type
Comment
IN
Fill level
REAL
in meters
IN
Diameter
REAL
in meters
OUT
Content
REAL
in liters
The function call in a block programmed in FBD appears as follows.
Function call: Representation in FBD
4.5
Note on solution
The formula for calculating the volume of an upright cylinder is used to solve the task. The conversion
factor 1000 is used to calculate the result in liters.
h
*
4
d
V
2
=>
1000
f
14159
.
3
4
2
diameter
content
level
ill
FC140
calculate_tankcontent
Fill level:
REAL
Diameter:
REAL
REAL :content