Siemens v1.0 Wartungshandbuch Seite 42

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 202
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 41
Simple example
2.4 Create program
STEP 7 Basic V10.5
42 Getting Started, 12/2009, A5E02651459-01
2.4.6 What are tags?
Introduction
In the previous step you have inserted three LAD instructions into the first network of the
organization block "Main [OB1]". In the next section you will interconnect these instructions
with PLC tags. The PLC tags are used to supply the instructions with values and the
instructions are executed depending on these values.
In the following section you will learn more about the general function of tags in user
programs.
Tags
A tag is a variable used in the program that can take on different values. Depending on the
range of application, the tags are divided into the following categories:
Local tags: Local tags apply only in the block in which they are defined.
PLC tags: PLC tags apply throughout the entire PLC.
Most instructions in the program operate with tags. When you assign a tag to an instruction,
the instruction is executed with the values of the specified tag.
The tags are managed centrally in the TIA Portal. It makes no difference if you create a PLC
tag in the program editor or in the PLC tag table. If the tag is used at several points in the
program or in the HMI screen, the changes to the tag are taken over immediately in all
editors.
Benefits of tags
Tags have the advantage that they can centrally change an addressing used in the program.
Without the symbolic addressing by tags, an addressing that is used again and again in the
user program would have to be changed at several points in the program each time the
configuration of the PLC inputs and outputs changes.
PLC tags
A PLC tag is made up of the following components:
Name (e.g. CONVEYOR_ON): The name of a tag is valid for a PLC and may only occur
once within the entire program and this particular PLC.
Data type (e.g. BOOL): The data type defines the value representation and the permitted
value range. By selecting the BOOL data type, for example, you specify that a tag can
accept only the binary values "0" and "1".
Address (e.g. M 3.1): The address of a tag is absolute and defines the memory area from
which the tag reads or writes a value. Examples of possible memory areas are inputs,
outputs and bit memories.
You can use the memory areas inputs (I) and outputs (Q) to address the process image.
Seitenansicht 41
1 2 ... 37 38 39 40 41 42 43 44 45 46 47 ... 201 202

Kommentare zu diesen Handbüchern

Keine Kommentare