chapter 1 - research school of physics and engineering...

88
Improved Operator Interface for Control of the H-1 Heliac Experiment Benazir Ahmed 3997780 Supervised by Dr. Boyd Blackwell A thesis submitted in part fulfilment of the degree of Bachelor of Engineering at the Australian National University

Upload: lecong

Post on 15-Apr-2018

229 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Improved Operator Interface for Control of the H-1 Heliac Experiment

Benazir Ahmed3997780

Supervised by Dr. Boyd Blackwell

A thesis submitted in part fulfilment of the degree of Bachelor of Engineering at the

Australian National University

Page 2: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

This thesis contains no material which has been accepted for the award of any other degree or diploma in any university. To the best of the author’s knowledge, it contains no material previously published or written by another person, except where due reference is made in the text.

Benazir AhmedDate: 4th September 2006

Page 3: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

To the ongoing struggle to provide clean and economic energy to the human race.

Page 4: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

ACKNOWLEDGEMENTS

I am sincerely grateful primarily to Dr. Boyd Blackwell, my honours project supervisor, for this continual enthusiasm, inspiration and support from the very of beginning of my project. Without his guidance this work would not have come to fruition. He always managed to find time for me even on his busiest days.

I am also grateful to Daniel Hanafi, who works for Citect support centre. I thank him for his continuous support and his enthusiasm towards my project.

I am grateful to all the academics of the Plasma Research Laboratory, all of whom have been very generous to me.

iv

Page 5: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Abstract

The control interface of the H1 Heliac is developed on Citect SCADA, human machine interface software. This thesis studies the tools and techniques to build control interface page using human interface software Citect SCADA.

Fist part of the project involves improving and developing control pages. Two pages were improved which are Overview_New and !ABB_PS_PopUp. Four pages were developed which are Pulse Setup, Power Supply Readback, Power Supply Simple Setup and Secutiy page. These pages were developed using the Citect Graphic Builder, Citect Project Editor and Cicode Editor.

The security page controls the doors the H1 facility. Pulse Setup and the Power Supply Simple setup page sets and validate the power supply parameters; and, the Readback page feedbacks the pulse parameters after successful validation.

The second part of the project involved extracting control information i.e. extracting the descriptions, labels (tags), expressions and sources (programmable logic controllers i.e. PLCs), of the quantities monitored and controlled, and the function of the controls is required for debugging purposes. Three approaches were researched to extract this information, which are external database approach, super genie approach, and help wizard approach.

The external database approach was not developed due to the complication of the extracting the tags and expressions of an object and searching them in the external database. The super genie approach was developed and implemented in two pages (Pulse Setup and Power Supply Readback page). This approach is able to extract tag name and tag comment for and object in page. However, this approach is unable to extract expressions used in an object and other important tag information such as tag address and I/O device name. The help wizards approach is able to extract expressions, and also tag address and I/O device name. However the help wizard approach is unable to extract state text of an object. Help Wizard approach eliminates the use of the ‘Tool Tip’ option as most of the tips are similar to the tag comments.

v

Page 6: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

CONTENTS

Abstract.....................................................................................................................................................................v

List of Figures........................................................................................................................................................vii

List of Tables........................................................................................................................................................viii

Chapter 1 Introduction.....................................................................................................................................1

1.1 PLASMA FUSION POWER........................................................................................................................11.2 THE H1 HELIAC......................................................................................................................................3

1.2.1 H1 HELIAC Control System.............................................................................................................41.3 THESIS OUTLINE.....................................................................................................................................6

Chapter 2 Citect SCADA..................................................................................................................................7

2.1 CONFIGURATION ENVIRONMENT............................................................................................................72.1.1 Citect Explorer..................................................................................................................................72.1.2 Citect Project Editor.........................................................................................................................82.1.3 Citect Graphic Builder......................................................................................................................92.1.4 Cicode Editor..................................................................................................................................102.1.5 CitectSCADA Help..........................................................................................................................11

2.2 RUNTIME ENVIRONMENT.....................................................................................................................11

Chapter 3 Abstract..........................................................................................................................................12

3.1 TAGS.....................................................................................................................................................123.2 OPERATORS AND EXPRESSIONS...........................................................................................................143.3 GENIE...................................................................................................................................................163.4 SUPER GENIE........................................................................................................................................163.5 BUILDING A CONTROL INTERFACE......................................................................................................173.6 UPGRADING PROJECT FROM VERSION 5 TO 6......................................................................................20

Chapter 4 Control Pages.................................................................................................................................21

4.1 SECURITY PAGE....................................................................................................................................214.2 !ABB_PS_POPUP.................................................................................................................................234.3 PULSE SETUP........................................................................................................................................254.4 POWER SUPPLY SIMPLE SETUP............................................................................................................284.5 POWER SUPPLY READBACKS................................................................................................................304.6 OVERVIEW NEW...................................................................................................................................31

Chapter 5 Extracting Control Information..................................................................................................33

5.1 EXTERNAL DATABASE APPROACH.......................................................................................................345.2 SUPER GENIE APPROACH.....................................................................................................................355.3 HELP WIZARD APPROACH....................................................................................................................37

5.3.1 Wizard using InfoForm...................................................................................................................445.4 ADVANTAGES OF THE HELP WIZARDS................................................................................................45

Chapter 6 Conclusion......................................................................................................................................46

6.1 FUTURE WORK.....................................................................................................................................47

Bibliography..........................................................................................................................................................48

vi

Page 7: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Appendix – Cicode Commands..............................................................................................................................49

vii

Page 8: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

List of Figures

Figure 1-1: Star Power----------------------------------------------------------------------------1Figure 1-2: Fusion Reaction----------------------------------------------------------------------2Figure 1-3: H1 HELIAC-----------------------------------------------------------------------------3Figure 1-4: Allen-Bradley SLC 500 System--------------------------------------------------4Figure 1-5: RSLogix 500---------------------------------------------------------------------------5Figure 2-1: Citect Explorer-----------------------------------------------------------------------8Figure 2-2: Citect Project Editor----------------------------------------------------------------9Figure 2-3: Citect Graphic Builder-------------------------------------------------------------9Figure 2-4: Cicode Editor------------------------------------------------------------------------10Figure 2-5: CitectSCADA Help-----------------------------------------------------------------11Figure 2-6: Data Type----------------------------------------------------------------------------13Figure 2-7: Expressions in an object---------------------------------------------------------14Figure 2-8: Creating a page using Graphic Builder--------------------------------------17Figure 2-9: Multi-state properties of a text object.-------------------------------------19Figure 3-1: Security Page for the H1 National Facility---------------------------------21Figure 3-2: !ABB_PS_PopUp--------------------------------------------------------------------23Figure 3-3: word_column_light genie--------------------------------------------------------24Figure 3-4: Pulse Setup Page in Java environment--------------------------------------26Figure 3-5: Citect Pulse Setup page---------------------------------------------------------27Figure 3-6: Status window in the remote client interface-----------------------------27Figure 3-7: Validation sequence--------------------------------------------------------------28Figure 3-8: Power Supply Simple Setup page---------------------------------------------29Figure 3-9: Simple Setup page in remote client environment-----------------------29Figure 3-10: Power Supply Readbacks page----------------------------------------------30Figure 3-11: Overview New--------------------------------------------------------------------31Figure 4-1: Pulse Setup Page developed with super genie approach--------------36Figure 4-2: The above picture shows the expressions used in a text object-----37Figure 4-3: Using wizard approach-----------------------------------------------------------38Figure 4-4: TagInfo window that pop up when using wizard approach------------38Figure 4-5: Window displaying the rest of the expressions--------------------------39Figure 4-6: GetExpInfoOne Function--------------------------------------------------------41Figure 4-7: GetExpInfoNext Function--------------------------------------------------------41Figure 4-8: DelayInfo1 Function--------------------------------------------------------------42Figure 4-9: DelayInfo Function----------------------------------------------------------------42Figure 4-10: Input field of the ‘?’ button---------------------------------------------------42Figure 4-11: Wizard using InfoForm---------------------------------------------------------44Figure 4-12: InForm() function----------------------------------------------------------------44Figure 4-13: Input field of the ‘Form?’ button--------------------------------------------45

viii

Page 9: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

List of Tables

Table 2-1: Arithmetic operators--------------------------------------------------------------14Table 2-2: Relational Operators---------------------------------------------------------------15Table 2-3: Logical Operators-------------------------------------------------------------------15Table 2-4: Bit Operators-------------------------------------------------------------------------15Table 2-5: Order of precedence table-------------------------------------------------------16Table 3-1: Tags used for the Security Page-----------------------------------------------22Table 3-2: Pulse Parameters and their respective tags and I/O address----------25Table 3-3: Main Converter Read Back Parameters--------------------------------------30Table 3-4: Secondary Converter Read Back Parameters-------------------------------31

ix

Page 10: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Chapter 1 Introduction

1.1 PLASMA FUSION POWER

It is predicted that the Earth’s population will reach eight billion by 2025, and by the turn of the next century it could be as many as twelve billion. Even if the industrialised nations find a way to reduce their energy consumption, this unprecedented increase in population, coupled rising prosperity in the developing world will place huge demand on global energy supplies.

As our primary sources of energy – fossil fuels – begin to run out, and burning them causes increasing environmental concerns, the human race faces the challenge of finding new energy sources. Conventional nuclear power produces long-lived radioactive waste, while renewable energy sources such as wind, wave or solar power provide variable output and are unlikely ever to be able to satisfy total demand [1].

Figure 1-1: Star Power

Fusion is a process by which two nuclei fuse together, and in doing so release considerable energy. Achieving this requires high temperatures such as those that drive the fusion processes which power the sun. By using magnetic confinement devices it is possible recreate similar conditions on earth, which are sufficient to generate many fusion reactions, producing energy which may be harnessed to produce large amounts of electrical power. As there are no long-lived hazardous by-products and a plentiful supply of almost universally accessible fuel, fusion power has the potential to produce virtually limitless amounts of power in an environmentally friendly and economically viable way [2].

Fusion is the process by which two light nuclei bind to form a heavier nucleus. A particularly energetically favourable reaction is the fusion of deuterium (D) and tritium (T). D is an isotope of hydrogen (H), and is found in seawater (about 33g per tonne). Tritium is also an isotope of H, and is readily made from lithium, which is widely available, both from ore from the earth (4% in Australia) and also from seawater. In each D-T fusion reaction 17.6

1

Page 11: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

MeV of stored energy is released, along with a helium atom (He) and a neutron (n). This is about one million times the amount of energy released from a chemical reaction, e.g. the burning of fossil fuels. This is how so little fuel can produce so much energy when fusion is employed.

Figure 1-2: Fusion Reaction

In order for the D-T nuclei to bind the temperature of the nuclei must be high, greater than 100 million degrees C. This is why fusion is a prominent mechanism in the sun. At these temperatures matter exists in what is known as the plasma state, in which atoms break up into electrons and ions. In this ionized plasma state magnetic fields may be used to confine the motion of the nuclei and maximize fusion reactions.

In order for a fusion power plant to be feasible it is required that plasma (containing D and T nuclei) is hot enough to drive a substantial rate of D-T fusion reactions. Confining such as plasma is not trivial, at present the optimal method employs strong magnetic fields in the shape of a torus (dough nut). Experiments on present day machines around the globe have shown that the number of D-T reactions increases with the density of the plasma. ITER, a joint international research and development project that aims to demonstrate the scientific and technical feasibility of fusion power, represents the next and final step for experimental fusion machines, confining plasma of a sufficient temperature and density such that the number of D-T reactions is sufficient for an electrical power plant.

Plasma fusion offers a potentially safe, environmentally friendly and economically competitive energy source. To operate for a whole year generating about seven billion kilowatt hours of electricity, a fusion plant would use just 100kg of deuterium and three tonnes of lithium – releasing no greenhouse gases in the process and no threat of nuclear weapons proliferation. The only exhaust gas is helium, which is naturally lost to space and cannot represent a long-term atmospheric containment on Earth. A typical coal-fired power station, in contrast, needs three million tonnes of fuel and produces some eleven million tonnes of carbon dioxide to yield the same annual output [2].

2

Page 12: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

1.2 THE H1 HELIAC

The Australian National University has a plasma research facility, the H-1 Heliac, which is stationed at the Research School of Physical Sciences and Engineering (RSPhysSE).It was constructed between 1986 and 1992 following the success of the small-scale prototype, ‘SHEILA’. It was intended for basic plasma physics studies. The machine features a ‘coil in tank’ design, which has the advantage of ease of access and large number of diagnostic ports. A sketch of the machine is show below:

Figure 1-3: H1 HELIAC

There are 36 toroidal field (TF) coils with their centres located on a helix about a central circular poloidal field coil. The TF coil spacing is slightly modulated by the toroidal angle in order to improve the ripple. In addition the machine features a helical coil surrounding the poloidal field coil which rotates in phase with the axis of the TF coils. This can be used to adjust rotational transform, shear and well characteristics of the flux surfaces, making the heliac ‘flexible’. High order helical windings could produce favourable shear properties. Two inner and two outer vertical field coils are used to control the vertical component of the magnetic field.

. The ongoing research at ANU is aiming to gain a detailed understanding of the basic physics of hot plasma which is magnetically confined in the helical-axis stellarator of the H-1.

3

Page 13: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

There are two independent power supplies for powering the coil set. A motor generator (MG) is available for producing currents up to 2500A at V ~ 100V (resulting in a magnetic field up to 0.25T). For currents less than 1500A, this can be used in continuous operation. In addition, there is a dual pulsed power supply capable of producing currents of up to 14000A (equivalent to B = 1T), having the constraint that the minimum possible current is 1500A. With this power supply, it is simple to perform magnetic configuration scans by connecting the mail coil set and vertical field coils to the primary supply, and the helical coil to the secondary supply. By comparison, the variation of the configuration using the MG set is flexible since the helical coil can only be connected in series or be disconnected [3].

The H-1 Heliac is able to heat plasmas, thin gases, to a million degrees or more, hot enough for nuclear fusion to occur. There are two primary heating systems available on H-1, a Radio Frequency (RF) system as well as a microwave gyrotron heating system. For the RF heating system, there are two main sources. The primary system consists of a bank of four commercial broadcast transmitters tuneable from 4-26MHz, and is capable of producing up to a total of 100kW. An additional 250kW transmitter is available for high power operation. The RF power is coupled into the plasma by means of a tuneable matching box and an antenna, consisting of two saddle-like coils conforming to the shape of the last closed flux surface. Depending on the heating system, magnetic field and filling gas, several ‘modes’ of operation are available in H-1. At low magnetic field, plasmas can be produced in either argon or helium using non-resonant helicon wave heating. On the other hand, ion cyclotron resonant heating can be performed in Hydrogen at higher magnetic field [3, 5].

1.2.1 H1 HELIAC Control SystemOperation of the H-1 National Facility relies on the coordination of number or

machine systems. The machine control system (which is independent of the plasma diagnostics control and data system) is based on Allen-Bradley PLCs (Programmable Logic Controller).

Figure 1-4: Allen-Bradley SLC 500 System

4

Page 14: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

The Allen-Bradley SLC 500 System is used for the H1. The SLC processors offer a wide range of choices in memory, I/O capacity, instruction set, and communication ports to allow the user to tailor a control system to particular application requirements. SLC 500 systems have a strong reliability history covering hundreds of thousands of installations in a broad range of applications. SLC 500 System processors are able to configure modular controllers of up to 4096 inputs plus 4096 outputs and a memory of 16 K, 32K, or 64K words. In addition, they have a second built-in communication port—an RS-232-C port that can be configured for ASCII or DF1 protocol, and can be configured for connection to a 1761-NET-AIC converter to provide access to a DH-485 network. SLC 5/03 processors provide bit-instruction execution times of 0.44ms. Additional capabilities include: floating-point math, online programming and run-time editing, flash memory upgrades, built-in key-switch, and a built-in real-time clock and calendar, plus a faster communication port and shorter execution times. SLC 500 processors provide a 10/100BASE-T, 10 or 100 Mbps Ethernet port [4].

Figure 1-5: RSLogix 500The Allen-Bradley SLC 500 System is programmed with RSLogix 500 programming

packages. The RSLogix family of ladder logic programming packages is able to maximize performance and improve productivity. This family of products has been developed to operate on Microsoft Windows operating systems. RSLogix 500 supports the Allen- Bradley PLC-5 family of programmable controllers. RSLogix also offers reliable communications, powerful functionality, and superior diagnostics.

In addition to controlling the machine parameters (such as magnetic field, timing, sequences, and gas injection), the control system monitors all parameters that affect the safety of the machine and personnel (cooling water flows, coolant and equipment temperatures,

5

Page 15: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

vacuum integrity, power supply voltage and current, safety interlocks, etc.), and will initiate shutdown procedures in the case of faults or emergencies. A limited function manual override system also exists to allow the machine to work in a restricted operational range independent of the computer.

Monitoring and controlling the whole H-1 plays and important role in plasma research. The control system of the H1 is interfaced with Citect SCADA, human machine interface software developed in Australia. You can find more about Citect SCADA in Chapter 2.

1.3 THESIS OUTLINE

This thesis describes building control pages for the H1 Heliac using Citect SCADA. This chapter has introduced the basic concepts of plasma. This chapter also gave a general description of the H1 Heliac. The control system of the H1 Heliac has also been described.

In the next chapter a detail description the human machine interface software Citect SCADA is given. A general introduction of the Citect SCADA is given followed by descriptions of the tool required to develop control pages in Citect SCADA. This is followed by descriptions of how to use the tool to build a control page.

Chapter 3 presents all the pages that were developed for this project, which are Security, Pulse Setup, Power Supply Simple Setup, Power Supply Readback, Overview_New and !ABB_PS_PopUp page. A general description, functionalities and major tools that were used in these pages are discussed.

The methods that are used to extract control information of an object in a page are presented in Chapter 4. Three methods are discussed which are external database, super genie and help wizard approach. This is followed by description of the advantages of the help wizard approach over super genie approach.

Chapter 5 summarises the thesis and provides recommendations for further studies.

6

Page 16: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Chapter 2 Citect SCADA

Citect is one of the leading global providers of industrial automation, facilities automation, real-time intelligence, and next generation manufacturing execution systems (MES). Citect has been providing global business solutions, engineering services and software to the automation market for over 30 years [6].

Citect/SCADA (Supervisory Control And Data Acquisition), is a system with a primary function of collecting information (data) and providing an interface to control specific equipment such as Programmable Logic Controllers (PLCs), Remote Terminal Units (RTUs) etc. CitectSCADA is a fully integrated Human Machine Interface (HMI) / SCADA solution that deliver a highly scalable, reliable control and monitoring system. Easy-to-use configuration tools and powerful features enable user to quickly develop and deploy solutions for any size application.

The CitectSCADA environment is conceptually divided into two parts: Configuration environment Runtime environment

2.1 CONFIGURATION ENVIRONMENT

The configuration environment consists of software tools (applications) used to build the runtime system. The configuration environment is centred around the Citect Explorer, which is used to create and manage projects.

Projects are used to structure configuration data into logical, well organized, groups. The user can design the system to use one or more projects at a time, depending on the modularity of your plant or system.

The configuration environment consists of the following components:

2.1.1 Citect ExplorerCitect Explorer is used to create and manage CitectSCADA projects. It is also the controlling configuration application from which one can run the Project Editor, Graphics Builder, and Cicode Editor. Citect Explorer looks like as shown in figure 2-1.

When you start Citect Explorer, the Project Editor and Graphics Builder automatically start and are minimized. When you close Citect Explorer, the other CitectSCADA applications are shut down.

7

Page 17: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 2-6: Citect Explorer

2.1.2 Citect Project EditorCitect Project Editor is used to create and manage the CitectSCADA database containing the configuration information for CitectSCADA project (The elements of a CitectSCADA monitoring and control system, such as graphics pages, objects, and so on. These elements are stored in files of various types; for example, graphics files for graphics pages, databases for configuration records, and so on. You use the CitectSCADA compiler to compile the project into a runtime system i.e. creates an executable form of the graphics pages. You can view all CitectSCADA project database records in the Citect Project Editor.

The Project Editor has some specific commands that you can access by using the menu system or buttons, as indicated below:

Report Selection button: Choose a CitectSCADA report. Find User Function button: Search for a user-defined Cicode (Programming

language designed for plant monitoring and control applications. It is similar to languages such as Pascal) function.

Insert Function menu: Insert a pre-defined Cicode function. Paste Tag menu: Insert a pre-defined variable tag.

Citect Project Editor looks like the following figure:

8

Page 18: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 2-7: Citect Project Editor

2.1.3 Citect Graphic BuilderThe Graphics Builder is used to create and edit graphics pages, including the objects that comprise the graphics pages. Graphics Builder starts automatically when you double-click a graphic object in Citect Explorer. Citect Graphic Builder looks like the following:

Figure 2-8: Citect Graphic Builder

9

Page 19: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

2.1.4 Cicode EditorCicode Editor is used to write and edit Cicode programs and Citect VBA programs. Within the Cicode Editor window, you can get help for any Cicode function. Right-click the function name and choose Help from the menu.

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'.

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-emptive multitasking, multi threads, and remote procedure calls.

You can use the Cicode Editor as a debugger at runtime to step through your running Cicode to track down programming errors. You can also debug your Cicode programs from a remote computer. Cicode Editor looks like the following:

Figure 2-9: Cicode Editor

10

Page 20: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

2.1.5 CitectSCADA HelpThe CitectSCADA Help contains useful information to help you develop CitectSCADA system. You can access Help from Citect Explorer, Graphics Builder, Project Editor, and Editor/Debugger. CitectSCADA Help looks like the following:

Figure 2-10: CitectSCADA Help

2.2 RUNTIME ENVIRONMENT

CitectSCADA runtime environment is used to control and monitor plants. You must tailor the runtime system to suit your requirements, using the configuration tools mentioned above. After configuring your project (or projects), they must be compiled to build the runtime system.

It is at runtime when CitectHMI/SCADA will communicate with your I/O devices, process alarms, animate levels and symbols, and so on. The runtime system is the graphical interface (of your design) that you use to control and monitor your plant.

The runtime system consists primarily of the runtime application, but also includes the CitectSCADA Kernel and Cicode Debugger, used to debug systems and check performance.

To use the runtime system, your computer requires a protection key (otherwise it will run in demonstration mode).

11

Page 21: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Chapter 3 Abstract

3.1 TAGS

Tags are the primary source of a quantity displayed or monitored in a graphics page. Tags are required to build graphic pages in Citect, which are defined in Citect Project Editor. For every object in a graphics page you need to insert at least one tag for that object to work in the runtime environment. You can insert several tags to make an expression using operators (which is discussed in the next section) to do certain tasks (e.g.: If tag1 = 1 and tag 2 =0 then error). Tags are the communication medium between Citect and the Allen-Bradley PLCs that are used for H1. Tags are programmed and defined for H1 control system in the RSLogix. The basic function of Tags is to take input from the user and feedback output from the PLCs, which has been read from the sensors by the PLCs.

There are three different kinds of Tags that can be defined in Citect, which are, Trend Tags, SPC (Statistical Process Control) Tags and Variable Tags.

Trend Tags are used in Citect for graphical representation of the changing values of a plant-floor variable (or expression), or a number of variables.

SPC Tags specify data that is to be collected for use in SPC operations. Once data is defined it can be dynamically analysed (as SPC graphs and alarms) at run-time. SPC Tags are similar to Trend Tags.

This thesis will concentrate only on variable tags. Variable tags can be defined in the Citect Project Editor see figure 2-2. The following information is required to define a tag in Citect Project Editor:

Variable Tag Name: The user can put any name (up to 79 characters) that is suitable for a particular tag. The convention is put a name according to the function of the tag.

I/O Device Name: The name of the I/O device (i.e. the name of the PLC) where the variable is stored (16 characters).

Address: The register address in the I/O device where the variable is stored (64 characters). The format and prefix of an address depend on the I/O device that is used.

Data Type Variable Size Allowed Values BCD Binary- Coded Decimal 2 bytes 0 to 9,999 BYTE Byte 1 byte 0 to 255 DIGITAL Digital 1 bit or 1 byte 0 or 1 INT Integer 2 bytes -32,768 to 32,767 UINT Unsigned Integer 2 bytes 0 to 65,535 LONG Long Integer 4 bytes -2,147,483,648 to

2,147,483,647 LONGBCD Long Binary- Coded

Decimal 4 bytes 0 to 99,999,999

REAL Floating Point 4 bytes -3.4E38 to 3.4E38 STRING String 256 bytes (maximum) ASCII (null terminated

12

Page 22: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Data Type: The type of I/O device variable (16 characters). I/O devices support several data types that are used to exchange data with CitectSCADA. The following are the data types that Citect supports:

Figure 3-11: Data Type

Eng Units: (16 characters.) The engineering units that the value represents (e.g. %, deg, mm/sec, etc.). This property is optional. If you do not specify engineering units, no engineering units are used. Do not use this property for digital and string data types

Format: (11 characters). The display format of the value (of the variable) when it is displayed on a graphics page, written to a file, or passed to a function (that expects a string). This property is optional. If you do not specify a format, the format defaults to ####.#. Do not use this property for Digital and String data types.

Comment: Any useful information about the variable e.g. the function of the variable.

Raw Zero Scale / Raw Full Scale: The unscaled (raw) values (of the variable) that represent the zero point and full scale point for the data (10 characters). The raw values are the values that CitectSCADA reads from the I/O device.

Eng Zero Scale / Eng Full Scale: The scaled values that CitectSCADA calculates from the raw values (10 characters). The Raw Zero Scale is scaled to the Eng Zero Scale and the Raw Full Scale is scaled to the Eng Full Scale. These properties are represented in engineering units and are used as the upper and lower limits of trends and bar graphs.

The above information such as Variable Tag Name, I/O Address and Comment are not readily available to the user during the run time environment. This is also not available in the Citect Graphics Builder, except for the Variable Tag Name. It is only available in the Citect Project Editor. Also, to find a particular tag in the Project Editor takes time. The user needs this information during the runtime for debugging purposes. In this honours project two mechanisms have been developed to extract this information for an object in a page during the runtime environment. These mechanisms (Help function) are fast and easy to use. Chapter 4 describes more about these mechanisms.

13

Page 23: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

3.2 OPERATORS AND EXPRESSIONS

Variables and Tags can be manipulated in Citect to make expressions using assignment, arithmetic, relational, and logical operators. For example:

Figure 3-12: Expressions in an object The assignment operator is used to assign a value to a variable or constant.

e.g. X = 123 (assigns numeric value 123 to variable X). Arithmetic operators are used to mathematically manipulate numeric variables and

numbers (addition, subtraction, multiplication, division, etc.).

Operator Function Usage ^ Exponentiation X = Y ^ 2 - Negation X = - 2 * Multiplication X = 2 * 3 / Division X = 10 / 2 Mod Modulo X = Y MOD Z + Addition X = 2 + 3 - Addition X = 6 - 4

Table 3-1: Arithmetic operators

14

Here A, B, C, and D are expressions. These expressions were made using tags and assignment, relational and logical operators.

Page 24: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Relational Operators are used to compare the relationship between variables (less than, greater than, not equal to, etc.).

Operator Function Usage < Less than X < Y <= Less than or equal to X <= Y = Equals X = Y >= Greater than or equal to X >= Y > Greater than X > Y <> Not equal to X <> Y

Table 3-2: Relational Operators

Logical Operators are used to perform digital logic operations on variables (AND, OR, NOT, etc.).

Operator Function Usage Not Logical negation if not X And Logical AND If (X> Y) And (X < Z) Or Logical OR If (X = Y) Or (X = Z)

Table 3-3: Logical Operators

Bit operators are used to compare the corresponding bits in two numeric expressions. (A bit is the smallest unit of data a computer can store)

Operator Description BITAND AND BITOR OR BITXOR Exclusive OR

Table 3-4: Bit Operators

For example

Command Tag3 = Tag1 BITAND Tag2; Command Tag3 = Tag1 BITAND 0xFF; Command Tag3 = Tag1 BITOR Tag2; Command Tag3 = Tag1 BITXOR Tag2;

When using multiple operators in a Cicode statement, an order of precedence is required to ensure the operations occur in a consistent and predictable manner. The order of precedence is as follows:

15

Page 25: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Operators Description Order ( ) Parenthesis Highest ^ Exponentiation  - Unary minus  /, * division/multiplication  Mod Modulo  +, -, & addition, subtraction, concatenation  =, <>, <, >,<=,>= Relational  Not Logical negation  And Logical conjunction  Or Logical disjunction  Xor Logical exclusion  Eqv Logical equivalence  Imp Logical implication Lowest

Table 3-5: Order of precedence table

An expression is comprised of a statement (or group of statements) that returns a desired value. An expression can be a single variable, a mathematical formula, or a function made using operators (see figure 2-7).

The expression (or expressions) used in an object is an essential peace of information that the user needs for debugging purposes. Expressions were used in many objects to build pages in this project.

Citect does not automatically provide the user with this information during the run time. Two help functions has be develpoed for this honours project to extract the expressions used for any object in page during the rutime evironment.

3.3 GENIE

If there are numerous devices of the same type (e.g., 100 centrifugal pumps), the display graphics for each should behave in much the same way. Using a Genie, it is only required to configure common behaviour once. The graphics can then be saved as a Genie and pasted once for each device.

Genies were used to build the Security, Pulse Setup, Pulse Setup, !ABB_PS_PopUp and Pulse Setup Readback pages (please see Chapter 3 for more details).

16

Page 26: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

3.4 SUPER GENIE

Individual pages (popup controllers, loop tuning pages, etc.) are often used to control and monitor devices. A super genie is essentially ‘pop-up’ genie. Super Genies are ideal when there are many devices of the same type, because you can re-use them many times without re-configuring them for each device. Configure the common information once; the device-specific information is passed to the Super Genie at runtime. Super Genie is commonly used by attaching the Super Genie with a Genie. However, a Super Genie can be used without a Genie.

Super genies were used to build Pulse Setup and Readback pages (please see Chapter 3 for more details)

3.5 BUILDING A CONTROL INTERFACE

A control interface can be created using the Citect Graphics builder. By creating a new page (File – New – Page) you can insert different objects into the page according to your needs. There are some predefined objects that Citect allows you to use, which are:

Straight line Rectangle Ellipse Polygon Pipe Text

Number Button Symbol set Trend Cicode Object

If you want to create an object which does not fall under the above categories, then you can use the Free Hand Line option to create an object from scratch. All the above objects can be found under Objects in the toolbar of the Graphics Builder as shown bellow:

17

Page 27: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 3-13: Creating a page using Graphic Builder

Every object in a page has its own properties, which can be individually set the properties of each object in a page. If you double click an object, when it is in the designing phase, the object properties dialog box will popup. In the above picture you can see the properties dialog box of a text object.

Using the properties dialog box you can set the appearance of the text when it is the run time environment. You can also apply 3D effects such as; shadowed, raised, lowered and embossed. Tags are usually used in this properties box under ‘Input’ and ‘Fill’ option of the properties dialog box.

In the ‘Input’ option you specify the command to be executed, by inserting the relevant tags and expressions, and the message to be logged when an operator clicks on the object. You can also define keyboard commands for the object, and protect them with area and privilege security.

A text object usually has the following Display Value properties:[Type] On / Off Changes the text which displays when a particular condition is met, and another when it is not. For example, you could display an alarm message when a particular variable tag is in alarm and a normal message when it is not.

[Type] Array

This option allows you to enter an expression which returns an integer. For each integer (from 0-255), you can display different text. For example, you could display a different message for each state of an analog tag.

[Type] Numeric

This option allows you to display the value of a tag or expression in numeric format (you can specify the format).

[Type] String

This option allows you to display the value of an expression as a string.

ON text when

The text entered in the ON text field (below) appears when the condition entered here is true. The text can be a maximum of 128 characters long.

18

Page 28: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

To insert a tag or a function, click the Wizard button to the right of this field. This button displays two options; Insert Tag, and Insert Function.

OFF text

The text that will display whenever the condition entered above is false. You can use any keyboard character(s) to a maximum length of 256 characters.

For example, you could display the message Pump Off when Pump_1_CMD is false.

ON text

The text that will display whenever the condition entered above is true. You can enter any keyboard character(s) to a maximum length of 256 characters.

For example, you could display the message Pump On when Pump_1_CMD is true.

Tool TipA help message that displays in a pop-up window when an operator holds the mouse stationary over an object. You can set the tool tip under ‘Access’ option of the properties dialog box.

[Type] Multi-state This option is useful when you have several possible conditions, occurring together in different combinations, at different times. Select this option to display different text for each combination.

For example, three digital variable tags (A, B, and C) can each be ON or OFF at any time. You can display a different message for each ON/OFF combination. In other words, you could display a different message for each of the following ON/OFF combinations ABC, ABC, ABC, ABC, ABC, ABC, ABC, ABC.

19

Page 29: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 3-14: Multi-state properties of a text object.You can use all the properties above for any objects other than text objects. The only

difference is that you cannot display text instead you can display colour for different states. The help function that has be developed to extract control information (such as variable

tags and expressions), is able to extract tags and expressions used under the property fields described above. However, the help function is unable to extract the sate text for the Multi-state property field (see Chapter 4 for more details).

The ‘Tool Tip’ mechanism described above can only display text. This mechanism is unable to call any function. If it could call a function this project could have used this feature instead of developing the help function.

3.6 UPGRADING PROJECT FROM VERSION 5 TO 6The control interface of the H1 Heliac was initially built on CitectSCADA version 5. At the beginning of this honours project the original control project in version 5 was upgraded to version 6. To run an old version project in version 6 it is required to upgrade and recompile the old project in version 6.

The upgrade of the original control interface was forced in Citect version 6 by editing the Citect.ini file and by setting [CTEDIT] UPGRADE=1. This command successfully upgraded the original project; however, when the upgraded project was complied there were 464 compile errors. The following are the three different kinds of compile errors:

CSV_Include popups.Normal_shut_down@-XGA xp_style.popup_xlarge@-XGA

The CSV_Include Project is a preconfigured project that is installed with CitectSCADA Version 5.5 or later. The CSV_Include project includes a set of templates and pages styled for the Windows XP environment, which help reduce the time required to configure a new project.

When a new CitectSCADA project is created, the CSV_Include project is automatically incorporated as an included project. This means all the project's templates and associated content are available for implementation when creating your graphics pages in Graphics Builder.

However, the original control project was built on CitectSCADA version 5.0; as a result, when the upgrade was conducted version 6 tried to recognised some of the objects as CSV_Include Projects; and thus, created all these compile errors.

20

The help function is unable to extract these state texts.

Page 30: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

All the compile errors were then killed individually by going into the source of the errors using the find option of Citect. Killing all the errors made the compilation successful and the new control project ran the H1 Heliac successfully.

Chapter 4 Control Pages

The first part of this project involved getting familiar CitectSCADA by developing a simple page, such as the ‘Security’ page. After successful completion of the security page few other page were developed, which are ‘Pulse Setup’, ‘Power Supply Simple Setup’, ‘Power Supply Readback’. Two other pages were improved, which are ‘Overview_New’ and ‘!ABB_PS_PopUp’.

All the pages in this section were developed using Citect Graphics Builder and Citect Project Editor as described in section 2.7.

4.1 SECURITY PAGE

The security page has some very important features. It depicts the top view of the H1 National Facility with directions, which is shown in the figure 3-1. The H1 national facility has five doors. The names of the doors are: Hall, Control Room, Weigold Wing and East External. The doors are shown in yellow, indicating that the doors are closed. It is very important that the door remain closed when the H1 is live, except the Control Room Door.

21

Page 31: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 4-15: Security Page for the H1 National Facility

For each door there are door request buttons. If anyone wants to go through the door the request button needs to be pressed. If there is a request on a particular door, the respective door in the page will change to orange colour and the Door Request section of the page will change to green for that respective door. This indicates to the operator that there is request for a particular door. If it is safe the operator will grant the door by pressing the Grant Other Doors or Grant EXT Door button on the security page. The colour of the door becomes green when the door is opened or granted.

There are also security levels which are: Auto Doors: When this button is pressed or enabled the doors become automatic,

when the power supply is safe enough i.e. anyone can go through the door by pressing the request button.

Medium Security: When this button is pressed or enabled it means doors can be opened manually by the operator on request if the power supplies are safe enough i.e. if Gyrotron is not on.

Lockout: This button locks the doors and disables the grant door buttons. This is complete lockdown i.e. the doors cannot be opened, unless this button is disabled.

The security page also has an intruder alert indicator. This box indicator starts flashing red when the door is opened without any request in any of the three security levels.

Name of the Tags Tag Address Tag Data Type I/O Device NameOPER_DOOR_GRANT N10:2/8 DIGITAL PLC3DOOR_IMAGE B40:9 INT PLC3EXT_DOOR_REQ N10:2/3 DIGITAL PLC3DOOR_MEMORY N10:8 INT PLC3DOOR_AUTO_ON B40:8/7 DIGITAL PLC3OPER_AUTO_PB N10:2/4 DIGITAL PLC3DOOR_MED_ON B40:8/8 DIGITAL PLC3OPER_MED_PB N10:2/5 DIGITAL PLC3DOOR_LOCKOUT_ON B40:8/9 DIGITAL PLC3OPER_LOCKOUT_PB N10:2/6 DIGITAL PLC3DOOR_CONTROL_ON B40:8/6 DIGITAL PLC3OPER_CANCEL_DOOR_SEC N10:2/7 DIGITAL PLC3

22

Page 32: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Table 4-6: Tags used for the Security Page

4.2 !ABB_PS_POPUP

Figure 4-16: !ABB_PS_PopUp

This page displays the status of different parts of the H1 Heliac. For example, it displays the status of different components related to the main and secondary power supply; such as, whether the main power supply is ready, main power supply cooling is on or main power supply earth linkage is ok. If the status is ok for a field it is displayed by a green signal, if it is not ok then it displays red, as show in the above diagram.

This page is built using a genie called word_column_light and h1_horz_light. The h1_horz_light is made separately and is pasted into the word_column_light, as shown in the figure below. The word_column_light genie is then pasted repeatedly onto the !ABB_PS_PopPup page. However, these genies contain different tags, which are LCU_Status_0, LCU_Status_3, LCU_Status_4 and LCU_Status_5, to display different information. There are two more status tags, LCU_Status_1 and LCU_Status_2, which are not used in this page. The tags in this page have 16 bits and every bit of these tags conveys different messages, which the tag collects from the respective PLC. 16 bits makes one word. BITAND operation is then conducted for every bits of the tag with a hexadecimal number to

23

Page 33: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

check the status of a certain component of the H1 Heliac. For example, LCU_Status_5 bitand 4096 > 1, where LCU_Status_5 is the tag and 4096 is the hexadecimal number, which represents the 12th bit of the tag. This logical operation shows whether the secondary power supply is running or not. If the bitand operation is greater than 1 the status is ok and displays green and if it is not greater than 1 then it displays red.

Figure 4-17: word_column_light genie

24

Page 34: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

4.3 PULSE SETUP

The power supply parameters need to be configured and validated for to get plasma in H1 Heliac. All the valid parameter ranges and configurations were pre-programmed in the respective PLCs. The power supply parameters are also known as the pulse profiles (shot parameters) for both main and secondary power supplies. The respective PLC of the parameters can take input at any time; however, the PLC only processes this data when a valid remote ‘Validate Setup’ command is issued. Therefore, the Validate Setup command should be issued before firing a shot. These parameters can be verified by checking the data read back from the power supplies. The pulse parameters and their corresponding tags and I/O address are shown below:

I/O Address

Corresponding Name in the page

Tag Name Units Description (Parameters)

F100:0 i1 RPRF_PS1_MAG_1 Amps Main converter pulse magnitudeF100:1 i2 RPRF_PS1_MAG_2 Amps Main converter pulse magnitudeF100:2 i3 RPRF_PS1_MAG_3 Amps Main converter pulse magnitudeF100:3 tdel RPRF_PS1_T_DEL Secs Main converter pulse delay periodF100:4 tramp RPRF_PS1_T_RAMP Secs Main converter pulse ramp up periodF100:5 t1 RPRF_PS1_T_1 Secs Main converter 1st pulse segment periodF100:6 t2 RPRF_PS1_T_2 Secs Main converter 2nd pulse segment periodF100:7 t3 RPRF_PS1_T_3 Secs Main converter 3rd pulse segment periodF100:8 total time RPRF_PS1_T_TOT Secs Main converter total pulse durationF100:9 lmut(mH) RPRF_PS1_L_MUT Henries Main load mutual inductanceF100:10 i1 RPRF_PS2_MAG_1 Amps Sec. converter pulse magnitudeF100:11 i2 RPRF_PS2_MAG_2 Amps Sec. converter pulse magnitudeF100:12 i3 RPRF_PS2_MAG_3 Amps Sec. converter pulse magnitudeF100:13 tdel RPRF_PS2_T_DEL Secs Sec. converter pulse delay periodF100:14 tramp RPRF_PS2_T_RAMP Secs Sec. converter pulse ramp up periodF100:15 t1 RPRF_PS2_T_1 Secs Sec. converter 1st pulse segment periodF100:16 t2 RPRF_PS2_T_2 Secs Sec. converter 2nd pulse segment periodF100:17 t3 RPRF_PS2_T_3 Secs Sec. converter 3rd pulse segment periodF100:18 total time RPRF_PS2_T_TOT Secs Sec. converter total pulse durationF100:19 lmut(mH) RPRF_PS2_L_MUT Henries Sec. load mutual inductanceF100:20 Delta R Main RPRF_PS1_R_TRIM Ohms Main circuit resistance trim F100:21 R Sec RPRF_PS2_R_TRIM Ohms Sec. circuit resistance trimF100:22 L Main RPRF_PS1_L_TRIM Henries Main circuit inductance trimF100:23 L Sec. RPRF_PS2_L_MUT Henries Sec. circuit inductance trim

Table 4-7: Pulse Parameters and their respective tags and I/O address

25

Page 35: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Pulse parameters were previously setup using remote control client software CSys Client 2.0B, which needs the Java Runtime Engine Version 1.3 to run. The runtime environment of the remote client communicates with the PLCs, via internet and PLC sever written in C++. The following is the picture of ‘Pulse Setup’ page of the remote client:

Figure 4-18: Pulse Setup Page in Java environment

It is inconvenient for the user to run the Citect control interface and the remote client simultaneously. Thus, in this honours project a pulse setup page was developed in Citect to replace the remote client pulse setup page. The following is the picture of the Citect ‘Pulse Setup’ page:

26

Page 36: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 4-19: Citect Pulse Setup page

This page is similar to the remote client page. It has separate sections for main and secondary power supplies, and trim values like in the remote client interface. Even though this page does not have pulse preview graph like in the remote client interface shown in figure 3-4, this page has some extra features. The Citect pulse setup page has status display box under the trim value box. The status box displays the error messages with the highest priorities. In the remote client page you have to click onto the ‘Status Window’ button see the status window which is shown below:

Figure 4-20: Status window in the remote client interface

27

Page 37: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Moreover, the Citect pulse setup page has a validation box. When the ‘Validate’ button is pressed the LCU PLC checks the whole system setup. This includes down load and read back of 26 parameters to and from the ABB power supplies. This process takes of the order of 10 seconds to complete. The diagram below shows the messages that will be displayed depending on the success of the validation process.

Figure 4-21: Validation sequence

Also, in the Citect pulse setup page there are boxes next to the secondary and main power supply boxes, which displays whether the power supply is ready or not after validation.

This page can only be operated by users with privilege level 3 or higher.

4.4 POWER SUPPLY SIMPLE SETUP

This page is similar to the Citect pulse setup page. However, in the simple setup page you just have enter one value to set i1, i2 and i3 of the main power supply. Therefore, it is not possible to set different values for i1, i2 and i3 in the simple setup page. To set the secondary i1, i2 and i3 you just have to enter the ratio (secondary/main) and the Citect automatically calculates and sets the values for secondary i1, i2 and i3. To set the secondary current you have set the main currents first, otherwise it would not work. This page also has the validation button like in the pulse setup page. This can only be operated by users with privilege level 3 or higher. The following is the picture of the simple setup page in Citect:

28

Page 38: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 4-22: Power Supply Simple Setup page

The following is the picture of simple setup page in remote client environment:

Figure 4-23: Simple Setup page in remote client environment

29

Page 39: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

4.5 POWER SUPPLY READBACKS

Figure 4-24: Power Supply Readbacks page

This page read backs data from the main and secondary converter and verifies the pulse parameters that were set in pulse setup or in simple setup were correct and read by the PLCs. It is not possible to enter any values in this page. The values in this page update only after successful validation. The tags used in this page are as follows:

Address Name Units DescriptionN61:0 PS1_MAG_1 Amps Main converter pulse magnitudeN61:2 PS1_MAG_2 Amps Main converter pulse magnitudeN61:4 PS1_MAG_3 Amps Main converter pulse magnitudeN61:6 PS1_T_DEL 10 ms Main converter pulse delay periodN61:8 PS1_T_RAMP 10 ms Main converter pulse ramp up periodN61:10 PS1_T_1 10 ms Main converter pulse segment 1 periodN61:12 PS1_T_2 10 ms Main converter pulse segment 2 periodN61:14 PS1_T_3 10 ms Main converter pulse segment 3 periodN61:16 PS1_T_TOTAL 10 ms Main converter total pulse durationN61:18 PS1_V_MAX volts Main converter voltage limitN61:20 PS1_R_LOAD Main circuit resistanceN61:22 PS1_L_LOAD H Main circuit inductanceN61:24 PS1_L_MUTUAL H Main circuit mutual inductance

Table 4-8: Main Converter Read Back Parameters

30

Page 40: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Address Name Units DescriptionN62:0 PS2_MAG_1 Amps Secondary converter pulse magnitudeN62:2 PS2_MAG_2 Amps Secondary converter pulse magnitudeN62:4 PS2_MAG_3 Amps Secondary converter pulse magnitudeN62:6 PS2_T_DEL 10 ms Secondary converter pulse delay periodN62:8 PS2_T_RAMP 10 ms Secondary converter pulse ramp up periodN62:10 PS2_T_1 10 ms Secondary converter pulse segment 1 periodN62:12 PS2_T_2 10 ms Secondary converter pulse segment 2 periodN62:14 PS2_T_3 10 ms Secondary converter pulse segment 3 periodN62:16 PS2_T_TOTAL 10 ms Secondary converter total pulse durationN62:18 PS2_V_MAX volts Secondary converter voltage limitN62:20 PS2_R_LOAD Secondary circuit resistanceN62:22 PS2_L_LOAD H Secondary circuit inductanceN62:24 PS2_L_MUTUAL H Secondary circuit mutual inductance

Table 4-9: Secondary Converter Read Back Parameters

4.6 OVERVIEW NEW

Figure 4-25: Overview New

31

These were developed and improved in this honours project.

Page 41: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

This page was mostly developed before the commencement of this project. Only the sections indicated above were developed and improved in this honours project. The ‘Security Page’ button shown above takes the user to the security page that was discussed earlier in this chapter. PageGoto("Security Page") is a built in command, which was used in the ‘Security Page’ button. The section in the right shown above shows the status of the H1, as in the status box is the pulse setup and simple setup page. This section also shows the measured and set currents of the power supplies. Also, it shows the timeout time and the true pulse time. The ‘Enabled’ button on top status line shown above is linked with the pulse setup and simple setup page via ABB_PPS_REQUEST tag. When the ‘Enable’ button is not enabled the pulse setup and simple setup page becomes disabled i.e. the user will not be able to set any pulse parameters if the enable button is not enabled.

32

Page 42: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Chapter 5 Extracting Control Information

Extracting control information i.e. extracting the descriptions, labels (tags), expressions and sources (programmable logic controllers i.e. PLCs), of the quantities monitored and controlled, and the function of the controls is required for debugging purposes. These control information can be accessed in the configuration environment; however, Citect does not allow the user to access this information during the execution. It would be much more convenient for the user if these control information is available during the runtime environment.

A few approaches were initially considered to extract control information during the runtime, which are as follows:

Connecting the runtime environment to an external database (e.g. Excel) In this approach the plan was to connect the runtime environment of the project

to an external tag database, which will contain all the information about the tags (tag name, tag comment, I/O device name, tag address etc.) that are used in the project. A function was then planned to develop that will extract the tag information for the tags and expression that are used in an object in the runtime environment.

Extracting control information from the native tag database using super genie approach

Citect has an internal tag database, which is automatically created by Citect when a tag is defined in the Citect Project Editor. In this approach genies and super genies are used. The genies that are used in the approach pass the tag name that used in the genies to the super genie. Super genie then uses these tag names to extract other information (tag comment) about these tags and displays them in a form.

Extracting control information from the native tag database using a ‘Help Wizard’, developed with Cicode

This approach is similar the ‘Help’ wizard in Microsoft Word. A help (‘?’) button is used in this approach. By clicking on this button and sliding the cursor on top of any other object in a page will display the expressions and tags used for that object. For this approach an algorithm was developed which extracts control information from the internal tag database about an object, which is under the cursor in a page during the runtime.

The following sections describe the above approaches:

33

Page 43: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

5.1 EXTERNAL DATABASE APPROACH

The Citect runtime environment can be connected to external databases using Dynamic Data Exchange (DDE). DDE is a Microsoft Windows standard protocol set of messages and guidelines that enables communication between Windows applications on the same Windows computer.

CitectSCADA runtime behaves as a DDE server and automatically provides DDE access to the complete variable tag database. Two applications participating in Dynamic Data Exchange are said to be engaged in a DDE conversation. The application that initiates the conversation is the DDE Client, and the application that responds to the DDE Client is the DDE server.

An application can have several DDE conversations running at the same time. The application can be the DDE Client in some conversations (requesting data or services), and the DDE server (the data/service provider) in others. Each request or response in a DDE conversation specifies the data or service to be sent or received.

The Cicode DDE functions permit you to exchange data between CitectSCADA and other Windows applications running on the same computer in real time, continuously, and with no operator intervention. For example, you can send your run-time data to a DDE compliant spreadsheet (Excel) or word processing application, either by posting the data to memory for DDE access by other applications, or by writing the data directly into another application. Conversely, you could read data from a DDE compliant application like a spreadsheet or document directly into a CitectSCADA variable.

You could also run processes in any DDE compliant Windows application running on the same computer by using the Cicode DDEExec() function to send commands to that application. Similarly, you can call any Cicode function (in-built or user-written) in CitectSCADA from any Windows application (running on the same computer), that supports a DDE Execute command.

The DDERead(), DDEPost(), DDEWrite(), and DDEExec() functions (see Appendix A for more information of these Cicodes) each perform a single exchange of data. Each of these functions starts a DDE conversation with the external application, sends or receives the data (or command), and ends the conversation - all in one operation.

The DDERead(sApplication, sDocument, sItem, Mode) function is the primary cicode to extract control information from an external database. To use this code it is required to pass the variable name or field name or spreadsheet cell position. However, to extract control information, we want the variable name (tag) of the quantities monitored and controlled; therefore, DDERead() could not be used. The need to extract the tag, and search for it in the external database made this approach less viable for the first implementation.

34

Page 44: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

5.2 SUPER GENIE APPROACH

Genies and super genies were discussed earlier in this thesis. In this approach only genies and super genies are used as genies has the ability to pass tag name to super genies and super genies has the ability to extract other information about tags from the internal tag database. Two pages have been developed using this approach, which are Pulse Setup and Power Supply Readback page.

In this approach, a genie needs to be made and super genie needs to be attached with the genie. The genie attached with the super genie is then pasted onto a control page. The relevant tag name is then pasted into the genie. During the runtime the genie passes the tag name to the super genie. The super genie then pops up and displays the tag name (when the user clicks on a ‘?’ next to the genie). Also, the user can get more information about the tag (i.e. the tag comments) when the user clicks on the tag name on the super genie. The super genie extracts this tag comment from the internal tag database. Citect builds this tag database automatically when a tag is defined in Citect Project Editor.

The genie passes the tag name to the super genie using a call to AssPopUp(sPage, sTag1..8) function (see Appendix A – for information about this function). AssPopUp function also pops up the super genie. In the AssPopUp(sPage, sTag1..8) function you need to pass the super genie name, that you want to pop up, in place of sPage and the field name for tags, which you define when you create a genie, in place of sTag1..8. The constraint of using this function is that you can only pass 8 tags to the super genie; as a result, when a genie has more than 8 tags the AssPopUp() would not able pass all the tags to the super genie. Therefore, the super genie approach does not work genies with more than 8 tags.

The super genie then uses the AssInfo(nArg, nType) function to extract further information about the tag, such as the comment, from the internal tag database (see Appendix A – for more information about this function). In the AssInfo(nArg, nType) function, nArg is the number of field name that you define in the AssPopUp() function; therefore, the nArg can take numbers from 1 to 8; and, nType defines the type of information that you want to extract from the internal tag database.

nType: The type of information to get: 0 - Tag name of the association1 - Engineering units2 - Raw zero scale3 - Raw full scale4 - Engineering zero scale5 - Engineering full scale6 - Width of the format7 - Number of decimal places of formatAs we are interested to obtain the tag name nType 0 were used to extract the tag name.

35

Page 45: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 5-26: Pulse Setup Page developed with super genie approach

The above page was developed with super genie help approach. In this page if you click any of the question marks (in orange), it will pop up the tag name used for the respective item. In addition, if you click on the tag name it will pop up the tag comment for the particular tag name. For the above example, the ‘?’ for the field i1 is clicked to get the tag name for i1, which is RPRF_PS1_MAG1. The tag name is then clicked to obtain the comment, which is ‘Main converter pulse magnitude’.

Another page is also developed using the super genie help approach, which is the Power Supply Readback Page. As the Pulse Setup and the Power Supply Readback page is similar, same genie and super genie is used for both the pages.

We are also interested to extract the I/O device name and tag address. However, with the super genie approach it is only able to extract the above nType information shown above, which does not include I/O device name and tag address. Moreover, the super genie approach is also unable to the expressions used in an object. For this reason further investigation was conducted and the ‘Help Wizard’ approach was developed.

36

Page 46: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

5.3 HELP WIZARD APPROACH

The wizard approach is more powerful than the super genie approach. This approach is able to extract more information about the quantities monitored and controlled, and the function of controls. The wizard is able to extract the expressions, tags and comments for a quantity or an item including genies in a page. For example, it is able to extract expressions and tags used for an object:

Figure 5-27: The above picture shows the expressions used in a text object

The wizard approach is very simple to use. You just have to click on a question mark (?) button and then slide the cursor onto the object you wish to examine and wait for 3 seconds, the wizard will then pop up an new window displaying the first expression, tags used for the first expression and comments for those tags used for that object. Sometime it is required more than one expression to display the state of an object. Therefore, if you want all the expressions then you have to click on the ‘Next’ button on the new window; it will then pop up a new widow with the rest of the expressions with tags used for these expressions.

The following pictures show an example of the example of the wizard approach:

37

Expressions

Page 47: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 5-28: Using wizard approach

Figure 5-29: TagInfo window that pop up when using wizard approach

38

If you click on this question mark button and then slide the cursor on top of any object such as ‘Cooling Off’ above will give you the a new widow shown bellow.

1

2

3

Page 48: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 5-30: Window displaying the rest of the expressions

When you click on the next button of figure 4-4 the above window pops up with the rest of the expression, if any, used for the object.

The first window that pops up with first expression of an object is smaller in size so that it does not hide too much of the screen. In most case, an object has one expression; and thus, the first window is sufficient for most of the objects.

39

Page 49: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

The wizard approach is developed using Cicode in Cicode Editor. The following functions were used to develop the wizard:

40

FUNCTION GetExpInfoOne()//gets the first expression

INT hANINT hInfo;INT iRawValue;INT iEngineeringValue;INT iNumberOfExpressions;INT iNumberOfTags;INT iExpressionIndex;INT iTagIndex;STRING sObjectType;STRING sExpressionText;STRING sExpressionResult;STRING sExpressionContext;STRING sTagName;STRING sTag;

hAN = KeyGetCursor(); hInfo = DspInfoNew(hAN);

IF (hInfo > -1) THENFormNew("Tag Info",80,30,2);FormButton (75, 0, " Next ", DelayInfo1, 0);

sObjectType = DspInfo(hInfo, 0, 0);iNumberOfExpressions = StrToInt (DspInfo (hInfo, 7, 0));

FormPrompt(0,0, "Expression:");FormPrompt(0,28, "No of expressions:");FormPrompt(0,5, "Tag Names:");FormPrompt(0,15, "Comments:");FormPrompt(2, 29, iNumberOfExpressions);

FOR iExpressionIndex = 0 TO 0 DO

sExpressionText = DspInfo(hInfo, 1, iExpressionIndex);sExpressionResult = DspInfo(hInfo, 2, iExpressionIndex);sExpressionContext = DspInfo(hInfo, 6, iExpressionIndex);iNumberOfTags = StrToInt(DspInfo(hInfo, 8, iExpressionIndex));

FormPrompt(iExpressionIndex,iExpressionIndex+1,sExpressionText);

FOR iTagIndex = 0 TO iNumberOfTags - 1 DO

sTagName = DspInfo(hInfo, 3, iTagIndex);sTag = TagInfo(sTagName,16);

FormPrompt(iTagIndex+30*iExpressionIndex ,iTagIndex+6,sTagName);FormPrompt(iTagIndex+30*iExpressionIndex,iTagIndex+16,sTag);

ENDENDENDFormRead(0);DspInfoDestroy(hInfo); // Destroy the object info block when done

END

Page 50: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 5-31: GetExpInfoOne Function

Figure 5-32: GetExpInfoNext Function

41

FUNCTION GetExpInfoNext()//gets the rest of the expressions

INT hAN;INT hInfo;INT iRawValue;INT iEngineeringValue;INT iNumberOfExpressions;INT iNumberOfTags;INT iExpressionIndex;INT iTagIndex;STRING sObjectType;STRING sExpressionText;STRING sExpressionResult;STRING sExpressionContext;STRING sTagName;STRING sTag;

hAN = KeyGetCursor(); hInfo = DspInfoNew(hAN);IF (hInfo > -1) THENFormNew("Tag Info",131,40,2);FormButton (125, 0, " Next ", DelayInfo1 , 0);sObjectType = DspInfo(hInfo, 0, 0);iNumberOfExpressions = StrToInt (DspInfo (hInfo, 7, 0));FormPrompt(0,0, "Expression:");FormPrompt(0,38, "No of expressions:");FormPrompt(0,10, "Tag Names:");FormPrompt(0,25, "Comments:");FormPrompt(2, 39, iNumberOfExpressions);

FOR iExpressionIndex = 1 TO iNumberOfExpressions - 1 DO

sExpressionText = DspInfo(hInfo, 1, iExpressionIndex);sExpressionResult = DspInfo(hInfo, 2, iExpressionIndex);sExpressionContext = DspInfo(hInfo, 6, iExpressionIndex);iNumberOfTags = StrToInt(DspInfo(hInfo, 8, iExpressionIndex));FormPrompt(iExpressionIndex,iExpressionIndex+1,sExpressionText);

FOR iTagIndex = 0 TO iNumberOfTags - 1 DO

sTagName = DspInfo(hInfo, 3, iTagIndex);sTag = TagInfo(sTagName,16);

FormPrompt(iTagIndex+20*(iExpressionIndex-1) ,iTagIndex+11,sTagName);FormPrompt(iTagIndex+30*(iExpressionIndex-1),iTagIndex+26,sTag);END

ENDENDFormRead(0);DspInfoDestroy(hInfo); // Destroy the object info block when done

END

Page 51: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 5-33: DelayInfo1 Function

Figure 5-34: DelayInfo Function

To invoke the help wizard button (‘?’ button), DelayInfo() function is inserted into the ‘Input’ field of the button, as shown below. The rest of the functions are called within the DelayInfo() function.

Figure 5-35: Input field of the ‘?’ button

42

INTFUNCTION

DelayInfo()

Sleep(3);GetExpInfoOne();RETURN 0;//it needs an integer value because it calls a button.

END

INTFUNCTION

DelayInfo1()

Sleep(3);GetExpInfoNext();RETURN 0;//it needs an integer value because it calls a button.

END

Page 52: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

In the DelayInfo() the Sleep(3) command delays the processing time of the code by 3 seconds, so that the user can slide the cursor to other objects in the page. After 3 seconds, the GetExpInfoOne() function is called.

In the GetExpInfoOne() function, first the animation number (AN) of the object on which cursor is waiting is extracted. Every object in a page has a unique animation number, which the Citect provides when an object is created in the Graphics Builder. Citect distinguishes between objects using this unique animation number. The animation number is extracted using the KeyGetCursor() command. The animation number is then passed to the DspInfoNew() command. This command creates an object information block i.e. it accumulates some important information about the object; such as, the variable tag name, object expression text and others. Please see appendix for more information about this command. DspInfo() command is then used in a loop to extract individual information from the information block that has been created using DspInfoNew() command.

FromNew() command is used to create the display window and FormPrompt() command is used to write in the display window. Also, FormButton() command is used create the ‘Next’ button, which calls the DelayInfo1() and GetExpInfoNext() function to display the rest of the expressions, tags and comments in the object. Please see appendix to see more about the commands mentioned above.

The above functions is unable to determine in which object the cursor is on if the object is not selected. Consequently a call to the Null() function needs to be included in the ‘input’ field of an object to make the object sensitive to this ‘Help Wizard’.

This ‘Help Wizard’ is unable to extract tag information, such as I/O device name and tag address name. To extract this information another ‘Help Wizard’ was developed which is call ‘Form?’. The section below describes this wizard.

43

Page 53: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

5.3.1 Wizard using InfoForm

Figure 5-36: Wizard using InfoForm

The question mark wizard that is described in the previous section is unable to extract other information; such as, Data type of the tags or I/O address of the tags. These information can be extracted for an object using a very powerful Citect built in function InfoForm(), which is shown in the above picture. The following is the function is used for the ‘Form?’ help wizard:

Figure 5-37: InForm() function

The InfoForm (‘Form?’) wizard works the same way as the question mark wizard. This is a very simple function and yet very powerful. The ‘Form?’ button was invoked by inserting the InForm function into the ‘Input’ field of the button shown below:

44

FUNCTION

InForm()

Sleep(3)

InfoForm()

END

Page 54: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Figure 5-38: Input field of the ‘Form?’ button

However, the InfoForm() command does not work is there is a complex expression in an object; such as, show in figure 4-3; and thus, the question mark (‘?’ button) wizard comes in use when there is complex expressions in an object.

5.4 ADVANTAGES OF THE HELP WIZARDS

The ‘Help Wizards’ have some advantages over the super genie approach. The ‘Help Wizards’ are easier to implement in pages those are already built and also in new pages. There are many pages those were built without genies; thus, to implement the super genies approach in those pages requires rebuilding the whole page using genies. Other the other hand, to implement the wizard it is just required to insert the wizard buttons into the pages and insert the Null() function to the objects. Moreover, the help wizards are able to extract more information about an object in a page.

The ‘Help Wizards’ also have other advantages. They almost eliminates the use of ‘Tool Tip’ option as information in the ‘Tool Tip’ often would be very similar to the tag comment; and thus, eliminates in documentation. ‘Tool Tip’ needs to be entered separately for every object in a page. As a result, every time there is an update in the internal tag database every object that are affected by the change needs to be edited every time. The ‘Help Wizards’ eliminates this problem as they extract information directly from internal tag database where the update is made. Moreover, there will be some ‘popup’ help available for every object even if the programmer has not entered any.

45

Page 55: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Chapter 6 Conclusion

This thesis has described the techniques used to develop a control page in Citect SCADA, human machine interface software. CitectSCADA environment is conceptually divided into two parts: Configuration and Runtime environment.

The control pages are developed in the configuration environment using the Citect Graphic Builder, Citect Project Editor and Cicode Editor. Tags are sources of quantities controlled and monitored. These tags were used in the object properties box to make the object to perform certain task in a page. Operators and tags were used make an expression. The resulting output of the expression was used to control or monitor quantities in page. All the objects in a control page starts communication with the PLCs in the runtime environment.

First part of this project involved developing control pages. At first, the Security page was developed, which controls the operation of the doors in the H1 facility. There are there levels of security, which are auto doors, medium security and lockout. When the doors are in auto doors security level, doors opens automatically when a person comes in front of the door. In medium security level, the person who wants to go through the door needs to press a request button situated next to the door. The request is displayed on the Security page. The operator then grants the request by clicking on the respective grant button if the power supplies are safe enough. In Lockout security level no one is allow to pass through the doors and all the grant buttons are disabled.

Pulse Setup page was developed to replace remote client pulse setup page, which runs on Java. Pulse Setup page is used setup power supply parameters of the H1. A ‘Validate’ button is also used in this page, which checks which checks for the correct parameter values. This page also has a status box, which displays the error in the H1 system with highest priority.

Power Supply Simple Setup page is similar to the pulse setup page. However, in this page three values need to be entered to set all the power supply parameters.

Power Supply Readback page feedback the power parameters to the user, after a successful validation.

!ABB_PS_PopPup page displays the status of different components of the H1 Heliac. Genies were used in this page and bitand operation was with the respective tags to display the status of the components.

The second part of the project involved extracting control information i.e. extracting the descriptions, labels (tags), expressions and sources (programmable logic controllers i.e. PLCs), of the quantities monitored and controlled, and the function of the controls is required for debugging purposes. Three approaches were researched to extract this information, which are external database approach, super genie approach, and help wizard approach.

The external database approach was not developed due to the complication of the extracting the tags and expressions of an object and searching them in the external database.

The super genie approach was developed and implemented in two pages (Pulse Setup and Power Supply Readback page). In this approach the genie passes the tag names to the super genie and the super genie extract other tag information, such as tag comments, from the internal tag database. However, this approach is unable to extract expressions used in an

46

Page 56: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

object and other important tag information such as tag address and I/O device name. Moreover, this approach is hard to implement in pages that are already built without genies.

The help wizards approach is able to extract expressions used in an object and other useful tag information such as tag address and I/O device name. This approach works by clicking on the help wizard button and then sliding the cursor on top of the object the user wants to examine. The wizard then pops up the expressions used in the object. This approach eliminates the use of the ‘Tool Tip’ option as most of the tips are similar to the tag comments.

6.1 FUTURE WORK

The help wizards are unable to extract the state text of an object. Research has shown that the state text can be extracted using a built in Citect function, which is PropertiesDisplayValueGet(). However, this function can not be used in Cicode as it is a function of CitectVBA. This language is completely different than Cicode. More research needs to be conducted to develop a CitectVBA function that will be able to extract the state text of an object.

More research is required to make the external database approach work. In the internal database detail information about tag cannot be inserted. As a result, developing the external database approach will more helpful for debugging.

47

Page 57: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Bibliography

[1] Physics Web. http://www.physicsweb.org/ [accessed 8 July 2006]

[2] Australian ITER Forum. http://www.ainse.edu.au/fusion/ [accessed 3 August 2006]

[3] C.A Michael. Doppler Spectroscopy of Argon Plasmas in H1-NF using a coherence imaging camera. 2003.

[4] Rockwell Automation. http://www.ab.com/en/epub/catalogs/12762/2181376/2416247/1239758/2170841/ [accessed 3 August 2006]

[5] Warr George B. A multi-view interferometer for electron density tomography on the H-1 NF Heliac. 1998.

[6] Citect. http://www.citect.com/ [accessed 8 July 2006]

48

Page 58: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Appendix – Cicode Commands

1) DDEExec Executes a command in an external Windows application running on the same computer. With this function, you can control other applications that support DDE. Refer to the documentation provided with the external Windows application to determine if DDE is supported and what functions can be called.

You cannot use DDEExec() to call macros on a remote computer or to call Access SQLs. For these calls, Network DDE needs to pass the sDocument argument, so you must use the DDEh... functions, passing sDocument in the DDEhInitiate() function.

Syntax DDEExec(sApplication, sCommand)

sApplication: Application name (.EXE filename), e.g. "WinWord".

sCommand: The command that the application will execute. Return Value 1 (one) if successful, otherwise an error is returned.

Example /* Instruct the Excel application to recalculate its spreadsheet immediately.*/

DDEExec("Excel","[Calculate.Now()]");

2) DDERead Reads values from an external DDE compliant Windows application running on the same computer, (e.g. from an Excel spreadsheet cell or a Word document).

This is a one-way static communication which is read once from the application per call. To read the value dynamically, you must call this function at the rate at which the data is required to be updated.

49

Page 59: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Use this function when you want precise control over exactly what you want from the DDE exchange. Syntax DDERead(sApplication, sDocument, sItem, Mode)

sApplication: The application name (.EXE filename), e.g. "WinWord". sDocument: The document, topic, or file name. sItem: A unique name for the item; for example, the variable name, field name, or spreadsheet cell position. Mode: A flag that tells the application whether or not to set up an advise loop: 0 - Do not set up advise loop.1 - Set up advise loop (default).Return Value The value (from the external application) as a string, or an empty string if the function fails.

Example /* Read the value from R1C1 (Row1,Column1) of an Excel spreadsheet named "Sheet1". */DDERead("Excel","Sheet1","R1C1");

/* Read the value from the Item1 bookmark of the Word document named "Recipes.doc". */DDERead("Winword","Recipes","Item1");

3) DDEWrite Writes a value to an external Windows application, e.g. to an Excel spreadsheet. The value is written once to the application. To write the value dynamically, you must call this function at the rate at which the data must be updated.

Use DDEWrite() to cause CitectSCADA runtime to initiate the DDE conversation with a DDE compliant application running on the same computer. Syntax DDEWrite(sApplication, sDocument, sItem, sValue) sApplication: The application name (.EXE filename), e.g. "WinWord". sDocument: The document, topic, or file name. sItemA unique name for the item; for example, the variable name, field name, or spreadsheet cell position.

50

Page 60: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

sValueThe value of the item. Return Value The value that is sent to the other application, or an empty string if the function fails.

Example /* Write the value of a CitectSCADA variable named TAGONE to R1C1 (Row1,Column1) of an Excel spreadsheet named "Sheet1". The value is in string format. */DDEWrite("Excel","Sheet1","R1C1",TAGONE);

4) DDEPost Makes a CitectSCADA variable value available for DDE linking (i.e. posts a DDE link so that it can be read by other DDE compliant applications running on the same computer). This sets-up CitectSCADA to behave as a DDE Server for this DDE channel.

After a value is posted, other Windows applications running on the same computer can read the value by using their own DDE Client functions. If the value of the posted variable changes, any linked applications are informed of the new value.

To link to this value from any DDE Client applications running on the same computer, they must appropriately use the DDE Client syntax with:

"Citect" as the <DDE Server application name>"Data" as the <DDE Topic name>

The name used for the first parameter sItem in this DDEPost() function as the <DDE data item name>.

Unlike the DDERead() and DDEWrite() Cicode functions which are static, the DDEPost() function can be used to create a dynamic DDE link, providing the DDE Client applications appropriately set their side of the DDE channel to be automatically updated. Syntax DDEPost(sItem, sValue) sItem: A unique name for the item; for example, the variable name, field name, or spreadsheet cell position. sValue: The value of the item. Return Value The value that is posted, or 0 (zero) if the function fails.

Example ! In Citect Project Editor, create a variable tag named PV1

! In Cicode, post a link to the tag PV1 for external DDE applications to connect with DDEPost("TAGONE",PV1);

51

Page 61: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

/* To link to this posted tag from a cell in Excel, set the cell to

=Citect|Data!TAGONE. This will set the value of the Excel cell to the value of tag PV1. */

/* To link to this posted tag from a field in Word, set the field to{DDEAuto Citect Data TAGONE}. This will set the value of the field link to the value of tag PV1. */

5) AssPopUp Associates up to eight variable tags with a Super Genie and displays the Super Genie in a popup window. The first variable tag (sTag1) replaces Super Genie substitution string 1. The second variable tag (sTag2) replaces substitution string 2, and so on.

This function has the same effect as calling the Ass() function or the AssTag() function eight times, and then calling the WinNewAt() function to create a window at the position of the mouse. The AssPopUp() function is a quick way of associating eight Super Genie variables and displaying the Super Genie in a new window at the same time.

If you want to associate more than eight tags with the Super Genie, you must call the AssVarTags(), AssTag(), or Ass() function to create the associations before you call this function.

Note: This function prevents the Super Genie from being opened more than once (at the same time). However, the same Super Genie with different associations can be opened.

Syntax AssPopUp(sPage, sTag1..8) sPage: The page name of the Super Genie. If you prefixed your Super Genie page name with an exclamation mark (!), remember to include it here. sTag1..sTag8: The first 8 physical tags to be associated with the Super Genie. For any given Super Genie, the variable tags will replace the Super Genie substitution strings as follows:

Variable tag... replaces substitution string... sTag1 1 sTag2 2 sTag3 3 sTag4 4 sTag5 5 sTag6 6 sTag7 7 sTag8 8

52

Page 62: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Because there is a strict correlation between the variable tag numbers and the substitution string numbers, it is important to know how your Super Genie substitutions are numbered. For example, if your Super Genie has three unique substitution strings, numbered 1, 3, & 4, you must enter a blank ("") for sTag2.

The variable tags that you specify here must be the same data type as that specified by the relevant Super Genie substitution strings. For example, only a digital tag could replace the substitution string ?DIGITAL 4?. If the substitution string does not specify a type (e.g. ?5?), you can use any type except STRING.

Return Value 0 (zero) if successful, otherwise an error is returned.

Example // Associate 3 tags with the Super Genie then display it

AssPopUp("!MyGenie", "PV123", "OP123", "SP123");

6) AssInfoGets association information about the current Super Genie (i.e. information about a variable tag that has been substituted into the Super Genie). You can only call this function on a Super Genie after all the associations are completed.

Use this function to display association information as part of the Super Genie. For example, if you have a Super Genie that is a loop controller, you could display the name of the loop at the top of the loop controller box. Each time the Super Genie is used with different associations (specifically a different tag name association) the correct loop name will be displayed. Syntax AssInfo(nArg, nType)

nArg: When you associate variable tags with super Genies, the Super Genie substitution strings are replaced by variable tags. The nArg argument allows you to get information about one of those variable tags. All you need to know is which substitution string it replaced when the association was performed.

Enter the argument number (substitution string number) of the relevant substitution string. For example, if you want information about the variable that replaced substitution string ?INT 3? set nArg to 3.

nType: The type of information to get: 0 - Tag name of the association1 - Engineering units

53

Page 63: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

2 - Raw zero scale3 - Raw full scale4 - Engineering zero scale5 - Engineering full scale6 - Width of the format7 - Number of decimal places of format.

Return Value The value of the information as a string. Example sTag = AssInfo(1, 0); // Get the name of association 1

sEngLow = AssInfo(1, 4); // get the low engineering scale of association 1

7) KeyGetCursor

Gets the AN at the position of the command cursor. If you are using groups, and there are currently two command cursors, the AN for the innermost will be returned. For example, if there is a cursor for a group as well as a cursor for one of its objects, the AN for the object will be returned.

Syntax KeyGetCursor()

Return Value

The AN at the position of the command cursor. If no cursor is visible, -1 is returned.

8) DspInfoNew

Creates an object information block. Use this function with the associated low-level animation information functions to get and process object information on an AN.

Note: When you have finished with the object information block, you must destroy it with the DspInfoDestroy() function, or a fatal error could occur.

If you need simple animation help, use the InfoForm() or the InfoFormAn() functions.

Syntax

DspInfoNew(hAn)

hAn: The AN for which object information is provided.

54

Page 64: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Return Value

The object information block handle. If no object data is available, then -1 is returned.

9) DspInfo

Extracts individual pieces of object information from an AN. Each AN can have multiple expressions associated with it, and each expression can have multiple variables associated with it. You use an index to refer to each individual expressions or variables. Typically, you would query the number of expressions, then the number of variables in a given expression, then the details of a given variable tag.

Note: You must first create a handle to the information block using DspInfoNew().

Syntax

DspInfo(hInfo, Type, Index)

hInfo: The object information block handle, as returned by DspInfoNew(). This handle identifies the table (or block) where all object data is stored.

Type: The type of data to extract:

0 - Object title (the name of the object type)

1 - Object expression text

2 - Object expression result text

3 - The variable tag name

4 - The raw value of the variable

5 - The engineering value associated with the variable

6 - The Cicode context. Calling DspInfo with this Type will return a string describing the context in which the Cicode expression is contained. For example, if it appears on the horizontal movement tab it would return "Move X".

55

Page 65: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

7 - The number of Cicode expressions. Calling DspInfo with this Type will return the number of Cicode expressions associated with this animation point.

8 - The number of tags in the expression. Calling DspInfo with this Type will return the number of tags that appear in the given Cicode expression.

Index: AN index to the variable within the information block. The required index changes according to the Type as follows:

For Types 0 to 2, 6 and 8, the index must be set to the index of the expression that you wish to query.

For Types 3 to 5, the index must be set to the index of the tag that you wish to query. When one of these types is used, DspInfo will query the tag in the most recently queried expression (otherwise expression 0).

For Type 7, the index is ignored.

Return Value

The object information (as a string). A blank string is returned if you specify a non-existent expression or variable.

10) FormNew

Creates a new data entry form and defines its size and mode. After the form is created, you can add fields, and then display the form.

Before you can display a form on the screen, you must call this function to set the size and mode of the form, and then call the various form field functions, FormInput(), FormButton(), FormEdit() etc to add user input fields to the form. To display the form on the screen (to allow the user to enter data) call the FormRead() function.

Syntax FormNew(Title, Width, Height, Mode)

Title: The title of the form.

Width: The character width of the form (1 to 131).

Height: The character height of the form (1 to 131).

56

Page 66: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Mode: The mode of the form:

0 - Default font and text spacing

1 - Small font

2 - Fixed pitch font

4 - Static text compression where the vertical spacing is reduced. This can cause problems if buttons are too close, because the vertical spacing will be less than the height of a button.

8 - Keep the form on top of the CitectSCADA window.

16 - The current window cannot be changed or closed until the form is finished or cancelled.

32 - Makes a form with no caption.

128 - The form will not close if the ESC or ENTER key is pressed, unless you specifically define at least one button on the form which acts as an OK or Cancel button. For a form with no buttons, the ENTER key normally closes the form; this mode disables that behaviour.

Multiple modes can be selected by adding them (for example, to use Modes 4 and 2, specify Mode 6).

Return Value

The form handle if the form is created successfully, otherwise -1 is returned. The form handle identifies the table where all data on the associated form is stored

11)FormButton

Adds a button to the current form. You can add buttons that run callback functions (specified in Fn) to perform any actions you need, as well as the standard buttons - an [OK] button to save the operator's entries and close the form, and a [Cancel] button to close the form but discard the changes.

You should call this function only after the FormNew() function and before the FormRead() function. The button is added to the form at the specified column and row position. The width of the button is automatically sized to suit the text.

Syntax

FormButton(Col, Row, sText, Fn, Mode)

57

Page 67: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Col: The number of the column in which the button will be placed. Enter a number from 0 (column 1) to the form width - 1. For example, to place the button in column 8, enter 7.

Row: The number of the row in which the button will be placed. Enter a number from 0 (row 1) to the form height - 1. For example, to place the button in row 6, enter 5.

sText: The text to display on the button.

Fn: The callback function to call when the button is selected. Set to 0 to call no function. Note that the Fn parameter must be of type INT and the callback function cannot contain a blocking function.

Mode: Button mode:

0 - Normal button. When this button is selected the callback function is called.

1 - OK button. When this button is selected, the form is closed, and all operator-entered data is copied to buffers (specified by the other form functions). FormRead() returns 0 (zero) to indicate a successful read. The callback function specified in Fn is called. Note that this mode destroys the form.

2 - Cancel button. When this button is selected, the form is closed and operator-entered data is discarded. FormRead() returns with an error 299. The callback function specified in Fn is called. Note that this mode destroys the form.

Return Value

The field handle if the button is successfully added, otherwise -1 is returned.

12)FormPrompt

Adds a prompt field to the current form. You should call this function only after the FormNew() function and before the FormRead() function.

Syntax

FormPrompt(Col, Row, Prompt)

Col: The number of the column in which the prompt will be placed. Enter a number from 0 (column 1) to the form width - 1. For example, to place the prompt in column 8, enter 7.

58

Page 68: Chapter 1 - Research School of Physics and Engineering ...people.physics.anu.edu.au/~bdb112/theses/Benazir_Honours... · Web viewRaw Zero Scale / Raw Full Scale: The unscaled (raw)

Row: The number of the row in which the prompt will be placed. Enter a number from 0 (row 1) to the form height - 1. For example, to place the prompt in row 6, enter 5.

Prompt: The prompt string.

Return Value

The field handle if it is added successfully, otherwise -1 is returned.

59