TagForceValue Function

Help Contents

Introduction

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.

Syntax

Informal Syntax:

TagForceValue( TagName, Value )

Formal Syntax:

TagForceValue( 
        TagName:=Expression, 
        Value:=Expression )

Parameters

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

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

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

Return Value

None.

Examples

Forces the value of tag "Storage.StartPump" to FALSE using the ForceValue Tag Command.

TagForceValue( "Storage.StartPump", FALSE );

Further Information

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.

Glossary

For the meaning of terms used in Fernhill SCADA.