Applies To:
  • CitectSCADA
  • CitectHMI

Summary:
I have placed system parameters in my Parameters database in my TOP level project, however they are showing different results than expected in Runtime.
 

Solution:
This is due to the order of precedence that CitectSCADA uses with regards to the location of the include projects as well as the Citect.ini parameters. 

It is important to observe the order of precedence that CitectSCADA recognizes when reading a parameter.
CitectSCADA will first look into the Citect.ini file for a specified parameter. If the parameter setting exists in the citect.ini it will take precedence regardless of the parameters specified in the Parameters database, and the value in the Citect.ini file will be used during runtime.

If the Citect.ini has no parameter setting then the value used will be the value specified in the lowest level include project. This means that it will then ignore any value placed in the top level projects at Runtime in favour of the lowest level include project which has the parameter set. Naturally if the parameter is not set anywhere, then the default value for the parameter will be used.

For examle, using the parameter[alarm]saveperiod . The default value is 600. In this example there is a main project and an included sub project with the parameter being set as shown below. The Runtime result column in the table below shows what considers the value to be, for example if the ParameterGet("alarm", "saveperiod", 600) cicode was used.

 
 
 Citect.ini
 
Main
Project
 Include
Project
 Runtime
Value
None  None  None  600
None  300  None  300
 None  None  400  400
 None  300      400      400
 500         300         400      500
 600
(default)
 300  400  600

Note: The default value used in the cicode function ParameteGet() is purely for its local use. 
If a user specifies a different default value for a system parameter in ParameteGet() , this has NO affect on the value that CitectSCADA sees at runtime.
 

Keywords:
System Parameters, Citect.ini, Include Projects, Param.dbf, Parameter  

Attachments