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 |
| Unrestricted / © Siemens AG 2013. All Rights Reserved |
| ||
|
|
|