Global Bindings Editor

Help Contents

Introduction

Global Bindings is common IEC 61131-3 code available for use by other IEC 61131-3 properties.

Using Global Bindings you can:

Features that Use Global Bindings

These features use global bindings:

FeatureExample
Graphic Editor The Graphic Editor uses global bindings for:
  • Declaring common code for use by graphic items.
  • A Main Program Unit that is executed at the binding refresh rate.
  • Declaring parameter values passed to an embedded graphic.
Toolbar Editor The Toolbar Editor uses global bindings to declare common code for use by toolbar buttons.

Editing Global Bindings

To edit global bindings:

  1. Select the Global Properties Tool Global Properties Tool in the toolbar.
  2. In the Properties Window select the GlobalBindings field.
  3. Click the Browse button Property browse button to open the global bindings text editor.
  4. Edit the global bindings text.
  5. Press OK to confirm the changes.

Note: If there are syntax errors in the Global Bindings Code, the editor will not accept the changes when you press the OK button. Either correct the errors, or press the Cancel button to cancel the changes.

Autocomplete

When the Global Bindings Editor is open, press Ctrl+Spacebar to open the autocomplete list to provide suggestions depending on the context:

Autocomplete menu

Depending on the context, the autocomplete list shows a list of types, variables and functions.

To select an item from the autocomplete list, do one of the following:

To insert the autocomplete reference into the code, do one of the following:

Finding and Locating Errors

Errors in Global Bindings are highlighted in the editor using a dashed red underline:

Global bindings showing syntax error

Note: If you move the cursor near the error, a tooltip will be displayed providing an explanation of the error.

Finding more Subtle Errors

The Global Binding Editor will not accept code with obvious syntax errors. It is still possible to enter code with more subtle semantic errors. To find and locate additional errors:

  1. Switch to the Code Errors tab of the Status Monitor Window:
    Status views showing code errors

    Note: The above message shows an error in the global bindings of the 'Graphic' tag.

  2. Click on the link to the error. The Configuration Tool will select the property in the Properties Window which contains the error:
    Properties window showing error

    Note: The property with the error is shown with red text.

  3. Click the Browse button Property browse button to open the global bindings text editor:
    Global bindings showing semantic error

    Note: If you move the cursor near the error, a tooltip will be displayed providing an explanation of the error.

Further Information

Graphic Editor

For information on using the graphic page editor.

Toolbar Editor

For information on using the operator toolbar editor.

Properties Window

For information about editing properties of items using the Properties Window.

Glossary

For the meaning of terms used in Fernhill SCADA.