SetTagValue
SetTagValue(TagId As String/Integer, Value As String/Double/Boolean/Integer[, Quality As Integer[, Time As Time]]) As Integer
Sets the value of the tag defined by <TagId>. <TagId> can be the numeric object Id of the tag or its alphanumeric identifier depending on the type of the parameter (Integer or String).
The <Value> parameter contains the value to be written.
The <Quality> optional parameter defines the quality of the value:
- 0 = good quality (default)
- 1 = bad quality
- 2 = sensor failure
- 3 = not connected
The <Time> optional parameter provides the source time (current time by default).
Returns an error code (0 if no error, 6 if invalid tag Id).