TagForceValue Function

Help Contents


Forces the value of the tag to a fixed constant value using the ForceValue Tag Command.

Functions and Function Blocks

The TagForceValue 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.

If you want to force the value of a tag from a Program Tag, running on the SCADA Server, use the TagForceValueFB Function Block.


Informal Syntax:

TagForceValue( TagName, Value )

Formal Syntax:

        Value:=Expression )


TagNameANY_STRINGThe full name of the tag.
ValueANY_ELEMENTARYThe new forced value of the tag.

Return Value



The TagForceValue Function sends the ForceValue Tag Command to the database tag.

The user must have the Force privilege for the database tag.


  1. Forces the value of tag "Storage.StartPump" to FALSE using the ForceValue Tag Command:
    TagForceValue( %"Storage.StartPump.FullName", FALSE );

Further Information

TagRemoveForce Function

To learn about the function to remove a force from a tag.

ForceValue Tag Command

To learn about the ForceValue Tag Command.

TagForceValueFB Function Block

To learn how to force a tag value 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.