Beruflich Dokumente
Kultur Dokumente
Study Guide
Version 7.30
78 Waterloo Road
Macquarie Park
NSW 2113
Australia
DISCLAIMER
Schneider Electric makes no representations or warranties with respect to this manual 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 manual 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.
Schneider Electric
Your purchase of this official Vijeo Citect Upgrade Training Manual entitles you to undertake the Vijeo Citect Upgrade training course.
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 manual 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 manual.
TRADEMARKS
Schneider Electric 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.
Vijeo Citect, 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 and Windows 7 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 manual 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.
Manual Release 1
Introduction Cicode Programming is the second of the CSCE exams. This exam is based
around information that is covered in the Cicode Programming Course .
Using Cicode, you have access to all real-time data (variables) in the Vijeo
Citect project, and all Vijeo Citect 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 Use these suggested exercises to increase your understanding of the topic.
Exercises
Create and save Cicode function libraries.
Experiment with the automated layout functionality within the editor.
Use comments to disable sections of cicode.
Further Reading Use the following references to assist your understanding of the topic.
User Functions Vijeo Citect 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.
Suggested Use these suggested exercises to increase your understanding of the topic.
Exercises
Revise the syntax of Cicode functions.
Make a small Cicode program to create a standard Microsoft ActiveX
Listbox at runtime, and fill this listbox with three items, and then select
one of these items, and then store the value of the item in a DiskPLC
variable.
Further Reading Use the following references to assist your understanding of the topic.
Operators 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 Use these suggested exercises to increase your understanding of the topic.
Exercises
Review the Cicode Programming Training manual.
Create Global, Module and Local variable declarations along with
assigning default values to the declared variables.
Determine maximum array size limits.
Further Reading Use the following references to assist your understanding of the topic.
Four Conditional The statements that control decisions and loops in your functions are called
Executors conditional executors. Cicode uses four conditional executors: IF, FOR, WHILE
and SELECT CASE.
Suggested Use these suggested exercises to increase your understanding of the topic.
Exercises
Review the syntax of the four types of Conditional Executor in Cicode.
Create functions that test the functionality of the Conditional Executors.
Further Reading Use the following references to assist your understanding of the topic.
Use of Logic in Cicode supports the use of all major Logical operators: AND, OR, XOR, NOT.
Cicode
Suggested Use these suggested exercises to increase your understanding of the topic.
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 Use the following references to assist your understanding of the topic.
Doing the Work Statements are used to execute Cicode Functions and also to assign values (or
the results of Cicode Functions) to variables and to Variable Tags.
Suggested Use these suggested exercises to increase your understanding of the topic.
Exercises
Review the Order of Precedence of Operators.
Create Cicode fragments to assign values and call functions.
Confirm your knowledge of datatype conversion functions.
Further Reading Use the following references to assist your understanding of the topic.
Interact with the In addition to acting on data sourced from the plant via Variable Tags, there are
Operator 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 Use these suggested exercises to increase your understanding of the topic.
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.
Be familiar with key sequences for data input.
Test the use of the ArgX and ArgValueX items.
Further Reading Use the following references to assist your understanding of the topic.
Provide In order to make Cicode Functions flexible and reusable, it is normal to provide
Information for a a list of parameters for them to work with as arguments to the function. Clearly
Function to work the only alternative would be to define some large list of fixed Global variables.
with
When passing parameters to a function, the programmer must make sure that
the parameters appear in the correct order and have the proper datatypes.
Suggested Use these suggested exercises to increase your understanding of the topic.
Exercises
Create Cicode Functions with default parameters for use when the
parameter is not provided.
Call functions with missing parameters.
Test the application of datatypes to function parameters.
Further Reading Use the following references to assist your understanding of the topic.
Deal with There are many situations where your programs must handle unexpected events.
Problems These might range from a file not existing when you request to open it to
attempting to read from a non-existent array item.
You should write your software to minimise these issues as much as possible
and also to gracefully handle the ones you can't catch.
Further Reading Use the following references to assist your understanding of the topic.
Cicode Editor as The Cicode Editor can function in debug mode, to analyse running Cicode.
a Debugger Debugging Cicode requires that Vijeo Citect is running, though you can turn
debugging on and off as required. The operation of the debugger is controlled
through Debug Options, with some options only taking effect on startup.
Suggested Use these suggested exercises to increase your understanding of the topic.
Exercises
Review how the Cicode language supports multi-tasking and pre-
empting.
Review the use of the Cicode Editor in Debug mode.
Add some breakpoints to the program you created earlier and use the
Cicode debugger to step through it, by breakpoint and line by line.
Further Reading Use the following references to assist your understanding of the topic.
Fundamentals of One of the critical aspects to follow on from the earlier concepts of Error
Good Design Handling and Defensive Programming is "Good Design."
the better designed your software is, the easier it will be to deal with errors and
exceptions.
Suggested Use these suggested exercises to increase your understanding of the topic.
Exercises
Experiment with declaring PUBLIC and PRIVATE Functions.
Investigate the difference between Blocking and Non-Blocking
functions.
Read widely on programming techniques.
Further Reading Use the following references to assist your understanding of the topic.