Industry Sector, IA&DT
4.Example Task Tank Content
4.1Description of task
Our first program is one to program the calculate the content of tank.
The tank has the shape of an upright cylinder. The fill level of the content is measured by an analog sensor. In the task, the value of the fill level should already existed standardized in the meter unit.
A function FC 140 'calculate_tank content' is to be programmed in the program. The diameter and the fill level in meter unit are the passed parameters. Result is the tank content in the liter unit.
4.2Assignment list / tag table
Because modern programming uses tags and not absolute addresses, the global PLC tags must be defined here.
These global PLC tags are descriptive names with a comment for each input and output used in the program. The global PLC tags can then be accessed later during programming via their names. These global tags can be used in all blocks anywhere in the program.
Default tag table |
|
|
|
Name | Data type | Address | Comment |
FillLevel_tank1 | REAL | %MD40 | in meters |
Diameter_tank1 | REAL | %MD44 | in meters |
Content_tank1 | REAL | %MD48 | in liters |
SCE Training Curriculum | Page 8 of 30 | To be used only at Educational and R&D Facilities |
TIA Portal Module |
| Unrestricted / © Siemens AG 2013. All Rights Reserved |
| ||
|
|
|