Pragma Compiler Directives

Help Contents

Introduction

A Pragma is an implementation defined compiler directive. Fernhill SCADA supports these directives:

Pragma DirectiveDescription
{Use "Library"} Allows one script file to reference another. For example:
{Use "Library.Calculations"}
This directive will reference the variables, functions, function blocks and programs declared in "Library.Calculations"
{GenericVariables} Allows a Variable Declaration to use a Generic Data Type. For example:
{ GenericVariables }
VAR_GLOBAL
    Value : ANY_ELEMENTARY;
END_VAR
{AutoTypeConversion} Disables strict type checking. Allows a value of one type to be assigned to a variable of another type without the need for a Type Cast. For example:
{ GenericVariables }
VAR_GLOBAL
    Value : DINT;
END_VAR

Value := '1';

Remarks

If you need multiple pragma directives, separate each one with a comma. For example:

{ Use "Library.Calculations", GenericVariables }

Standards Compliance

Table 3a.1 - IEC 61131-3 Second Edition.

Table 4.1 - IEC 61131-3 Third Edition.

Further Information

Common Elements

To learn about other IEC 61131-3 Common Elements.

Glossary

For the meaning of terms used in Fernhill SCADA.