TagWriteValue Function

Help Contents


Writes a value to a tag using the WriteValue Tag Command.

Functions and Function Blocks

The TagWriteValue Function is intended for use in an Operator Action. Operator Actions run in response to user input gestures in the Operator Interface. In an Operator Action, code execution is suspended until the function completes.

To write a value from a Program Tag, running on the SCADA Server, use the TagWriteValueFB Function Block.


Informal Syntax:

TagWriteValue( TagName, Value )

Formal Syntax:

        Value:=Expression )


TagNameANY_STRINGThe full name of the tag.
ValueANYThe value to write to the tag.

Return Value



The TagWriteValue Function sends the WriteValue Tag Command to the database tag.


  1. Sends the WriteValue Tag Command to the tag "Storage.StartPump" with the value TRUE.
    TagWriteValue( %"Storage.StartPump.FullName", TRUE );

Further Information

WriteValue Tag Command

To learn about the WriteValue Tag Command.

TagWriteValueFB Function Block

To learn how to write a value to a tag from a Program Tag.

Operator Actions

To learn where you can use this function.

Structured Text Function Call

To learn about calling a function from IEC 61131-3 structured text.

IEC 61131-3 Expressions

To learn about the different types of expression to use as function parameters.


For the meaning of terms used in Fernhill SCADA.