TagWrite - Write tag command


The TagWrite function block sends a Write command to a tag. A Write command is typically used on a write register block to immediately write its values to the target device.


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

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


For the meaning of terms used in Fernhill SCADA.