Applies To:
  • CitectSCADA 5.xx
  • CitectHMI 5.xx

I have two projects A and B and I have included Project A in Project B and also Project B in Project A. This is because I have templates defined in one project and pages based on this template in the other. At compile time I get the following non-descriptive error message:

Error message when compiling any project, say Project A:
" FATAL Error: C:\....\USER\Pr_B\INCLUDE. File Does Not Exist."

The Online Help states the following:
NOTE: If you have project A that includes project B, you can still have project B including A, without causing any side effects.

So why can't I compile?

Currently the Online help incorrectly states that Citect supports circular references. Earlier versions of Citect did support this. The help will be modified to read: "You should not define circular references. That is, if Project A includes Project B then you should not include Project A in Project B. Instead, create a third project which includes both A and B."

The above situation can be avoided by good project design. If you intend to use Included projects you must plan accordingly. Due to the added complexity I would suggest you only consider using Includes under the following circumstances:

1. You have a very large plant with geographically or functionally discrete areas where you intend to run smaller projects, but want to have them included together at some central control/monitoring stations.
2. You are planning on using a Distributed Server Model and having Global Clients which can connect to each cluster.
3. You have a very large system with geographically or functionally discrete areas and plan to split the project development up into these areas.
4. You are an OEM or Integrator who has cookie cutter applications and you want to reuse a large number of project elements (eg templates, genies, symbols, cicode) in many projects.

In each of the above scenarios, similar rules will apply. Refer to the online help topic "Configuring Projects for Distributed Servers" for more information. Here is an extract:

In order for the Global Client to function correctly, some care must be taken when the various projects are configured. A typical system would consist of:

1 a Global Include Project
2 a Cluster Project for each cluster
3 a Global Display Project

The Global Include Project

The Global Include Project exists purely to be included in each of the Cluster Projects. It would contain Cicode functions, fonts, devices, users, groups, and global keyboard commands.

Cluster Projects

All Cluster Projects must be included in the Global Display Project. Each Cluster Project would contain the following information for its cluster:

I/O Servers
Alarms and Alarm Categories
I/O Devices
Genies and Super Genies

Because all Cluster Projects are included in the Global Display Project, Tag names, I/O Device names etc. must be unique for each cluster. For example, you cannot have an I/O device named IODev_1 in each Cluster Project.

The Cluster Projects will each be compiled and run from a Display Client in the relevant cluster. So Cluster Project A will be run from a Display Client in Cluster A, and so on.

The Global Display Project

The Global Display Project would be compiled and run from the Global Client. It would contain a single startup page, and would include each of the Cluster Projects. The startup page could contain a number of buttons for switching to various pages from each of the clusters (using the ClusterSetName() function).

If you are not using clustering then the Main Project (aka Global Display Project) may include some definitions of its own such as reports, users and and devices. The following spreadsheet acts as a useful summary and guideline, for this latter scenario.

Also note, that IO Drivers which are record based, for example OPC,DDE,STEEPLE,SIXNET, may not function correctly if tags are defined in Include Projects. There is a fix in V5.21 Service Pack G to enable Include support for OPC tags, however the documentation for this must be read carefully as there are still some configurations which are not supported. Ensure you test/verify IO communications with your proposed architecture early in the development cycle.

Also note that there are limitations on editing Users at runtime which are defined in Include Projects. For example, it is not possible to change their passwords at runtime. New Users added at runtime will be added to the Main projects Users database. Refer to KB article Q2497 for more information.