Professional Documents
Culture Documents
Micro1 05E PLC-Tags
Micro1 05E PLC-Tags
Micro1 05E PLC-Tags
Contents 5
5. PLC Tags ................................................................................................................. 5-2
5.1. Absolute and Symbolic Addressing ...................................................................................... 5-3
5.2. PLC Tag Table ...................................................................................................................... 5-4
5.3. PLC Tags in the Device View ............................................................................................... 5-6
5.4. Import/Export PLC Tags ....................................................................................................... 5-7
5.5. Details View of Tags / Modules............................................................................................. 5-8
5.6. Finding / Replacing / Sorting PLC Tags ................................................................................ 5-9
5.7. Error Indication in the PLC Tag Table ................................................................................ 5-10
5.8. Using a Tag as an Operand ................................................................................................ 5-11
5.9. Renaming / Rewiring Tags.................................................................................................. 5-12
5.10. Monitoring PLC Tags .......................................................................................................... 5-13
5.11. HMI Tag Access .................................................................................................................. 5-14
5.12. Retentive PLC Tags ............................................................................................................ 5-15
5.13. Exercise 1: Copying the PLC Tags of the Conveyor Model from the Global Library.......... 5-16
5.14. Exercise 2: Completing the PLC Tags of the Conveyor Model .......................................... 5-17
5.15. Exercise 3: Monitoring the PLC Tags of the Conveyor Model ............................................ 5-18
5. PLC Tags
Properties
If a block or the PLC tag table is open in the working area and a tag is selected (highlighted)
there, then all details are displayed in the "Properties" tab in the Inspector window where they can
also be edited.
User Constants
A constant defines an unchangeable data value. During program execution, constants can be
read by various program elements, but they cannot be overwritten. Changing the constant value
while the program is running is not possible.
In TIA Portal, it is possible to declare symbolic names for constants so as to make static values
available in the program under one name. These symbolic constants are valid throughout the
CPU. The declaration of the constants is made in the "User constants" tab of the PLC tag table.
System Constants
Every hardware object, for example, a module or even transfer areas of I-Devices, has a
hardware ID which is automatically assigned by STEP 7 during the configuration of a hardware
component.
In S7-1500 and even in S7-1200, these hardware IDs have the same function as the diagnostic
addresses of hardware components in the S7-300/400. Even when the I/O addresses of modules
are changed, their hardware ID remains the same. When I/O addresses are changed, the
instructions that were addressed through a hardware ID do not have to be adjusted.
The PLC tags of inputs and outputs can also be declared and changed in the Device view.
Select the
Data block
Select the
Hardware module
Select the Tag table
Finding / Replacing
In the PLC tag table, tags can be found and replaced via the "Tasks" task card. Dummies can
also be used (? for one character, * for several characters).
Sorting
By clicking on one of the column names "Name", "Data type" or "Address", the tags are sorted
alphabetically or according to address (ascending or descending) depending on the column.
!!!
The absolute address does not
correspond to the data type of the tag!
Syntax Check
With every entry, there is a syntax check in which existing errors are displayed in RED, or for
warnings in YELLOW. A still faulty PLC tag table can be saved but as long as it is still faulty, the
program cannot be compiled and downloaded into the CPU.
Automatic symbol
selection
Symbol Selection
When operands are selected, after the first letter of an operand name has been entered, a
selection of all the operands whose name start with the entered letter and are of the
corresponding data type is displayed. All the operands that are valid for this block are displayed.
These are all global tags (also those that are declared in data blocks), local tags (temporary and
static) as well as the parameters of the block.
In the first column of the symbol selection, either the symbol or the absolute operand can be
displayed.
1xR
• Rename:
Change the tag name, while the absolute address remains unchanged.
• Rewire:
Change the associated absolute address, while the name remains unchanged.
Monitoring On / Off
PLC tags
HMI tags
• "Visible in HMI":
During HMI configuration, only PLC tags with the attribute "Visible in HMI" can be selected.
This filter function can, however, be disabled in the selection dialog shown by activating
"Show all".
• "Accessible from HMI":
The HMI device can only access the PLC tags which have the attribute "Accessible from HMI"
online. This protective function ensures that the HMI device does not overwrite certain tags.
Tags which are not "Accessible from HMI" are accordingly also not "Visible in HMI".
Task
A prepared table with PLC tags is to be copied from the global library "Micro1_Lib" into your own
project.
What to Do
1. Switch to the Project view
2. In the "Global libraries", open the library <Drive>:\S7_Courses\Archives\Micro1_Lib
3. Using drag & drop, copy the object "PLC_Tags" from the global library "Micro1_Lib" into your
own project in the folder ‘PLC tags’.
"P_Horn"
"K_Right" (Q 8.5)"B_Bay1" "B_Bay2"" B_Bay3" "B_LB" (Q 8.7)
"K_Left" (Q 8.6) (I 8.5) (I 8.6) (I 8.7) (I 8.0)
Task:
Complete the PLC tags copied in the last exercise with the Input and Output tags for the conveyor
model shown below.
"P_Horn"
"K_Right" (Q 8.5) "B_Bay1" "B_Bay2""B_Bay3" "B_LB" (Q 8.7)
"K_Left" (Q 8.6) (I 8.5) (I 8.6) (I 8.7) (I 8.0)
Task:
Monitor the PLC tags and in doing so check the wiring of the conveyor model inputs.
What to Do:
1. Open the PLC tag table
2. On the conveyor model, press the pushbutton / proximity sensor and check in the table
whether the signal arrives at the correct input.