citectscada cicode reference

952
Cicode Reference Guide Citect Pty. Limited 3 Fitzsimons Lane PO Box 174 Pymble NSW 2073 Australia Telephone: 61 2 9496 7300 Fax: 61 2 9496 7399

Upload: michael-adu-boahen

Post on 23-Nov-2015

395 views

Category:

Documents


69 download

DESCRIPTION

code

TRANSCRIPT

  • Cicode Reference Guide

    Citect Pty. Limited

    3 Fitzsimons LanePO Box 174

    Pymble NSW 2073Australia

    Telephone: 61 2 9496 7300Fax: 61 2 9496 7399

  • DISCLAIMERCitect Corporation makes no representations or warranties with respect to this manual and, to the maximum extent permitted by law, expressly limitsits liability for breach of any warranty that may be implied to the replacement of this manual with another. Further, Citect Corporation reserves the rightto revise this publication at any time without incurring an obligation to notify any person of the revision.

    COPYRIGHT Copyright 2004 Citect Corporation. All rights reserved.

    TRADEMARKSCitect Pty. Limited has made every effort to supply trademark information about company names, products and services mentioned in this manual.Trademarks shown below were derived from various sources.

    Citect, CitectHMI, and CitectSCADA are registered trademarks of Citect Corporation.

    IBM, IBM PC and IBM PC AT are registered trademarks of International Business Machines Corporation.

    MS-DOS, Windows, Windows 95, Windows NT, Windows 98, Windows 2000, Windows for Workgroups, LAN Manager, Microsoft Windows XP, Exceland MSMAIL are trademarks of Microsoft Corporation.

    DigiBoard, PC/Xi and Com/Xi are trademarks of DigiBoard.

    Novell, Netware and Netware Lite are registered trademarks of Novell Inc.

    dBASE is a trademark of Borland Inc.

    GENERAL NOTICESome product names used in this manual are used for identification purposes only and may be trademarks of their respective companies.

    July 2004 edition for CitectSCADA Version 6.0

    Manual Revision Version 6.0.

    Printed in Australia.

  • Contents

    Introducing CicodeGetting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Using Cicode Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    Part I Using Cicode

    Chapter 1 Using Cicode CommandsSetting Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Performing Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Using Multiple Command Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Using Include (Text) Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Getting Runtime Operator Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    Chapter 2 Using Cicode ExpressionsUsing Cicode Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Displaying Data Using Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Decision-Making . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Logging Expression Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Triggering Events Using Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    Chapter 3 Using Cicode FunctionsCalling Functions from Commands and Expressions . . . . . . . . . . . . . . . . . . . . . . . . 15Triggering Functions via Runtime Operator Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Evaluating Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Combining Functions with Other Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Passing Data to Functions (Arguments) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Using String Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    String assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Using the Caret Escape Sequence Character . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Using Multiple Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Using Numeric Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Using Variable Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Using Operator Input in Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Returning Data from Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

  • Contentsiv

    Chapter 4 Working with Commonly Used FunctionsAlarm Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Page Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Keyboard Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Report Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Time/date Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Miscellaneous Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    Chapter 5 Writing FunctionsCicode Function Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Function Uses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Writing Groups of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Cicode Function Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Creating a Function Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Pseudocode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Using Comments in Cicode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Using Comments for Debugging Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Following Cicode Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Cicode Function Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    End of line markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Function Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Declaring the Return Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Declaring Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Naming Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Function Argument Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Declaring Argument Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Naming Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Setting Default Values for Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Returning Values from Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

    Chapter 6 Using VariablesDeclaring Variable Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Declaring the Variable Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Naming Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Setting Default Variable Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Using Variable Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Using Database Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

    Chapter 7 Using ArraysDeclaring Array Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Declaring the Array Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Naming Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

  • Contents v

    Declaring the Variable Array Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Setting Default (Initial) Array Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Passing Array Elements as Function Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Using One-dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Using Two-dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Using Three-dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Using Array Elements in Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Using the Table (Array) Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    Chapter 8 Converting and Formatting Cicode VariablesConverting Variable Integers to Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Converting Real Numbers to Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Converting Strings to Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Converting Strings to Real Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Formatting Text Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Escape Sequences (String Formatting Commands) . . . . . . . . . . . . . . . . . . . . . . . . . 60

    Chapter 9 Working with OperatorsUsing Mathematical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Using Bit Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Using Relational Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Using Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Order of Precedence of Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

    Chapter 10 Working with Conditional ExecutorsSetting IF ... THEN Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Using FOR ... DO Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Using WHILE ... DO Conditional Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Nested Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Using the SELECT CASE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

    Chapter 11 Performing Advanced TasksHandling Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73How CitectSCADA Executes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Multitasking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Foreground and background tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Controlling tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Pre-emptive multitasking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

    Chapter 12 Editing and Debugging CodeThe Cicode Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

  • Contentsvi

    Starting the Cicode Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78Changing the default Cicode Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Creating Cicode files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Creating functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Saving files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Opening Cicode files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Deleting Cicode files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Finding text in Cicode files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Compiling Cicode files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Viewing Cicode compile errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

    Cicode Editor Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82Docking the windows and toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

    Displaying the Editor Options Properties dialog . . . . . . . . . . . . . . . . . . . . . . 83Windows and Bars tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

    Viewing Editor windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Option Properties tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Language Formatter Properties tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Debugging Cicode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

    Using debug mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Debugging functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Debugging functions remotely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

    Using breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Inserting or removing breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Enabling/disabling breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

    Stepping through code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

    Chapter 13 Using Cicode Programming StandardsVariable Declaration Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96Variable Scope Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96Variable Naming Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Standards for Constants, Variable Tags, and Labels . . . . . . . . . . . . . . . . . . . . . . . . 97Formatting Simple Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Formatting Executable Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Formatting Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Cicode Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Formatting Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Function Naming Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Modular Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Defensive Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Function Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109Debug Error Trapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

  • Contents vii

    Part II Function Categories

    Chapter 14 Cicode Function CategoriesActiveX Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Alarm Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116Clipboard Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Cluster Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Color Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118Communication Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118DDE Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118Device Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Display Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120DLL Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Error Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Event Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124File Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Form Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125Format Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126FTP Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126FuzzyTech Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Group Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127I/O Device Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127Keyboard Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Mail Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Math/Trigonometry Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Miscellaneous Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Page Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Plot Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Report Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Security Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132SPC Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133SQL Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133String Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134Super Genie Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135Table (Array) Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Task Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Time/Date Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137Trend Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Window Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

  • Contentsviii

    Part III Functions Reference

    Chapter 15 Functions Reference

    Part IV Cicode Errors

    Chapter 16 Cicode ErrorsHardware/Cicode Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737Cicode and General Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737

    Appendix A Citect.ini File Parameters 747Using Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747

    Rules for using parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747Using parameters on a network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748Parameters dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750

    Citect.ini File Parameter Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750Accumulator Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751

    [Accumulator]UpdateTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751[Accumulator]WatchTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751

    Alarm Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751[Alarm]Ack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754[Alarm]AckHold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754[Alarm]Active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754[Alarm]AlarmDisable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755[Alarm]CacheLength . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755[Alarm]DefDspFmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755[Alarm]DefSumFmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756[Alarm]DisplayDisable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756[Alarm]EnableSmartCustomFilters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756[Alarm]EventFmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756[Alarm]EventQue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756[Alarm]ExtendedDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757[Alarm]HardHoldTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757[Alarm]HardReAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757[Alarm]HardwareDisable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757[Alarm]HighResOff. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758[Alarm]Hres24HrDeadBand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758[Alarm]HresType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758[Alarm]HwExclude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759[Alarm]LastAlarmDisplayMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759[Alarm]LastAlarmFmt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759

  • Contents ix

    [Alarm]MaxOptimisedQueries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759[Alarm]Period. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760[Alarm]Primary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760[Alarm]SavePeriod. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760[Alarm]SavePrimary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760[Alarm]SaveSecondary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761[Alarm]SaveStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761[Alarm]ScanTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761[Alarm]Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762[Alarm]SetTimeOnAck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762[Alarm]SetTimeOnOff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763[Alarm]Sort. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763[Alarm]SortMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763[Alarm]StartTimeout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763[Alarm]SummaryLength. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764[Alarm]SummaryMode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764[Alarm]SummarySort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764[Alarm]SummarySortMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765[Alarm]SummaryTimeout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765[Alarm]SummaryTolerance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765[Alarm]SummaryShutdownMode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766[Alarm]SumStartupCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766

    Alarm Logging Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766[AlarmLog]DefaultSearchDays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767[AlarmLog]Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767[AlarmLog]NumFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767

    Animator Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768[Animator]BoldWeight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769[Animator]ButtonCancelMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770[Animator]CacheSize. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770[Animator]ConfigureMouseCommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770[Animator]EatMouseClick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770[Animator]EatMouseFocus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771[Animator]FastDisplay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771[Animator]FlashTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772[Animator]FormFontWidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772[Animator]FullScreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772[Animator]InvalidRegionExpansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772[Animator]InvalidRegionQueueLength. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773[Animator]LibraryError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773[Animator]LibraryLength . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773[Animator]LibraryTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773[Animator]MaxAn. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774[Animator]PrintXScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774[Animator]PrintYScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774

  • Contentsx

    [Animator]TabFactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774[Animator]TemplateUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774[Animator]TooltipFont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775[Animator]UseCTGIfNewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775

    AnmCursor Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776[AnmCursor]Colour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776[AnmCursor]Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777[AnmCursor]InvertText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777[AnmCursor]MouseSnapToCursor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777[AnmCursor]Thickness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778[AnmCursor]Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778

    Backup Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778[Backup]IncludeDBOn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778

    CrashHandler Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778[CrashHandler]Enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778

    LLC (CiNet) Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779[LLC]Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780[LLC]Compress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780[LLC]Delay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780[LLC]MaxPending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780[LLC]PollTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780[LLC]Retry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780[LLC]Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781[LLC]WatchTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781

    Client Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781[Client]Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781[Client]Primary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781[Client]ReadOnly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782[Client]Standby . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782

    Code Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782[Code]AutoReRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784[Code]BackwardCompatibleErrHw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784[Code]DebugMessage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784[Code]DllCallErrorPopup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785[Code]DllCallProtect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785[Code]EchoError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785[Code]Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786[Code]HaltOnError. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786[Code]IgnoreCase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786[Code]Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786[Code]ScaleCheck. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787[Code]Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787[Code]ShutdownTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787[Code]Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787[Code]Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788

  • Contents xi

    [Code]StrictArgumentCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788[Code]Threads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788[Code]TimeData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789[Code]TimeSlice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789[Code]TimeSlicePage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789[Code]Unsigned. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789[Code]VBASupport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789[Code]WriteLocal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790

    Com Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790[Com]StartTimeOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790

    CrashMailer Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791[CrashMailer]Enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791

    CtAPI Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791[CtAPI]Remote. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791[CtAPI]CpuLoadCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792[CtAPI]CpuLoadSleepMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792

    CtCicode Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793[CtCicode]MLCommentThreshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793

    CtDraw.RSC Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793[CtDraw.RSC]BitmapCompression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793[CtDraw.RSC]ColorDepthWarning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794[CtDraw.RSC]PurgeGenieLists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794

    CtEdit Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794[CtEdit]ANSIToOEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795[CtEdit]Backup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796[CtEdit]Bin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796[CtEdit]CompileErrorForm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796[CtEdit]Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796[CtEdit]Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797[CtEdit]DbFiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797[CtEdit]FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797[CtEdit]MaxCicodeFunctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797[CtEdit]MaxFields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798[CtEdit]MaxHelpRec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798[CtEdit]Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798[CtEdit]ShowToolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798[CtEdit]SubtAnValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798[CtEdit]SubtPageValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799[CtEdit]UpdateAnPage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799[CtEdit]UpdateAnPageVer5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799[CtEdit]User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800

    DDE Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800[DDE]Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800

    Debug Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800[Debug]CrashOnError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801

  • Contentsxii

    [Debug]DisableWinTop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802[Debug]DriverCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802[Debug]DrWatson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804[Debug]Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804[Debug]LogShutDown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805[Debug]Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805[Debug]Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805[Debug]Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806[Debug]ShutDownProtect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806[Debug]SysErrDsp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806[Debug]SysLogSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806

    Device Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807[Device]CreateHistoryFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807[Device]DiscardSpoolOnError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808[Device]ForceHistoryOpenMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808[Device]FormLength . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808[Device]LptDosANSIToOEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808[Device]MaxSpool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808[Device]SQLConnectOnStartUp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809[Device]WatchTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809

    Dial Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809[Dial]CacheRefresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810[Dial]CallerIDTimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810[Dial]ConnectionRetries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810[Dial]Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811[Dial]MaxConnectionTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811[Dial]MaxQueueTime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811[Dial]MaxTimeAfterDisconnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811[Dial]ModemRetryDelay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811[Dial]ReadThroughCache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812[Dial]RingCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812[Dial]WatchTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812

    DisableIO Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812[DisableIO] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812[DisableIO] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813

    DiskDrv Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813[DiskDrv]UpDateTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813

    DNS Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813[DNS] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813

    Event Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815[Event]InhibitEvent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815[Event]Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815[Event]Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815[Event]WatchTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816

    Font Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816

  • Contents xiii

    [Font]Echo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816[Font]Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816[Font]General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816[Font]Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817[Font]Prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817

    General Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817[General]AdvancedDDEPoll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819[General]BadOptimise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819[General]BufferIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819[General]CheckAddressBoundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 820[General]CitectRunningCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 820[General]Ctl3D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821[General]DebugInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821[General]DisablePlotSetupForm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821[General]DisableRemoteBlocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821[General]FormatCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822[General]InfoDestroy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822[General]LockDelay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822[General]LockRetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822[General]LongFilename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823[General]OSErrors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823[General]PasswordExpiry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823[General]PointLimitMsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824[General]PrinterColourMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824[General]RegionalNumbersFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824[General]ServerMonitoringPeriod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824[General]ShareFiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825[General]ShowDriverError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825[General]Stack. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825[General]StartDelay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825[General]SymbolicInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826[General]TagDB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826[General]TagStartDigit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826[General]TrnPrinter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 828[General]Verbose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 828

    Internet Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 828[Internet]Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829[Internet]Display. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830[Internet]FTPTimeout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830[Internet]FTPWatchTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830[Internet]IPAddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830[Internet]LogFile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830[Internet]Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830[Internet]Password. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831[Internet]Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831

  • Contentsxiv

    [Internet]Redundancy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831[Internet]RunFTP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832[Internet]SearchCurrentPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832[Internet]Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832[Internet]ShowFileFTPDlg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832[Internet]ShowSetupDlg. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833[Internet]UpdateTime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833[Internet]ZipFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833

    Intl Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834[Intl]bDecimal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834[Intl]iDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834[Intl]iTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835[Intl]s1159 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835[Intl]s2359 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835[Intl]sDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835[Intl]sDecimal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835[Intl]sTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835

    IOServer Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836[IOServer]AlwaysCallStopChannel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837[IOServer]AlwaysCallStopUnit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838[IOServer]AsyncConnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838[IOServer]BlockWrites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838[IOServer]CacheDebug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839[IOServer]CacheIgnoreDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839[IOServer]CacheOptMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839[IOServer]CacheReadAhead. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840[IOServer]CancelTimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840[IOServer]DebugLogTagHandshake . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840[IOServer]HeartTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840[IOServer]HWAlarmOnDeviceDisable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841[IOServer]InitMsg. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841[IOServer]LogTagHandshake . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842[IOServer]MaxTagHandshakeSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842[IOServer]Name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842[IOServer]RedundancyDebug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842[IOServer]SaveFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842[IOServer]SaveNetwork. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842[IOServer]SavePeriod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843[IOServer]SaveTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843[IOServer]Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843[IOServer]TagAddressNoCase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844[IOServer]WatchDog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844[IOServer]WatchDogPrimary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844

    Kernel Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845[Kernel]BufPoolProtect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845

  • Contents xv

    [Kernel]Idle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845[Kernel]Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845[Kernel]Retries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846[Kernel]Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846[Kernel]Watchdog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846[Kernel]WatchdogTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846[Kernel]WinShutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846

    Keyboard Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847[Keyboard]ButtonOnlyLeftClick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847[Keyboard]ButtonRaw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847[Keyboard]EchoPopUp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848[Keyboard]LogExtendedDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848[Keyboard]NonPrint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848[Keyboard]NonPrintChar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848[Keyboard]Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849

    LAN Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849[LAN]BackOffTime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850[LAN] Bridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850[LAN]CancelOnClose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850[LAN]Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851[LAN]Disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851[LAN]GroupName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851[LAN]KillPiggyBackAck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852[LAN]LanA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852[LAN]LocalNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853[LAN]NetBIOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854[LAN]NetTrace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854[LAN]NetTraceBuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854[LAN]NetTraceErr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854[LAN]NetTraceLog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855[LAN]Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855[LAN]Poll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855[LAN]ReadPool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856[LAN]RemoteTimeOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856[LAN]Retry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856[LAN]SendTimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856[LAN]SesRecBuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857[LAN]SesSendBuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857[LAN]Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857[LAN]TCPIP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858[LAN]TimeOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858[LAN]WaitBufTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858[LAN]WritePool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858

    Language Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859[Language]CaseSensitive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859

  • Contentsxvi

    [Language]CharSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860[Language]ClientTranslateFile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860[Language]DisplayError. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861[Language]LocalLanguage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861

    Memory Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862[Memory]Free . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862[Memory]MinPhyK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862[Memory]PageLock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863[Memory]Segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863

    OID Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863[OID]Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863

    Page Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864[Page]Alarm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866[Page]AnmDelay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866[Page]BackgroundColour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867[Page]ComBreak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868[Page]ComBreakText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868[Page]Date. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868[Page]Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869[Page]DelayRenderAdvancedAnimation . . . . . . . . . . . . . . . . . . . . . . . . . . . 869[Page]DelayRenderAll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869[Page]DisabledAlarm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869[Page]DynamicComBreakColour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870[Page]DynamicComBreakDensity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870[Page]DynamicSizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871[Page]HwAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871[Page]InheritParentScale. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872[Page]KeyEcho . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872[Page]LastAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872[Page]MaintainAspectRatio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872[Page]MaxInt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873[Page]MaxLast. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873[Page]MaxRecursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873[Page]MaxStr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873[Page]MenuDisable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873[Page]MenuShutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873[Page]Name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874[Page]Prompt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874[Page]RangeCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874[Page]ScaleTextToMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874[Page]ScanTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875[Page]Startup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875[Page]StartUpCancel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 876[Page]Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 876[Page]Tip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 876

  • Contents xvii

    [Page]TipHelp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 876[Page]TipTimeOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877[Page]Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877[Page]Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877[Page]WinTitle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877

    Path Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877[Path]"PathName" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878

    Privilege Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878[Privilege]Exclusive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878

    Protocol Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878Proxi Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879

    [Proxi] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879RemoteDB Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880

    [RemoteDB]DefaultComment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880[RemoteDB]DefaultEngFull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881[RemoteDB]DefaultEngZero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881[RemoteDB]DefaultEU. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881[RemoteDB]DefaultRawFull. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881[RemoteDB]DefaultRawZero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881

    Report Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882[Report]ComBreak. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882[Report]Disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882[Report]HeartBeat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883[Report]HeartBeatTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883[Report]InhibitEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883[Report]Primary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884[Report]RunStandby . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884[Report]Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884[Report]Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885[Report]WatchTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885

    Server Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885[Server]Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885

    Shutdown Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886[Shutdown]NetworkIgnore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886[Shutdown]NetworkStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886[Shutdown]Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886

    SPC Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887[SPC]AlarmBufferSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888[SPC]XFreak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888[SPC]PartialSubgroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888[SPC]RAboveUCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888[SPC]RBelowLCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889[SPC]ROutsideCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889[SPC]XAboveUCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889[SPC]XBelowLCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889

  • Contentsxvii

    [SPC]XDownTrend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889[SPC]XErratic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890[SPC]XGradualDown. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890[SPC]XGradualUp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890[SPC]XMixture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890[SPC]XOutsideCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890[SPC]XOutsideWL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890[SPC]XStratification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891[SPC]XUptrend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891

    SQL Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891[SQL]QueryTimeout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891[SQL]TextColWidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891

    Time Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892[Time]Deadband . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892[Time]Disable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892[Time]PollTime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892[Time]RTsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893[Time]Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893

    Trend Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893[Trend]AllFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895[Trend]BlockByIODevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896[Trend]BytesReadBeforeSleep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896[Trend]BytesWrittenBeforeSleep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896[Trend]CacheSize0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897[Trend]CacheSize1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897[Trend]CacheSize2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898[Trend]CacheSize3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898[Trend]CacheSize4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 899[Trend]CacheSize5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 899[Trend]CacheSize6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900[Trend]CacheSize7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900[Trend]CacheSize8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 901[Trend]ClientRequestTime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 901[Trend]CopyFilesMessage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902[Trend]CursorColour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902[Trend]DeleteIfIncompatible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903[Trend]Disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903[Trend]EnableBackfill. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903[Trend]FileNameType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903[Trend]GapFillMode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904[Trend]GapFillSamples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904[Trend]GapFillTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905[Trend]InhibitEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905[Trend]MaxBackfillsAtOnce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906[Trend]MaxRdnSamples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906

  • Contents xix

    [Trend]MaxRequestLength . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906[Trend]MaxSetTableQue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906[Trend]MaxSetTableStnbyPending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906[Trend]MissedSamplesAlarmTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906[Trend]RangeCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907[Trend]ReadWatchTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907[Trend]Redundancy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907[Trend]Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908[Trend]ShowCacheSizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908[Trend]StaggerRequestSubgroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908[Trend]TrendDebug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909[Trend]WatchTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910[Trend]WriteWatchTime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910

    Win Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911[Win]AltEsc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911[Win]AltSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912[Win]AltTab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912[Win]Configure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912[Win]CtrlEsc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912[Win]ScreenSaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913

    Index 915

  • Contentsxx

  • Introducing Cicode

    Cicode is a programming language designed for use in CitectSCADA to monitor and control plant equipment. It is a structured language similar to Visual Basic or 'C'. You need no previous programming experience to use it.

    Using Cicode, you can access all real-time data (variables) in the CitectSCADA project, and all CitectSCADA facilities: variable tags, alarms, trends, reports, and so on. You can use Cicode to interface to various facilities on the computer, such as the operating system and communication ports. Cicode supports advanced features including pre-empted multitasking, multi threads, and remote procedure calls.

    Getting StartedUse the following sections as a quick start to using Cicode in your CitectSCADA projects:

    Cicode can be stored in procedures called functions for multiple reuse and centralized maintenance. For details, see Using Cicode Files.

    Cicode can be typed directly into command fields in online CitectSCADA forms. For details, see Using Cicode Commands.

    Cicode expressions are used to display and log data for monitoring and analysis, and to trigger various elements in your system, such as alarms, events, reports, and data logging. For information on using expressions, see Using Cicode Expressions.

    A Cicode function is a small program, a collection of statements, variables, operators, conditional executors, and other functions. A Cicode function can perform complex tasks and give you access to CitectSCADA graphics pages, alarms, trend data, and so on. For information on using functions, see the section titled Using Cicode Functions. Cicode has many pre-defined functions that perform a variety of tasks. For details on commonly used functions, see the section titled Working with Commonly Used Functions. Where system functionality cannot be achieved with in-built functions, you can write your own functions. See Writing Functions.

    The Cicode Editor is the code editing tool provided with CitectSCADA for the writing, editing and debugging of your Cicode code. For details, see The Cicode Editor.

    See Also Performing Advanced TasksUsing Cicode Programming Standards

  • Introducing Cicode2

    Using Cicode FilesYou write all your Cicode functions in Cicode source files, stored on your hard disk. Cicode files are identified by having a *.CI extension.

    To minimize potential future problems with maintaining your Cicode files, you should adopt a programming standard as early as possible (see Using Cicode Programming Standards). Be sure to maintain structured Cicode files, by logically grouping your Cicode functions within the files, and by choosing helpful descriptive names. For details about modular programming methods, see Modular Programming. For details about using and debugging Cicode functions, see Formatting Functions and Debugging Cicode respectively.

    When you compile your CitectSCADA project, the compiler reads all the functions in your Cicode source files. Your system can then use these functions in the same way as it uses in-built functions. You can use as many Cicode files as required. Cicode files reside in the same directory as your CitectSCADA project. When you back up your project, all Cicode source files in the project directory are also backed up.

    See Also The Cicode EditorCreating Cicode filesOpening Cicode files

  • Part IUsing Cicode

  • Chapter 1: Using Cicode Commands

    Cicode commands extend the control element of a CitectSCADA control and monitoring system. You use commands to control your CitectSCADA system and therefore the processes in your plant.

    Each command has a mechanism to activate it. Commands can be issued manually, through an operator typing a key sequence, or by clicking on a button (or object) on a graphics page. You can also configure commands to execute automatically:

    When an operator logs into or out of the runtime system When a graphics page is displayed or closed When an alarm is triggered In a report When an event is triggeredTo define a Cicode command, you enter a statement (or group of statements) in thecommand field (Input category) for an object.

    Each statement in a command usually performs a single task, such as setting a variable to a value, calculating a value, displaying a message on the screen, or running a report. For information on using variables, see the section titled Using Variables.

    If you want to evaluate a condition, like checking the state of your plant rather than perform an action or command upon your plant, you should use an expression instead. See the section titled Using Cicode Expressions.

    See Also Using Cicode Programming Standards

    Setting VariablesYou can set a Variable in CitectSCADA within a Command field, an Expression field, or in a Cicode Function, by using the mathematical 'equals' sign ( = ) assignment operator. The value on the right is assigned (set) to the variable on the left, as shown in the following Cicode example :

    = Val;where:

    is the name of the variable,Val is the value being assigned to the variable.

  • Chapter 1: Using Cicode Commands6

    Examples

    To set a digital variable (named BIT_1) to ON (1), use the command:

    BIT_1 = 1;To set a digital variable (named BIT_1) to OFF (0), use the command:

    BIT_1 = 0;To set a digital variable (named B1_PUMP_101_M) to ON (1), use the command:

    B1_PUMP_101_M = 1;To set a digital variable (named B1_PUMP_101_M) to OFF (0), use the command:

    B1_PUMP_101_M = 0;To set an analog variable (named B1_TIC_101_SP) to a value of ten (10), use the command:

    B1_TIC_101_SP = 10;You can copy a variable to another by assigning (setting) the value of a variable to the value of another variable, for example:

    B1_PUMP_101_COUNT = B1_PUMP_101_CLIMIT;The value of B1_PUMP_101_COUNT is set to the value of B1_PUMP_101_CLIMIT only when that command is issued.

    Note: The value of B1_PUMP_101_CLIMIT could change immediately after, but B1_PUMP_101_COUNT remains unchanged and storing the original value, until this command is issued again.

    Performing CalculationsMathematical calculations can be performed between variables in a Cicode statement. For example:

    B1_TIC_101_SP = B1_TIC_101_PV + B1_TIC_102_PV - 100;When this command is executed, the variable B1_TIC_101_SP is set to a value that is the sum of variables B1_TIC_101_PV and B1_TIC_102_PV minus 100.

    Using Multiple Command StatementsA single statement in a Cicode command usually performs a single task. When the CitectSCADA runtime system is in operation, the statement executes whenever the command is requested. For example, if the statement is linked to a keyboard command, the task is performed when an operator presses the keyboard key defined as that command.

    To perform several tasks at the same time, you combine statements in a command property:

  • Chapter 1: Using Cicode Commands 7

    B1_PUMP_101_COUNT = B1_PUMP_101_CLIMIT; BATCH_NAME = "Bread"; B1_TIC_101_SP = 10;The example above uses three statements, separated by semi-colons ( ; ). The first statement sets the variable B1_PUMP_101_COUNT to the value of the variable B1_PUMP_101_CLIMIT; the second statement sets the variable BATCH_NAME to the string "Bread"; and the third statement sets the variable B1_TIC_101_SP to 10. Each statement is executed in order.

    Note: You must separate each statement in a command with a semi-colon (;) or CitectSCADA does not recognize the end of a statement, and an error will result when the project is compiled.

    The number of statements you can enter in a command property is limited only by the size of the field. However, for clarity, you should not use too many statements; enter the statements into an Include File or write a Cicode Function. You then refer to the include file or call the function in the command property field.

    Using Include (Text) FilesThere is a maximum number of characters that you can type in a Command or Expression field (usually 128). If you need to include many commands (or expressions) in a property field, you can define a separate Include File that contains the commands or expressions.

    An Include file is a separate and individual ASCII text file containing ONLY one sequence of CitectSCADA Commands or Expressions that would otherwise be too long or complicated to type into the Command or Expression field within CitectSCADA. The Include File name is entered instead, and the whole file is activated when called.

    Note: Be careful not to confuse include files and included projects. Include files contain CitectSCADA commands and/or expressions and are used as substitutions in a CitectSCADA command or expression property field. Included projects are separate and (usually smaller) CitectSCADA Projects that can be included in another CitectSCADA Project so that they appear together as one project.

    When you compile the project, the commands (or expressions) in the Include File are substituted for the property field, just as if you had typed them directly into the field.

    Use a text editor such as Notepad to create the text file.

    Enter the name of the Include File (in either upper or lower case) in the property, in the following format:

    @

  • Chapter 1: Using Cicode Commands8

    where is any valid DOS file name. Note that the < > characters are part of the syntax.

    You can use the Include File facility with most properties (except record names), but it is most commonly used for commands and expressions, for example:

    Key sequence: F5 ENTER Command: @In the above example, the SETVARS.CII Include File would contain commands to be substituted for the Command property when you compile your project, for example:

    PV12 = 10;PV22 = 20;PV13 = 15;PV23 = 59;PageDisplay("Mimic");Note: The Include File name can contain a maximum of 64 characters, or 253 characters including a path, and can consist of any characters other than the semi-colon (;) or the single quote('). You do not need to include the .CII extension, but if the file is not in the project directory, you must enter the full path to the file. If the file is not in the project directory, it will not be backed up with the Backup facility.

    Note: Do not attempt to open an Include file within the Cicode Editor.

    Getting Runtime Operator InputYou can define a keyboard command as a key sequence, to perform a specific task each time the key sequence is pressed, for example:

    Key sequence: F2 ENTER Command: B1_TIC_101_SP = 10;A key sequence can include provision for the operator to enter data. In the following example, the operator can set the value of the variable B1_TIC_101_SP:

  • Chapter 1: Using Cicode Commands 9

    The operator issues the command by pressing the F2 key, up to three characters, and the Enter key. The three character sequence (identified by the three hash (#) characters) is called an argument. The argument is passed into the command (as Arg1) when the command is completed (when the operator presses the Enter key).

    The operator might type:

    The value 123 is passed to the command, and B1_TIC_101_SP is set to 123.

    You should always use a specific key (for example, Enter) to signal the end of a key sequence. If, for example, you use the key sequence F2 ####, the operator must enter 4 characters for the command to be executed - CitectSCADA waits for the fourth character. But if you use F2 #### Enter, the operator can enter between one and four characters as required. The command executes as soon as the Enter key is pressed.

    To use more than one argument in a command, separate the arguments with commas ( , ):

    Key sequence: F2 ###,## Enter Command: B1_TIC_101_SP = Arg1; B1_TIC_101_PV = Arg2;To set both variables, the operator can type:

    The values 123 and 18 are passed to the command. B1_TIC_101_SP is set to 123 and B1_TIC_101_PV is set to 18.

  • Chapter 1: Using Cicode Commands10

  • Chapter 2: Using Cicode Expressions

    Using Cicode ExpressionsCicode expressions are the basic elements of the Cicode language. An expression can be a constant, the value of a variable tag, or the result of a complex equation. You can use expressions to display and log data for monitoring and analysi