TagWriteValueQuality - Write value and quality tag command

Introduction

The TagWriteValueQuality function block sends a WriteValueQuality command to a tag. A WriteValueQuality command is typically used with internal tags to write both a value and quality value to the tag.

Parameters

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

Once the WriteValueQuality 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.