Citect SCADA Cicode 2016 - Study Guide
Citect SCADA Cicode 2016 - Study Guide
Citect SCADA Cicode 2016 - Study Guide
78 Waterloo Road
Macquarie Park
NSW 2113
Australia
DISCLAIMER
Schneider Electric makes no representations or warranties with respect to this study guide and, to the maximum extent permitted by law, expressly limits its liability
for breach of any warranty that may be implied to the replacement of this study guide with another. Furthermore, Schneider Electric reserves the right to revise this
publication at any time without incurring an obligation to notify any person of the revision.
The information provided in this documentation contains general descriptions and/or technical characteristics of the performance of the products contained herein.
This documentation is not intended as a substitute for and is not to be used for determining suitability or reliability of these products for specific user applications. It is
the duty of any such user or integrator to perform the appropriate and complete risk analysis, evaluation and testing of the products with respect to the relevant specific
application or use thereof. Neither Schneider Electric nor any of its affiliates or subsidiaries shall be responsible or liable for misuse of the information that is
contained herein. If you have any suggestions for improvements or amendments or have found errors in this publication, please notify us.
All pertinent state, regional, and local safety regulations must be observed when installing and using this product. For reasons of safety and to help ensure compliance
with documented system data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may result in injury, harm, or improper operating results.
Satisfactory completion of the course evaluation is mandatory for you to obtain a Schneider Electric certificate of completion of the training course.
The contents of this study guide are proprietary to Schneider Electric and all rights, including copyright, are reserved by Schneider Electric. No part of this document
may be reproduced in any form or by any means, electronic or mechanical, including photocopying, without express written permission of Schneider Electric.
Schneider Electric will not accept any liability for action taken in reliance on this training study guide.
TRADEMARKS
Schneider Electric has made every effort to supply trademark information about company names, products and services mentioned in this study guide. Trademarks
shown below were derived from various sources.
Vijeo Citect, Citect SCADA, CitectSCADA, Cicode, Vijeo Historian, CitectHistorian, and Ampla are trademarks owned by Schneider Electric Industry SAS or its
affiliated companies. All other trademarks are the property of their respective owners.
ActiveX, Excel, Internet Explorer, Microsoft .NET, SQL Server, Windows, Windows Server, Windows XP, Windows Vista, Windows 7 and Windows 8 are either
registered trademarks or trademarks of Microsoft® Corporation in the United States and/or other countries.
VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions.
General Notice:
Some product names used in this study guide are used for identification purposes only and may be trademarks of their respective companies.
Validity Note
The present documentation is intended for qualified technical personnel responsible for the implementation, operation and maintenance of the products described. It
contains information necessary for the proper use of the products.
Electrical equipment should be installed, operated, serviced, and maintained only by qualified personnel. No responsibility is assumed by Schneider Electric for any
consequences arising out of the use of this material.
A qualified person is one who has skills and knowledge related to the construction and operation of the electrical equipment and installations and has received safety
training to recognize and avoid the hazards involved.
Cicode Programming is the second of the CSCE exams. This exam is based around
information that is covered in the Cicode Programming Course.
Introduction to Programming
Function Structure
Flow Control
Programming Standards
Using Cicode, you have access to all real-time data (variables) in the Citect SCADA project,
and all Citect SCADA facilities - variable tags, alarms, trends, reports, and so on. You can
use Cicode to interface to various resources on the computer, such as the operating system
and communication ports.
Suggested Exercises
Further Reading
Citect SCADA is supplied with over 600 in-built functions. One or a combination of these
functions can usually perform most tasks in your system. However, where system
functionality cannot be achieved with in-built functions, you can write your own functions.
A Cicode function is a small program that may contain a collection of statements, variables,
operators, conditional executors, and functions, in fact, of all the elements of Cicode.
Suggested Exercises
Cicode is used to manipulate data and perform tasks. Data manipulation is achieved using
five classes of operators. These are the Mathematical, Bit, Logical, Relational and Format
operators.
Suggested Exercises
Create Global, Module and Local variable declarations along with assigning
default values to the declared variables.
Further Reading
Cicode supports the use of all major Logical operators: AND, OR, XOR, NOT.
Suggested Exercises
Create simple logic statements to test the order of precedence and also to be sure
that you understand how statements are executed.
Further Reading
Statements are used to execute Cicode Functions and also to assign values (or the results of
Cicode Functions) to variables and to Variable Tags.
Statements also include the ability to exchange information between variable of differing
datatypes - for instance converting an Integer to a String or vice versa.
The various operators (addition, subtraction, multiplication etc) have an order of precedence
(they are not executed left-to-right or right-to-left)
Suggested Exercises
Further Reading
In addition to acting on data sourced from the plant via Variable Tags, there are occasions
when it is necessary to interact with the operator in order to either request values (perhaps
the name of the next recipe or the adjusted setpoint value for some parameter) or to provide
other information - often via the prompt field on the screen.
Generally, the Input and the Prompt Cicode functions are used for this, although others are
also available.
Suggested Exercises
Understand the datatype of the various input and output functions and be
familiar with how to ensure data is sent or received in the necessary datatype.
Further Reading
The statements that control decisions and loops in your functions are called conditional
executors. Cicode uses four conditional executors: IF, FOR, WHILE and SELECT CASE.
Suggested Exercises
Further Reading
One of the critical aspects to follow on from the earlier concepts of Error Handling and
Defensive Programming is "Good Design."
the better designed your software is, the easier it will be to deal with errors and exceptions.
Software should be written with as much of the code hidden as PRIVATE functions in order
to not accidentally call functions which have not been configured for global use. Similarly,
unless a variable must be made available globally, it should be declared as a MODULE
variable or even kept local to a function.
Suggested Exercises
Further Reading