Miscellaneous workbench features, Build project, Definitions – Rockwell Automation T6200 Compressor Anti-Surge and Capacity Controller User Manual

Page 136: Cross references

Advertising
background image

Configuration

8-16

Miscellaneous Workbench Features

Build Project

Press this button in the main window or press F7 key to build the project. When managing or editing programs, F7 key
is also available.

The project must be built (compiled) before it is simulated or downloaded to the target.
The compiler runs in a separate window where compiling messages are reported. If compiling
errors occur, just double click on an error message for opening the corresponding program at the
appropriate location. The compiler also provide commands to:

- "Clean" the project: This command deletes all files created during the last compiling.
- Set the compiling options

You can setup the compiling options by using the "Build / Compiling Options" menu command.

Definitions

The compiler supports the definition of aliases. An alias is a unique identifier that can be used in
programs to replace another text. Definitions are typically used for replacing a constant expression
and ease the maintenance of programs.

Three levels of definitions are provided:
- common to all the projects installed on your machine
- global to all programs of a project
- local to one program

Common and global definitions can edited from the "Tools" menu of the STRATON main
window. Local definitions can be edited from the "Tools" menu of program editors.

Definitions are entered in a text editor. Each definition must be entered on one line of text
according to the following syntax:
#define Identifier Equivalence (* comments *)

Below are some examples:

#define

OFF FALSE

(* redefinition of FALSE constant *)

#define

PI 3.14

(* numerical constant *)

#define

ALARM (bLevel > 100)

(* complex expression *)

You can use a definition within the contents of another definition. The definition used in the other
one must be declared first. Below is an example:

#define

PI 3.14

#define

TWOPI (PI * 2.0)

Note:
The use of definitions may disturb the program monitoring and make error reports more complex.
It is recommended to restrict the use of definitions to simple expressions that have no risk to lead
to a misunderstanding when reading or debugging a program.

Cross references

The Cross Reference tool enables you searching for declared variables in the whole application. It
can also be used as a powerful navigation tool for editing changes in the application programs.

Advertising