TextDocGetValue Function

Help Contents

Introduction

The TextDocGetValue Function creates a TextDocument from a string parameter.

Informal Syntax:

TextDocGetValue( DocumentId, Selector)

Formal Syntax:

TextDocGetValue( DocumentId:=Expression, Selector:=Expression )

Parameters

The TextDocGetValue Function has these parameters:

Parameter Type Description
DocumentId DINT The identifier of the TextDocument object.
Selector ANY_STRING A Text Selector defining what part of the document to retrieve.

Return Value

The TextDocGetValue function returns any elementary type.

Use a Type Conversion Cast to convert the generic return value to the type you require.

Examples

  1. Retrieve an integer value from a location in a CSV document:
    Value := TO_INT( TextDocGetValue( DocumentID, 'CSV(B4)' ) )
  2. Retrieve an string value from a location in a JSON document:
    Value := TO_STRING( TextDocGetValue( DocumentID, 'JSONata(data[3].Level)' ) )

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.