syntax
Expression.Read([Readmode])
Expression
Necessary. An expression which returns a tag object. The return value of the Read method is
the value of the tag read out.
Parameters
The optional "Readmode" parameter enables the distinction between two types of reading:
Parameters Description
0 The tag value is read from the process image
(cache). 0 is the default value.
1 The value of a tag is read directly from AS or
channel (direct).
If the "Readmode" parameter is omitted, the value is read from the process image by default.
The return value of the Read method is the tag value read out as VARIANT.
Reading From the Process Image
When reading from the process image, the tag is logged on and, from that moment, polled
cyclically from the PLC. The login cycle is dependent on the configured trigger. The value is
read from the tag image by WinCC. For Close Picture, the tag actions are ended again. The
call is characterized by the following:
● The value is read by WinCC from the tag image.
● The call is faster in comparison to direct reading (except with the first call: The first call
basically takes longer because the value from the PLC must be read out and logged on.)
● The duration of the call is not dependent on the bus load or AS.
Behavior in actions with a tag trigger
All of the tags contained in the tag trigger are already known with Open Picture and are
registered with the defined monitoring time. Since all tags are requested at once, the best
possible optimization can be targeted from the channel. If a tag, contained in the trigger, is
requested with Read during an action, the value already exists and is transferred directly to
the
call. If a tag is requested which is not contained in the trigger, the behavior is the same as
with a standard trigger.
Behavior in actions with a cyclic trigger
tags are registered with half of the cycle time with the first call. For every other call, the value
is present.
VBS for Creating Procedures and Actions
1.14 VBS Reference
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
699