Siemens TOA portal module 040-020 manual Interface of the function FC140 Calculatetankcontent

Page 11

Industry Sector, IA&DT

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

FC140

calculate_tankcontent

Fill level:

REAL

Diameter: REAL

REAL :content

4.5Note 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.

 

d2

 

 

diameter

2

 

V =

 

∙ π * h

=>

content =

 

 

∙ 3.14159 ∙ fill level ∙1000

4

4

 

 

 

 

 

 

 

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

 

 

 

 

Image 11
Contents TIA Portal Module Suitable SCE trainer packages for these training curriculums Industry Sector, IA&DT Requirements Learning objectiveRequired hardware and software Industry Sector, IA&DT Debugger S7-SCL for S7-300/400Editor / compiler Assignment list / tag table Default tag tableDescription of task Program structure Structure of the tank content sample taskType Designation Function Interface of the block calculatetankcontent FC140Function call Representation in FBD Interface of the function FC140 CalculatetankcontentCreating a project and configuring hardware Industry Sector, IA&DT Industry Sector, IA&DT Industry Sector, IA&DT Creating a program Industry Sector, IA&DT Diagram Industry Sector, IA&DT Industry Sector, IA&DT Industry Sector, IA&DT Industry Sector, IA&DT Test program Industry Sector, IA&DT Mode on. → Expanding the assignment list / tag table Expanding the programIndustry Sector, IA&DT Industry Sector, IA&DT Industry Sector, IA&DT Industry Sector, IA&DT