Reading Variables - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

<!-- AWP_Enum_Ref Name='<VarName>' Enum='<EnumType>' -->
Creating fragments
<!-- AWP_Start_Fragment Name='<Name>' [Type=<Type>][ID=<id>] -->
Importing fragments
<!-- AWP_Import_Fragment Name='<Name>' -->
11.6.2.1

Reading variables

User-defined Web pages can read variables (PLC tags) from the CPU.
Syntax
:=<Varname>:
Parameters
<Varname>
Examples
:="Conveyor_speed"::="My_Data_Block".flag1:
:=I0.0:
:=MW100:
Example reading an aliased variable
<!-- AWP_Out_Variable Name='flag1' Use='"My_Data_Block".flag1' -->
:=flag1:
Note
Defining alias names for PLC tags and data block tags is described in the topic Using an
alias for a variable reference (Page 634).
If a tag name or data block name includes special characters, you must use additional
quotation marks or escape characters as described in the topic Handling tag names that
contain special characters (Page 639).
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
The variable to be read, which can be a PLC tag name from your STEP 7 program,
a data block tag, I/O, or addressable memory. For memory or I/O addresses or
alias names (Page 639), do not use quotation marks around the tag name. For
PLC tags, use double quotation marks around the tag name. For data block tags,
enclose the block name only in double quotation marks. The tag name is outside of
the quotation marks. Note that you use the data block name and not a data block
number.
Web server
11.6 User-defined Web pages
629

Advertisement

Table of Contents
loading

Table of Contents