hit counter script

Siemens SIMATIC S7 System Manual page 502

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

104BWeb server
11.3 User-defined web pages
Parameters
<Varname>
<EnumType>
The scope of an enum type reference is the current fragment.
Example declaration
<!-- AWP_Enum_Ref Name='"Alarm"' Enum="AlarmEnum" -->
Example usage in a variable read
<!-- AWP_Enum_Def Name='AlarmEnum' Values='0:"No alarms", 1:"Tank is
full", 2:"Tank is empty"' -->
<!-- AWP_Enum_Ref Name='"Alarm"' Enum="AlarmEnum" -->
...
<p>The current value of "Alarm" is :="Alarm":</p>
If the value of "Alarm" in the CPU is 2, the HTML page displays 'The current value of "Alarm"
is Tank is empty' because the enum type definion (Page 501) assigns the text string "Tank is
empty" to the numerical value 2.
Example usage in a variable write
<!-- AWP_In_Variable Name='"Alarm"' -->
<!-- AWP_Enum_Def Name='AlarmEnum' Values='0:"No alarms", 1:"Tank is
full", 2:"Tank is empty"' -->
<!-- AWP_Enum_Ref Name='"Alarm"' Enum='AlarmEnum' -->
...
<form method="POST">
<p><input type="hidden" name='"Alarm"' value="Tank is full" /></p>
<p><input type="submit" value='Set Tank is full' /><p>
</form>
Because the enum type defintion (Page 501) assigns "Tank is full" to the numerical value 1,
the value 1 is written to the PLC tag named "Alarm" in the CPU.
Note that the Name clause in the AWP_In_Variable declaration must correspond exactly to
the Name clause in the AWP_Enum_Ref declaration.
Example usage in a variable write with use of an alias
<!-- AWP_In_Variable Name='"Alarm"'
Use='"Data_block_4".Motor1.Alarm'-->
<!-- AWP_Enum_Def Name='AlarmEnum' Values='0:"No alarms", 1:"Tank is
full", 2:"Tank is empty"' -->
<!-- AWP_Enum_Ref Name='"Alarm"' Enum='AlarmEnum' -->
...
502
Name of PLC tag or data block tag to associate with the enum type, or the name of
the alias name for a PLC tag (Page 500) if declared.
Varname must be enclosed in single quotation marks. Within the single quotes, use
double quotation marks around a PLC tag or data block name. Note that for data
block tags, you use the name of the block and not a data block number. The data
block name is within the double quotes but not the data block tag name.
Name of the enumerated type, which must be enclosed in single or double
quotation marks
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents

Save PDF