SetTag or SetTagWait?
The SetTag retrieval distributes a write job without waiting for confirmation from the AS.
The SetTagWait retrieval distributes a write job and waits for confirmation from the AS. This
always includes the send and return path through the coupling and the response time of the
AS. During this runtime, the processing of the C actions is blocked and the time required for
the retrieval cannot be estimated. If multiple tags are written, the time is added.
A SetTagWait call is set to guarantee that the value has been written before the C-Action is
processed any further. The SetTagWait call in cyclic C actions is to be avoided.
Note
The difference between GetTag and GetTagWait also exists for internal tags. The difference
is
not quite so serious here however, since no coupling comes into play. To synchronize fast
write/read procedures, the respective wait function is to be used with internal tags as well.
Various examples are offered for the function descriptions. For functions with a similar syntax,
a selected function is used as a template in the example. This example must be adapted as
well.
3.3.5.2 get
Functionality of the GetTag functions
GetTagXXX
By calling the function the tag is logged on and, from that moment, polled cyclically from the
AS. The cycle for the registration depends on the trigger (see following description). For
GetTagXXX
calls, the value that is available in WinCC is sent. For Close Picture, the tag actions
are ended again.
The call is marked by the following:
● The value is read from the tag image by WinCC.
● The call is faster in comparison to GetTagXXXWait (except for the first call which generally
takes longer because the value from the PLC must be read out and logged on).
ANSI-C function descriptions
3.3 Internal functions
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
1355