TagWriteValue - Write value tag command

Introduction

The TagWriteValue function block sends a WriteValue command to a tag. If the tag is associated with an external device or data source, the WriteValue command will be sent to the external device or data source.

Parameters

ParameterTypeDirectionDescription
REQBOOL R_EDGEInputA rising edge starts the WriteValue command.
TAGNAMESTRINGInputThe name of the tag to send the WriteValue command to.
VALUEANYInputThe value to write to the tag.
BUSYBOOLOutputSet to true while the WriteValue command is in progress.
DONEBOOLOutputSet to true for 1 execution after the WriteValue command has completed.
ERRORBOOLOutputSet to TRUE if the WriteValue command failed.
ERRORMSGWSTRINGOutputIf ERROR is TRUE, the reason why the WriteValue command failed.

Once the WriteValue command begins, additional requests from the input signal REQ are ignored until the tag command completes.

These timing diagrams show the relationship of the REQ, BUSY, DONE, and ERROR signals processing two requests. The first request completes with an error, the second request completes normally:

        +--------+     +-+ +------+
  REQ   |        |     | | |      |
      --+        +-----+ +-+      +------

        +------+       +------+
 BUSY   |      |       |      |
      --+      +-------+      +----------

               ++             ++
 DONE          ||             ||
      ---------++-------------++---------

               +-------+
ERROR          |       |
      ---------+       +-----------------

The BUSY signal is TRUE while the tag command is in progress. The DONE signal is TRUE for 1 execution after the completion of the tag command.

Further Information

Tag Command Function Blocks

To learn about other tag command function blocks.

Elementary Data Types

To learn about the different types supported by Fernhill SCADA.

Common Elements

To learn about other IEC 61131-3 Common Elements.

Glossary

For definitions of the terms used in Fernhill SCADA.