Industry Sector, IA&DT
5.4Expanding the program
Next, we will check whether faulty information is contained in the input parameters of the
'calculate_tankcontent' block. Another value 'high_max' is also passed to the block. This indicates the height of the tank.
The block is now to analyze whether the
If there is an error, the Boolean output parameter 'er' should return TRUE and the value of the 'Content' parameter should be
Expanding the assignment list / tag table:
Address | Symbol | Data type | Comment |
%Q1.7 | Error bit | BOOL | Error, unable to perform calculation |
Expansion of the interface of the function FC140: | calculate_tankcontent | |||
Type | Symbol | Data type | Comment |
|
IN | high_max | REAL | in meters |
|
OUT | er | REAL | er = 1, there is an error, content = |
Function call: Representation in FBD
FC140
calculate_tankcontent
Fill level: | REAL |
high_max: REAL
Diameter: REAL
BOOL :er
REAL :content
SCE Training Curriculum | Page 26 of 30 | To be used only at Educational and R&D Facilities |
TIA Portal Module |
| Unrestricted / © Siemens AG 2013. All Rights Reserved |
| ||
|
|
|