TextDocFromURL Function Block

Help Contents

Introduction

The TextDocFromURL Function Block creates a TextDocument object from a file downloaded from a URL.

Parameters

Parameter Type Direction Description
REQ BOOL R_EDGE Input A rising edge triggers the start of the file download.
URL STRING Input The URL to download the file from.
TIMEOUT TIME Input The maximum time allowed to download the file from the URL. If not declared, the timeout defaults to 30 seconds (T#30s).
OPTIONS STRING Input The options to apply to the file download. See URL Options for a description of the format of this parameter.
BUSY BOOL Output Set to TRUE while the configuration change is in progress.
DOCUMENTID UDINT Output The identifier of the TextDocument Object. Note: This value is only valid while the DONE output parameter is TRUE.
DONE BOOL Output Set to TRUE for 1 execution after the configuration change has completed.
ERROR BOOL Output Set to TRUE if there was an error executing the configuration change.
ERRORMSG WSTRING Output If ERROR is TRUE, the reason why the configuration change failed.

Remarks

Once the function block starts, additional requests from the input signal REQ are ignored until the configuration change 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 configuration change is in progress. The DONE signal is TRUE for 1 execution after the completion of the configuration change.

The TextDocFromURL Function Block is only available to IEC 61131-3 code in an IEC 61131-3 Program Tag.

Examples

Further Information

TextDocument Functions

For information about functions to manage TextDocument data objects.

Data Objects

For information about all Data Objects supported by Fernhill SCADA.

IEC 61131-3

To learn how IEC 61131-3 is used in Fernhill SCADA.

Glossary

For the meaning of terms used in Fernhill SCADA.