Programs and Calculations

Introduction

Certain tag types allow you to define a calculation or program. For example the value of a Calculated Analog Data Tag is defined using an IEC 61131-3 Expression.

The configuration tool provides a Text Editor to edit calculations and programs.

A program in the text editor:

Text editor showing a program

Finding and Correcting Code Errors

When you save a program or calculation, Fernhill SCADA will try and compile the code into a running program or calculation. Any errors will be reported in the Status Monitor Window:

Tag status window showing a program error

Errors in the code are highlighted using a dotted red underline. For example "CalculatedValues" is underlined showing the location of the error:

Program error shown with dotted red underline

Moving the cursor over the error will display a tooltip window giving more detail of the error:

Program error shown with dotted red underline

Watching Program Variables

To watch program variables as the program executes:

  1. Right click anywhere in the text editor window.
  2. Select Watch global variables.

Further Information

Text Editor Commands

For information about the commands supported by the text editor.

Fernhill SCADA Configuration Tool

To learn about the Fernhill SCADA Configuration Tool.

Glossary

For definitions of the terms used in Fernhill SCADA.