Server.SetOPCValue

The SetOPCValue function is a server function that allows a script to write a value to the database.

Syntax

Server.SetOPCValue (Tag, Value)

Description

The SetOPCValue server function allows a script to write a value to an object property referenced by tag.

Arguments

Tag {string}

Defines the location of the database item to which the value is being written.

Value {variant}

The value defines the value that is written to the database.

Returns

None.

Example:

sDesc = InputBox ("Enter the New High High Desc")

Server.SetOPCValue ".AI1.HighHighDesc", sDesc

Where:

  • sDesc = InputBox ("Enter the New High High Desc") instructs the script to display an Input Box that has the message "Enter the New High High Desc". sDesc is the name of the variable that is used to store the value that is entered in the input box.
  • Server.SetOPCValue ".AI1.HighHighDesc", sDesc instructs the script to write the value that is stored in the sDesc variable (entered in the input field by the user) to the HighHighDesc configuration field of the 'AI1' point.

Disclaimer

Geo SCADA Expert 2019