Using CitectSCADA > Compiling and Running a Project > Compiling a Project

Compiling a Project

The CitectSCADA compiler brings together elements of your project - the configuration databases, graphics and Cicode files - to create a runtime system.

Compilation checks the project for errors and optimizes your system for fast and efficient operation. The time necessary to compile a project depends on its size and on the speed of your computer. Typically, compiling only takes several minutes.

When the CitectSCADA compiler runs, it normally opens files in exclusive mode. In this mode only CitectSCADA has access to the files (while the compiler is running). This improves the performance of the compiler, but can also result in an incomplete compilation if two people try to compile different projects at the same time, and these projects have one or more Include projects in common. The [General] ShareFiles parameter tells the compiler to open files in shared mode. This option allows shared network users to run the compiler at the same time, but it can increase the time necessary for the compilation.

  

UNINTENDED EQUIPMENT OPERATION

Restart the client process if the hardware alarm "Cicode library timestamp differs" is raised after a page is opened.

Failure to follow these instructions can result in death, serious injury, or equipment damage.

Note: A hardware alarm of "Cicode library timestamp differs" will be raised if the Cicode library used by a page has a different timestamp from the one in memory. The timestamps will be different if the project has been fully recompiled, the project has been incrementally recompiled after the page has been modified, or if the project has been incrementally recompiled after any Cicode has been modified.

To compile a project:

  1. Select the Project Editor.
  2. Click Compile, or choose File | Compile.

The results will be displayed in a dialog when compilation is complete.

The Citect Compiler result dialog reports the number of errors and alerts separately to avoid confusion. A CitectSCADA project can compile successfully even though the compile may generate alerts; however, compile errors prevent a project from compiling successfully.

If there are compile errors, you need to first fix the errors, and then recompile.

CitectSCADA automatically compiles the project (if uncompiled) when you try to run it.

Post Compilation

After a project has compiled successfully you can execute an optional command, script or batch file. This offers useful functionality if you have tasks that could be automated after a successful compile. This provides an expansion point for you to add your own script or command to perform additional tasks. Examples of this would be:

You can also launch an optional command, script or batch file to execute after an unsuccessful compile. Generally this would be used to create a log file to show warnings or errors generated during a compile. To use either of these functions, add the command line containing the command or script to either the [CtEdit]CompileSuccessfulCommand or [CtEdit]CompileUnsuccessfulCommand parameter in the Citect.ini file.

See Also