Skip to main content
Version: v4 (Stable)

CreateTag

CreateTag(TagId AS String[, TagValue AS String/Double/Boolean/Integer[, nType As Integer]]) AS Integer

Creates or updates a tag designed by the string identifier <TagId>.

If the tag does not exist, it is created with the value <TagValue>. If it exists, its value is updated with <TagValue>.

The optional parameter <nType> defines the type of link:

  • 0 (by default): DDE or other
  • 1: OPC DA
  • 2: Driver

Returns an error code (0 if no error).