You are on page 1of 150

System Technical Guide

How can I …
accelerate the engineering workflow?
Disclaimer
This document is not comprehensive for any systems using the given architecture
and does not absolve users of their duty to uphold the safety requirements for the
equipment used in their systems or compliance with both national or international
safety laws and regulations.

Readers are considered to already know how to use the products described in this
document.

This document does not replace any specific product documentation.

3
The STG Collection
System Technical Guides (STG) are designed to help project engineers and Alliance
System Integrators during the development of a project. The STGs support users
during the architecture selection and the project execution (design, configuration,
implementation and operation) phases with an introduction to the system operating
modes.

Each STG is a starter kit that provides users with:

• Technical documentation

• Application examples

• Object libraries

Each STG addresses one or several customer challenges within the proposed
solution using the offer from Schneider Electric.

All explanations and applications have been developed by both Schneider Electric
experts and System Integrators in our solution labs. The contribution from the system
integrators helps the kit’s contents meet the expectations of our users.

All STGs are illustrated with industry-specific applications to give more concrete
examples of the methodology.

It is not intended that the STGs be used as substitutes for the technical
documentation related to the individual components, but rather used to compliment
these materials and training.

Development Environment
Each STG has been developed in one of our solution platform labs using a typical
PlantStruxure architecture.

PlantStruxure, the Process Automation System from Schneider Electric, is a


collaborative system that allows industrial and infrastructure companies to meet their
automation needs and at the same time address growing energy management
requirements. In a single environment, measured energy and process data can be
analyzed to yield a holistically optimized plant.

4
Table of Contents

1. Introduction...........................................................................7

1.1. Purpose ........................................................................................................................................................ 7

1.2. Customer Challenges ................................................................................................................................... 7

1.3. Prerequisites ................................................................................................................................................ 8

1.4 Project Methodology..................................................................................................................................... 8

1.5. Presentation of the Project......................................................................................................................... 11

2. Selection..............................................................................15

2.1. Process Description ................................................................................................................................... 17

2.2. Functional Analysis.................................................................................................................................... 18

2.3. Naming Rules ............................................................................................................................................. 26

2.4. Final P&ID of the Project.......................................................................................................................... 27

2.5. PlantStruxure Architecture Topology ........................................................................................................ 28

2.6. Automation Requirements .......................................................................................................................... 30

2.7. Access Level ............................................................................................................................................... 34

2.8. Operating Modes........................................................................................................................................ 35

3. Design..................................................................................37

3.1. sg² Overview............................................................................................................................................... 38

3.2. sg² Libraries ............................................................................................................................................... 41

3.3. Components Creation................................................................................................................................. 54

3.4. Navigation Rules ........................................................................................................................................ 73

4. Configuration ......................................................................75

4.1. PAC Configuration with Unity Pro ............................................................................................................ 76

4.2. sg² Framework ........................................................................................................................................... 79

4.3. OFS Configuration..................................................................................................................................... 82

5
4.4. ODBC (Open DataBase Connectivity) Configuration ............................................................................... 84

5. Implementation ...................................................................85

5.1. Unity Pro Generation with SGStudio Workbench...................................................................................... 86

5.2. OFS .......................................................................................................................................................... 111

5.3. Vijeo Citect Tags Generation with sg² Framework.................................................................................. 113

5.4. Unity Pro and Vijeo Citect Finalization................................................................................................... 120

5.5. Incremental Implementation .................................................................................................................... 139

6. Operation...........................................................................143

6.1. User Guide ............................................................................................................................................... 143

6
1-Introduction

1. Introduction

1.1. Purpose

The goal of this System Technical Guide (STG) is to provide recommendations,


guidelines, and examples to help develop a process control application.

This guide proposes a methodology to implement a process control application using


sg² as a system engineering tool, which is part of SoCollaborative Engineering in line
with PlantStruxure Control System. Moreover, the STG suggests best practices to
take advantage of system openness while reducing the risks of misuse and
misunderstanding.

The recommendations and guidelines provided in the following chapters of this STG
are generic and are targeted at process applications such as mining, cement, oil and
gas, and so on. However, we use the specific example of a wastewater plant with an
automation project based on a PlantStruxure Control System to illustrate a process
application developed with sg². Starting from the process analysis, a Bottom-up
approach is used to develop the project.

Finally, the single used database facilitates the data handling between SCADA and
PAC systems in terms of processing, storage, and redundancy.

1.2. Customer Challenges

For customers in industries that require the type of application mentioned above, the
challenges are:

• Engineering time reduction

• Ease of future extension

• Standardization of developments in the event or reuse

These challenges acted as a guide during the solution development. This guide
suggests best practices to address these challenges and highlight specific areas
including how to:

• Observe the customers standards in terms of naming rules, operation rules,


operating modes and State-of-the-art start/stop sequences/d maintenance.

7
1-Introduction

• Customize an application including objects, variables, and pictures to fit the


project requirements and standards. Through this customization and the project
oriented development, previous developments such as methods, programming,
interface (pictures and HMI), and objects can be reused.

1.3. Prerequisites

We recommend the user have knowledge of the following software:

• Unity Pro

• Vijeo Citect

• OFS

1.4 Project Methodology

This STG explains the project methodology and includes the following phases:
Selection, Design, Configuration, Implementation, and Operation. The document
provides a step-by-step methodology to create an application with SoCollaborative
Engineering used as a system engineering tool. Here is an overview of this method:

• Selection. The P&ID (Piping and Instrumentation Diagram) of the plant process is
used as the starting point for this analysis. This phase includes the following
seven topics to help you select the most appropriate solution for your application:

1. Functional analysis: From this analysis and the process description,


the proposed methodology allows you to divide your factory into Units
and to establish the automation system architecture topology.

2. Naming rules: This analysis shows how to define naming rules


according to the customer standards.

3. P&ID: Lean how to finalize your P&ID, applying the previously defined
naming rules.

4. Automation system’s architecture: Define the project’s topology,


following the customer requirements.

5. Automation requirements: From the process needs, establish the


hardware library. List the necessary modules and devices following
the P&ID conception.

6. Operator requirements: Lean how to categorize, prioritize, and filter


your information according to its criticality.

8
1-Introduction

7. Operating modes: this section describes the operating modes that


manage the installation (remote and local).

• Design. This phase includes three topics to help you build the core application:

1. Library selection: Learn how to select the most appropriates objects


in the sg² libraries from the sg² documentation.

2. Library definition and customization: Build the project objects library


based on the sg² process library, by add and customize your objects.
This step is described through 3 software: Unity Pro, sg² and Vijeo
Citect.

3. Vijeo Citect Navigation: Customize the sg² project to meet the project
constraints and requirements.

• Configuration. This phase explains the different elements that you have to set up:

1. PAC Configuration in Unity Pro

2. Vijeo Citect tags generation using sg² Framework

3. Communication configuration using OFS

• Implementation. This phase explains the final adjustments required for an


application in terms of:

4. Unity Pro project: this section explains how to develop with SGStudio
Workbench in order to generate the Unity Pro application.

5. OFS: learn how to configure OFS to allow the communication with the
unlocated variables of the Unity Pro application.

6. Vijeo Citect: This section explains how to develop with sg² Framework
in order to generate the Vijeo Citect application.

7. Finalizing the Unity Pro and Vijeo Citect applications

8. Updating the project: Emphasis is on the incremental generation and


the care to be taken into account in the event of an additional code
implementation.

• Operation. This phase summarizes what the operator can do with the final
SCADA application:

1. Process visualization and navigation

2. Alarms

3. Trends

4. Specific sg² components

9
1-Introduction

The following illustration shows a synoptic view of the project’s approach:

Plant P&ID Diagram

Architecture

SoCollaborative with sg²

Logic Section SCADA


(Unity Pro) (Vijeo Citect tags
Genie and SuperGenie)

10
1-Introduction

1.5. Presentation of the Project

The pre-treatment of a wastewater plant, the mechanical treatment steps, include the
following:

• Lifting,

• Screening,

• Grease and sand removal,

• Primary clarifier.

The following picture illustrates a wastewater installation plant. The project considers
the mechanical cleaning section only, which is highlighted:

Lifting
Screening

Grease&Sand

Primary Clarifier

11
1-Introduction

In the following paragraphs, you find a short description of each functional unit of the
project.

1) Lifting. The aim of this unit is to lift effluents toward the next unit (screening). It
includes two elements:

1-1) a wastewater tank gathers water from


sewage. Three pumps lift the flow to the
next unit, trough a pumping system unit.

1-2) a rainwater tank collects rainwater,


and acts as a buffer for the wastewater
tank.

2) Screening. In this unit, the effluents go through a metallic screen, a sifter, in order
to catch the more voluminous wastes. It includes two main elements:

2-1) a screener included in a tank


separates the bigger wastes from the
wastewater, and the resulting flows are
sent to the next unit.

2-2) a system, composed of a conveyor


and a waste compactor, extracts and
agglomerates the wastes from the tank.

12
1-Introduction

3) Grease & Sand Removal. This unit allows sand to deposit at the bottom of a tank
and also gathers greases. The plant includes a Grease & Sand removal tank.

It includes two elements:

3-1) a scraper with a pumping system


gathers the sand deposits,

3-2) an air injection system separates


greases from water, and brings them to the
water surface.

4) Primary clarifier. The aim of this unit is to clarify the water before biological
treatment. It includes a clarifier in the shape of a cyclone. The plant has only one
Clarifier basin. Two main elements compose this unit:

4-1) a pumping system gathers the primary


sludge,

4-2) a motorized system scrapes the


basin’s bottom..

13
1-Introduction

14
2-Selection

2. Selection
This chapter describes how to perform, from the P&ID (Piping and Instrumentation
Diagram) of the wastewater plant, the functional analysis of the process. It proposes
a methodology for:

• analyzing the plant process and highlighting the characteristics of all equipment
used in this process.

• analyzing customer standards in order to propose operational rules.

• defining the requirements of selecting the object library in the next phase.

This illustration summarizes the different steps to develop the project:

15
2-Selection

To follow this methodology, you must gather information from different sources:

• process system diagrams (P&ID)

• functional specifications

• operator requirements

• Automation system architecture including field devices and I/O lists

• company standards

This information is used to either choose the most appropriate components in the
current process libraries or to build new components required to handle the project’s
process.

16
2-Selection

2.1. Process Description

An industrial process can be described with a P&ID diagram. Our project is the pre-
treatment for a wastewater plant, that is, the mechanical cleaning parts.

The following P&ID without any tag is used in this step to analyze the process:

17
2-Selection

2.2. Functional Analysis

2.2.1. Introduction

From the plant analysis, the functional analysis can be performed using the ISA-S88
international standard. A bottom up approach is applied to analyze the process and
then to design the automation application. The functional analysis leads to the choice
of the required components in the software libraries.

The pre-treatment of the wastewater plant includes four functional units:

• Lifting,

• Screening,

• Grease and sand removal,

• Primary clarifier.

The following paragraphs describe the process philosophy of each functional unit,
and what we consider as a common functioning.

18
2-Selection

2.2.2. Lifting

The aim of this unit is to lift effluents toward the next unit (screening). Two tanks
compose this unit: wastewater and rainwater tanks.

Wastewater Tank

• Functioning and Equipment

An analog level transmitter (gauged in


meters) manages the regulation of the
basin’s level. The setpoint can be accessed
from the supervision. This tank contains
three pumps (primary, secondary and
rescue) to lift the water. All of which are
managed by variable speed drives. The
regulation loop commands the pump drives.

Note: Two of the pumps (see pump management paragraph) are managed by a split
range function that enables their control with only one signal, here the regulation loop
output. The split range parameters can be accessed on the supervision as well.

The following diagram illustrates a split range functioning:

Drive Pump Setpoint

Regulation Output Signal

3
A level switch indicates a very low level in the tank. Two flowmeters (gauged in m /h)
measure the input and output flows of the basin. Each flowmeter has a totalizer
function.

19
2-Selection

• Pump Management

The primary pump attends the nominal pumping.

The secondary pump attends the complementary pumping, if necessary.

The rescue pump replaces an inoperative pump in the event of maintenance or a


detected fault.

A parameter (xxh, in hour) makes each pump change its role periodically. The
following flowchart explains the functioning of the three pumps:

Note: The user can adjust the xxh parameter on the supervision.

• Security Management:

The very low level switch is wired directly to the power circuit of the pumps. Note that
this signal is also wired on the PAC.

The high level switch in the downstream unit (Screening) and an adjustable high
threshold of the level transmitter included in the wastewater tank condition the
interlock of the wastewater tank’s pumps.

20
2-Selection

Rainwater Tank

• Functioning and Equipment

This tank acts as a buffer for the wastewater


tank: the pumped water is transferred to the
wastewater tank as soon as its input flow
exceeds a minimum level or a minimum
threshold is reached (adjustable from the
supervision). In the rainwater tank, two pumps
are equipped with soft starters. Three digital
switches indicate the different levels in the tank:
high, low and very low.

• Pump Management

The primary pump attends the complementary water needs for the wastewater tank.

The rescue pump replaces the primary pump in the event of maintenance or a
detected fault.

A parameter (xxh, in hour) makes each pump change its role periodically.

The following flowchart explains the functioning of the two pumps:

Note: the user can adjust the xxh parameter on the supervision.

• Security Management

The very low level switch is wired directly to the power circuit of the pumps. Note that
this signal is also wired on the PAC.

An adjustable high threshold of the level transmitter included in the wastewater and
the low level switch of the rainwater tank condition the interlock of the rainwater tank’s
pumps.

21
2-Selection

2.2.3. Screening

• Functioning and Equipment

In this unit, the effluents go through


a metallic screener in order to catch
the more voluminous wastes. It
includes three functions, managed
by three motors, for compacting,
conveying and screening wastes. To
avoid waste jams when the unit
starts, the startups of the motors is in cascade.

The following flowchart shows this particular startup management (cascade):

Note: the duration time between two startups (here, 5 seconds) cannot be set by a
supervision parameter. You must instead adjust the duration time in its program
according to the application requirements.

Finally, the basin includes two digital switches that indicate high and low levels (see
security management), as well as an emptying valve.

• Security Management

The low level switch of the basin included in the screening unit conditions the
interlock of the three motors.

The high level switch of the basin included in the downstream unit (Grease & Sand
Removal) or the high level switch of the primary clarifier condition the interlock of the
basin output valve that is included in the screening unit.

22
2-Selection

2.2.4. Grease & Sand Removal

• Functioning and Equipment

This unit allows sand to deposit


at the bottom of a tank and also
gathers greases. A scraper
attends this gathering. For a
progressive startup of the
scraper, a ramp is applied to its
corresponding motor. Each time
the limit switches are reached in
the basin, the drive changes the
scraper motor sense. The shield
motor changes sense as well. An
analog oxymeter manages the regulation of oxygen quantity from a setpoint on the
supervision. This regulation attends the steering of a modulating valve. A compressor
starts up as soon as this valve is open, and a flowswitch counts the sucked up sable
quantity.

A measure of the high sand level (by a high level switch) makes a by-pass valve open
and the starts two aspiration pumps. If the high level is lost, the secondary pump
stops and the primary keeps pumping for a hysteresis (30 s.) from the high level and
then stops.

Note: the duration of the hysteresis cannot be set by a supervision parameter. You
must instead adjust the duration in its program according to the application
requirements.

• Security Management

The feedback of the by-pass valve conditions the interlock of the secondary aspiration
pump.

The modulating valve conditions the compressor interlock.

The low level switch conditions the interlock of this unit’s motors, pumps and valves.

23
2-Selection

2.2.4. Primary Clarifier

• Functioning and Equipment

This unit clarifies the water before


biological treatment. It includes a
decanter in the shape of a cyclone.
A bi-directional motor enables
scraping the bottom of the basin to
center the waste in the cyclone.
Another bi-directional motor drives
a shield to gather the wastes from
the surface. These wastes are emptied by way of two pumping systems, a pump and
a block-valve. The switches indicate the high and low levels.

• Pump Management

The primary pump empties the wastes into a unit specialized in biological treatment.

The rescue pump replaces the primary pump in the event of maintenance or a
detected fault.

A parameter (xxh, in hour) makes each pump change its role periodically.

The following flowchart explains the functioning of the two pumps:

Note: you can adjust the xxh parameter on the supervision.

• Security Management

The low level switch conditions the interlock of this unit’s motors, pumps and valves.

24
2-Selection

2.2.5. Common Functioning

• Turning on

The power contactors, upstream of the pumps, are closed in a cascade way when the
PAC shifts in RUN mode.

• Display and Settings

Each actuator and sensor can be manually controlled from the supervision.

• Parameters

All the parameters (setpoints, thresholds…) can be set from the supervision.

• Warnings & Trends

Warnings for discrepancy have been implemented on each motorized element.

An alarm page displays the current alarms; another page is dedicated to the historical
ones.

• Sequential pre-treatment of the wastewater

The operator controls the startup of the pre-treatment process from the supervision. A
unique startup command is necessary to start the whole installation.

The following diagram illustrates the sequential treatment:

Note: the management system of the sequential adheres to the ISA-S88 standard.

25
2-Selection

2.3. Naming Rules

Each project is unique, and each customer has uniquely defined standards. It is
important to listen to customer expectations in terms of engineering design to define
appropriate naming rules. For this project, we defined our own rules.

The following table shows the structure used for the object identification:

Aa 1 Aa(aa) A (optional) 1

Unit Unit Index Control Module Sub Index Control Module Index

2 letters 1 digit 2,3 or 4 letters 1 letter 1 digit


(according to the
Control Module)

The following table presents the naming rules in the application:

Unit Unit Index Control Module Sub Index Control


(Optional) Module Index

Lf: Lifting 1: first Actuators R: Rain 1: first


occurrence Tank occurrence
Sc: Screening Pmp: Pump
2: second D: Dry Rain 2: second
Gs: Grease& Mot: Motor
occurrence Tank occurrence
Sand Vlv: Valve
… …
Pc: Primary Digital Sensors
Clarifier
Ls: Limit Switch

Lsl: Level Switch Low

Lsll: Level Switch Low Low

Lsh: Level Switch High

Fs: Flow Switch

Analog Sensors

Lt: Level Transmitter

Ft: Flow Transmitter

Ot: Oxygen Transmitter

26
2-Selection

2.4. Final P&ID of the Project

From the description of the process and the analysis of the plant, we define the final
P&ID as follows:

27
2-Selection

2.5. PlantStruxure Architecture Topology

The functional analysis allows to highlight the automation requirements. From the
final P&ID, we define the PlantStruxure architecture to perform the wastewater
process. It is an Ethernet-based architecture with a unique M340 PAC and a Vijeo
Citect SCADA client/server.

The following illustration shows the whole system architecture:

This architecture example is based on a Distributed Peripheral Architecture with a


centralized M340 PAC and a standalone Vijeo Citect SCADA system. The Ethernet
network connects all process steps to maintain diagnostics and performance, and
provides easy access to all process data. Embedded web diagnostic services, which
are available from any standard web browser, facilitate the maintenance phase. The
motor control devices are distributed in the plant through an Ethernet network in the
same way that Advantys STB islands communicate with a controller via Ethernet.

28
2-Selection

Here are listed the main devices:

• ATV 61: they are connected directly to Ethernet. Monitoring functions and control
are allowed. An embedded web server can be used for maintenance.

• ATS 48: a Transparent Ready gateway ETG100 is used to connect this device to
the Ethernet architecture.

• TeSys U: a Standard, Advanced and Multifunction control unit. The installation


includes TeSys U connected either through an Advantys STB extension bus, or
via a pre-wired solution using the Advantys 2145 EPI module (for Standard
control unit only).

• ATV31: this drive is connected to an Advantys STB CANopen extension. A


CANopen port is embedded on ATV31.

• TeSys T: a Transparent Ready gateway ETG100 is used to connect this device to


the Ethernet architecture.

Note: all the five previous devices can be configured by Powersuite software..

• Contactor: the selected solution is directly wired to the contactors of the Advantys
STB I/O module. The STB islands are directly connected on Ethernet.

Note: the STB islands can be configured by Advantys configuration tool, included as
part of SoCollaborative Engineering.

29
2-Selection

2.6. Automation Requirements

Now, you can list the required equipment thanks to the P&ID and the system
architecture topology previously defined.

The following table summarizes the required equipment for the project:

Unit Devices Name Function / Control

Lf1PmpR1 Soft starter : ATS 48 starter connected on Modbus serial


via an ETG100 gateway

Control command: digital output on Advantys STB

Lf1PmpR2 Soft starter : ATS 48 starter connected on Modbus serial


via an ETG100 gateway

Control command: digital output on Advantys STB


Pumps
Lf1PmpD1 Variable speed drive: ATV61 connected on Ethernet

Control command: digital output on Advantys STB

Lf1PmpD2 Variable speed drive: ATV61 connected on Ethernet

Control command: digital output on Advantys STB


Lifting
Lf1PmpD3 Variable speed drive: ATV61 connected on Ethernet

Control command: digital output on Advantys STB

Lf1LshR1 High level of the rainwater tank on Advantys STB

Lf1LslR1 Low level of the rainwater tank on Advantys STB

Analog & Lf1LsllR1 Very low level of the rainwater tank on Advantys STB

Digital Lf1LtD1 Analog level of the wastewater tank

Inputs Lf1FtD1 Input flow of the wastewater tank

Lf1FtD2 Output flow of the waste tank

LfLsllD1 Very low level of the waste tank on Advantys STB

30
2-Selection

Sc1Mot1 Direct starter TeSys U Advantys STB advanced extension


rack

Sc1Mot2 Direct starter TeSys U Advantys STB standard extension


Motors
rack

Screening Sc1Mot3 Direct starter TeSys U Advantys STB multi-function


extension rack

Valve Sc1Vlv1 Contactor on Advantys STB

Digital Sc1Lsh1 High level on Advantys STB

Inputs Sc1Lsl1 Low level on Advantys STB

31
2-Selection

Gs1Mot1 Variable speed drive: ATV31 connected on CANopen


via an Advantys STB

Gs1Mot2 Direct starter TeSys U Standard + EPI2145 Advantys


STB Module

Motors Gs1Mot3 Direct starter: TeSys T connected on Modbus serial via


an ETG100 gateway

Gs1Pmp1 Direct starter TeSys U Standard + EPI2145 Advantys


STB Module

Gs1Pmp2 Contactor on Advantys STB

Gs1Vlv1 Contactor on Advantys STB


Grease&Sand
Valves Gs1Vlv2 Analog valve on Advantys STB

Gs1Vlv3 Contact open/close on Advantys STB

Gs1Ot1 Oxygen measure on Advantys STB

Gs1Lsh1 High level on Advantys STB

Analog & Gs1Lsl1 Low level on Advantys STB

Digital Gs1Lsh2 High level on Advantys STB

Inputs Gs1Ls1 Sensor on Advantys STB

Gs1Ls2 Sensor on Advantys STB

Gs1Fs1 Flow switch on Advantys STB

32
2-Selection

Pc1Mot1 Drive: TeSys U Standard + EPI 2145 on Advantys STB

Pc1Mot2 Drive: TeSys U Standard + EPI 2145 on Advantys STB


Motors
Pc1Pmp1 Contactor on Advantys STB

Pc1Pmp2 Contactor on Advantys STB


Clarifier
Pc1Vlv1 Contactor on Advantys STB
Valves
Pc1Vlv2 Contactor on Advantys STB

Digital Pc1Lsh1 High level on Advantys STB

Inputs Pc1Lsl1 Low level on Advantys STB

Note: all the Advantys STB devices are connected on Ethernet.

33
2-Selection

2.7. Access Level

SoCollaborative Engineering allows you to create access level according to the


following operator abilities: operator, production manager, maintenance. Refer to the
implementation chapter to learn how to create these access levels.

The plant management requires three levels of control access.

The privileges are directly linked to the operator abilities:

Privileges Operator Production Manager Maintenance

Minimum intermediate Maximum

Alarms
× × ×
acknowledgement

Changes of the
× × ×
operator parameters

Commands linked to
× × ×
the sequences

Changes of the alarm


× × ×
thresholds

Enable/ Disable
× × ×
First-level Alarms

Change of owner
× ×
(Operator/ Program)

Changes of the
×
parameters

Enable/ Disable
×
Second-level Alarms

Interlock Bypassing ×
Enable/ Disable
×
the simulation mode

34
2-Selection

2.8. Operating Modes

The motor management of the plant defines specific operating modes. The objective
is to propose operating modes that allow the installation management in the remote
mode with a PAC, or in the local mode with buttons or a local panel.

• Remote mode

In the Remote Mode, either the PAC (Auto Mode) or the SCADA/HMI operator
(Manual Mode) controls the motor. When both a SCADA and a local HMI are able to
control switching between Auto and Manual modes, the first station switching to the
Manual Mode controls the actuator. Only this station can switch the motor control
back to the Auto Mode.

• Local mode

In Local mode, an operation can be performed on actuators even in the event of a


PAC detected fault. This means that local controls are hardwired directly to the pre-
actuator (ie, to the contactor or variable speed drive hardwire control circuits).

35
2-Selection

36
3-Design

3. Design
After analyzing the process requirement and constraints, you can start the project
design by:

• Selecting the sg² components from the sg² library documentation and thus
building the project process library,

• Creating the user components required to finalize the building of the project
process library,

• Structuring the navigation using Vijeo Citect.

This Design section shows how to realize these three steps.

For this project sg² is used to optimize the realization, reduce the engineering time,
and facilitate the deployment of future similar projects.

sg² includes many tools. You can find a short description in the following paragraphs:

37
3-Design

3.1. sg² Overview


2
sg includes pre-configured objects for process control and device integration. These
objects reduce development costs and provide added value through their use.
2
sg includes tools for automatic code generation and for adapting/creating objects in
line with the specific requirements of each particular solution.

• The sg² engineering tool is made up of two types of main components:

Development platform: sg² Platform.

• Resources that are ready to be used for the development of automation systems:
sg² Resources.

The three sg² software programs are described below:

3.1.1. SGStudio Workbench

SGStudio Workbench is the configuration environment for sg² objects. It creates the
instances of all the application I/Os (motors, valves, sensors and so on) and
generates the control application in Unity Pro.

38
3-Design

3.1.2. sg² Framework

sg² Framework is the environment from which the engineering tasks are performed.
sg² Framework makes it possible to integrate control Projects in Unity with a
monitoring Project developed with Vijeo Citect.

The following main engineering tasks can be carried out from sg² Framework:

• Managing sg² projects, including managing the main Vijeo Citect project
Databases.

• Managing sg² resources (currently SGCU Components only).

Moreover, the following tools can be accessed from sg² Framework:

Other sg² tools:

• SGBuilder: For generating control component (SGU Components) libraries (SGU

Libraries).

• SGS Workbench: For generating control programs for Unity automatically.

• SGS Guardian: For synchronizing Unity control programs with Databases


belonging to the Vijeo Citect monitoring project.

• Platform Tools:

1) Unity Pro: For developing control programs.

2) Vijeo Citect: For developing the monitoring project.

3) OFS: OPC Server.sg² Framework allows to create links between Unity Pro and
Vijeo Citect projects. It creates the Vijeo Citect start application (cluster, included
project) and also generates the tags linked to the parameterized Unity application in
terms of I/Os, alarms, trends and so on. A resource tab allows for the customization
of the actual generation such as components, tags, and the application.

39
3-Design

3.1.3. SGBuilder

SGBuilder is the sg2 application that allows reusable control element libraries to be
built (and subsequently instantiated with SGS Workbench). Each one of the control
templates called SGU Component can contain different resources for a Unity Pro
application: Program sections, animation tables, operator screens, variables, and
data types (DDTs and DFBs). The tool for defining control components is the Unity
Pro programming environment itself, so that every component is generated from a
different Unity project (.stu extension) that contains all the resources associated with
a specific control strategy. The SGBuilder tool processes each one of the component
Unity files, validates the information in each one of them, and generates a series of
folders and XML files that make up the resulting library. This way, the control strategy
that has been defined and validated in a component can be included in a library and
then be reused as many times as necessary with SGStudio Workbench.

3.1.4. SGS Guardian

SGS Guardian automates the synchronization process for Tags, Alarm Tags, and
Trend Tags that are necessary to monitor Unity projects from Vijeo Citect. The
configuration information entered into the control projects programmed in Unity (Tag
names, descriptions, addresses, etc.) is automatically moved to the required fields in
the Vijeo Citect configuration Databases.

40
3-Design

3.2. sg² Libraries

For the first step of the Design phase, we recommend you to select the sg²
components from the sg² library documentation and then build the project process
library. The functional analysis identifies the requirements in terms of equipment to be
controlled and automation devices to be managed. sg² components are selected from
these requirements. 5 sg² libraries are available:

• Diagnosis

• Communication

• Device

• Process

• User

The sg² components can now be selected from the P&ID and the automation system
architecture topology.

41
3-Design

3.2.1. Diagnosis Library

This library gathers information from the PAC, in terms of Cycle Time, Watch Dog,
Clock and so on. The following table presents its functionalities:

Function Equipment Instance sg² Components Comments

CPU information M340 PAC M340 Diagnosis/ General Status/ This component
recovery allows you to
CPUDIAG
quickly diagnose
the CPU state via
Vijeo Citect
without going
through Unity Pro

This object has been selected for the wastewater project to allow a quick diagnosis of
the PAC CPU without using Unity Pro.

The following screenshots show what the component looks like during runtime:

42
3-Design

3.2.2. Communication Library

This library includes devices that attend the data exchanges. The project requires two
types of communications: Ethernet and Modbus serial via a Modbus serial Gateway
(ETG100). Consequently, Ethernet Port M340 and Ethernet Modbus serial Gateway
(ETG100) need to be instantiated in the project, after which it is possible to implement
Modbus serial devices (ATS48 for example), which is connected to the ETG100
instance. For more information about instantiation, please refer to the Instantiation
section of the implementation chapter.

The following table summarizes the required functions with their corresponding
components:

Function Equipment Instance sg² Components Comments

Communication Ethernet port EPortM Communications/ This component is


with Ethernet for M340 PAC Communications in mandatory for objects
devices via the Ethernet/ Port serialized that exchange data on
Ethernet NOE requests in M340 Ethernet
module

Communication ETG 100 ETG100 Communications/ This component is


with Modbus Gateway Communications in mandatory for objects
serial devices via Ethernet/ Modbus that exchange data on
a Modbus serial gateway ethernet/ serial Modbus serial line
/Ethernet
gateway

For the communication, we can define the following inheritance principle:

43
3-Design

3.2.3. Device & Process Libraries

We mix the two libraries in the same paragraph to group the instances that are linked
to the same hardware element.

The following paragraphs list the components by functional unit, with the
corresponding P&ID and automation system architecture topology representations:

Lifting

44
3-Design

Rainwater Tank

Function Equipment Instance sg² Component Comments

The Digital Input component is


Digital High Process\ Digital Inputs\
Lf1LshR1 adapted to manage the digital
Level sensor Digital Input
level.

The Digital Input component is


Digital Low Process\ Digital Inputs\
Digital level Lf1LslR1 adapted to manage the digital
Level Sensor Digital Input
level.

The Digital Input component is


Digital Low Low Process\ Digital Inputs\
Lf1LsllR1 adapted to manage the digital
Level Sensor Digital Input
level.

Devices\ Devices in Ethernet communication with


Modbus serial Lf1PmpR1
Modbus\ ATS48 the two ATS48 via the
ATS48 Lf1PmpR2
Progressive Starter ETG100 gateway

Process\ On-Off
Digital Pumps Motors\ With This component automatically
Basin pumping with pump Lf1PmpR1
piloted by Interlocks, Failures, associates the motor with the
cycle management Lf1PmpR2
ATS48 Maintenance and device.
Device

Pumps cycle This component automatically


Component to be
Programmed in Rainwater Tank manages the pump cycle
created
the PAC (normal\rescue).

45
3-Design

Wastewater Tank

Function Equipment Instance sg² Component Comments

Digital Safety Digital Low Low Process \ Digital Inputs The Digital Input component is
Lf1LsllD1
Sensor Level Sensor \ Digital Input adapted to manage the digital level.

Flow in \ out
Analog Flow sensor Lf1ftD1 The Analog Input with Calculation
Process \ Analog Inputs
Measure in
4-20mA \ With Calculations meets the need to measure the flow.
Lf1ftD2
the basin

Lf1PmpD1
The I\O scanning service of the NOE
Devices \ Devices in
ATV61 Ethernet Lf1PmpD2 Ethernet module enables to
Ethernet \ ATV61 Drive
communicate with the equipment.
Lf1PmpD3

Process \ Speed Drive


Lf1PmpD1
Motors \ With Interlocks,
Pumps piloted by This component automatically
Lf1PmpD2 Failures, Maintenance
ATV61 associates the motor with the device.
and Device (Variable
Lf1PmpD3
speed)

The Analog Input with Alarms


Analog Level Sensor Process \ Analog Inputs component meets the need to
Lf1LtD1
4-20mA \ With Alarms manage the different alarms related
Basin
to the water level in the basin.
pumping with
pump cycle The PID Block component meets the
management Process \ PIDs \ PID need for the regulation of the
Regulation in PAC LICLf1LtD1
Block wastewater basin. You can easily
customize this component.

The Split Range Controller


component manages this
Process \ Advanced
functionality with a control\command
Split Range in PAC Lf1_SPLTRNGE Control \ Split Range
from Vijeo Citect. Refer to the
Controller
functional analysis chapter for more
information about the split range.

Component to be This component automatically


Programmed in the
WasteTank created manages the pump cycle
PAC
(Primary\Secondary\ Rescue).

46
3-Design

Screening

47
3-Design

Function Equipment Instance sg² Component Comments

The Digital Input component


Digital High
Sc1Lsh1 Process \ Digital Inputs\ Digital Input is adapted to manage the
Level
digital level.
Digital level
The Digital Input component
Digital Low
Sc1Lsl1 Process \ Digital Inputs \ Digital Input is adapted to manage the
Level
digital level.

This component meets the


Digital Valve
Emptying need to manage a digital
with Process \ ON-OFF Valves \ With
basin valve Sc1Vlv1 valve, which includes
open/close Interlocks & 2 limit switches
(water) detected faults, maintenance
feedback
and record managements.

TeSys U This equipment is connected


Sc1Mot1 Devices \ Devices in Advantys STB \
Advanced to an Advantys STB Rack
TeSys U Advanced Starter
Starter Extension.

TeSys U This equipment is connected


Sc1Mot2 Devices \ Devices in Advantys STB \
Standard to an Advantys STB Rack
Extraction, TeSys U Standard Starter
Starter Extension.
transport and
compacting of TeSys U This equipment is connected
Sc1Mot3 Devices \ Devices in Advantys STB \
the waste Multifunction to an Advantys STB Rack
TeSys U Multifunction Starter
Starter Extension.

Sc1Mot1
Digital Motor Process \ ON-OFF Motors \ With This component
piloted by Sc1Mot2 Interlocks, Failures, Maintenance and automatically associates the
TeSys U Device motor with the device.
Sc1Mot3

48
3-Design

Grease & Sand

49
3-Design

Function Equipment Instance sg² Components Comments

The Digital Input


Digital High Gs1Lsh1 Process \ Digital Inputs \ Digital
component is adapted to
Level Gs1Lsh2 Input
manage the digital level.
Digital Level
The Digital Input
Digital Low Process \ Digital Inputs \ Digital
Gs1Lsl1 component is adapted to
Level Input
manage the digital level.

The Digital Input


Digital Limit Gs1Ls1 component is adapted to
Process \ Digital Inputs \ Digital
Switch Input manage the digital level
Gs1Ls2
switch.

The ATV31 communicates


ATV31 on Devices \ Devices in Advantys STB on Ethernet via a CANopen
Gs1Mot1
CANopen \ ATV31 Drive XBE2100 extension of the
Advantys STB.
Management of the
Process \ Speed Drive Motors \ This component
scraper carriage Motor piloted With Interlocks, Failures,
Gs1Mot1 automatically associates
movement by ATV31 Maintenance and Device (2 speed
Analog 2 directions) the motor with the device.

The Ramp component


meets the need to manage
Gs1Mot1 Process \ Advanced Control \ Ramp
the motor acceleration/
deceleration by program.

The Digital Input


Digital Limit Gs1Ls1
Process \ Digital Inputs \ Digital
component is adapted to
Switch Input
Gs1Ls2
manage the digital level.

Digital Motor This component meets the


Management of the piloted by Process \ 2 Speeds-Directions need to manage the 2
Gs1Mot2 Motors \ With Interlocks, Failures
scraper position simple and Maintenance speed-directions
contactors functionality.

Regulation of the Ethernet communication


Tesys T on Devices \ Devices in Modbus \
oxygen concentration Gs1Mot3 Tesys T Motor Management with the TeSys T via the
Modbus serial Controller
in the basin ETG100 gateway.

50
3-Design

Digital Air
This component
Compressor Process \ ON-OFF Motors \ With
Gs1Mot3 Interlocks, Failures, Maintenance automatically associates
piloted by and Device
the motor with the device.
TeSys T

Analog This component meets the


Modulating need to manage the
Process \ Control Valves \ With
Gs1Vlv2
Valve Position Feedback functioning of the

4-20 mA modulating valve.

Analog
The Analog Input
Oxygen Process \ Analog Inputs \ Analog
Gs1Ot1 component is adapted to
Sensor Input
manage the digital level.
4-20 mA

The PID Block meets the


Regulation in OICGs1 need to manage the
Process \ PIDs \ PID Block
the PAC Ot1 regulation. You can easily
customize this component.

Digital This component meets the


Process \ Digital Inputs \ With
Counting Gs1Fs1 need to count the sand
Calculations
Contact quantity.

This component meets the


Digital Valve
need to manage the valve,
with Process \ ON-OFF Valves \ Valves
Gs1Vlv1 which includes detected
open/close With Interlocks & 2 limit switches
faults, maintenance and
Extracted sand feedback
record managements.
pumping
This component meets the
following needs: it includes
Digital Pumps
motor management (1
piloted by Gs1Pmp1 Process \ ON-OFF Motors \ With
Interlocks, Failures and direction, digital) and
simple Gs1Pmp2 Maintenance
detected fault,
contactor
maintenance and record
managements.

Manual Valve
Evacuation valve of the with Process \ Hand Valves \ Valves This component meets the
Gs1Vlv3
basin open/close With 1 or 2 limit switches needs.
feedback

51
3-Design

Primary Clarifier

Function Equipment Instance sg² Component Comments

The Digital Input


Digital High Process \ Digital Inputs \ component is adapted to
Pc1Lsh1
level Digital Input manage the digital level
switch.
Digital Level
The Digital Input
Digital Low Process \ Digital Inputs \ component is adapted to
Pc1Lsl1
Level Digital Input manage the digital level
switch.

Extraction of the sludge TeSys U on Pc1Mot1 This component meets the


Process \ 2 Speeds -
included in the decantation EPI2145 Directions Motors \ With need to manage the 2
Pc1Mot2
water. Two scrapers with 2 Advantys STB Interlocks, Failures and speed-directions
Maintenance
direction functioning. extension functionality.

This component meets the


following needs: it includes
Digital Pump motor management (1
Pc1Pmp1 Process \ ON-OFF Motors \
Extracted sludge pumping piloted by With Interlocks, Failures and direction, digital) and
Pc1Pmp2 Maintenance
simple contactor detected fault,
maintenance and record
managements.

52
3-Design

This component meets the


need to manage a digital
Digital Valve Process \ ON-OFF Valves \
Pc1Vlv1 valve, which includes
with open/close Valves With Interlocks & 2
Pc1Vlv2 detected fault,
feedback limit switches
maintenance and record
managements.

This component
Programmed in automatically manages the
ClarifierSludge Component to be created
the PAC pump cycle (Normal\
Rescue).

Process Control

The following table presents the process components:

Function Equipment Instance sg² Components Comments

The control/command are


based on the S88 model,
Sequence management and Process \
Sequential associated to a 5 parameters
automatic command of the Control \ With
STATION management block. The
wastewater pretreatment User Sequence
template in component provided by sg²
process Sections
allows forcing transitions from
a Vijeo Citect interface.

Display on Vijeo Citect of the Process \ User


The Message Box component
messages linked to the STATION Interface \
meets the needs.
process Message Box

53
3-Design

3.3. Components Creation

Once the library is chosen, you can begin the second step of the Design phase: the
component creation.

sg² allows you to create your own components. The following three steps
chronologically compose the process: Unity, sg² and Vijeo Citect.

A visual representation of the process is below, with the creation steps on the left and
the corresponding software on the right:

The section on sg² components selection highlights the need for an additional
component, which attends to the pump cycle management. We choose to call this
component PCYCLE.

The following sections describe the steps to create this component.

For more information about this cycle, see the pump management paragraph in the
functional analysis included in the Selection chapter.

54
3-Design

Step 1: Creation of the Component for Unity Pro

in Unity Pro

The component must be created with Unity Pro. Refer to sg² documentation for
details. Before compiling the component with SGBuilder, some essential rules must
be respected in regards to naming rules and parameter utilization notably. Thus, the
paragraphs below describe the recommended practices for the creation of a ‘user’
component.

General Rules

• The name of the Unity Pro station and the .stu file must have the same name, as
follows:

55
3-Design

• Create the component program in a unique section. The section name must use
IEC language (_Language), and it is recommended that you indicate the
component name, PCYCLE_FBD for example.

If the component PCYCLE is instantiated as WasteTank in SGStudio Workbench, you


can compare it with what is generated in Unity Pro:

• You must name the variables as follows: X__Var_name__X

56
3-Design

• You must name the used parameters for the instantiation in SGStudio Workbench
as follows : X__Par_name__X

The following screenshots show how the parameters named in Unity Pro appear
when the corresponding ‘user’ component is instantiated in SGStudio Workbench:

57
3-Design

We use the parameters for the three following goals:

 To set the default value of a variable. We use the:


X__Par_PCYCLE_PresetTime__X parameter to set the default value of
X__Var_PCYCLE_DDT__X.PT during the component instantiation.

The following screenshot shows this setting in Unity Pro Variable Editor:

 To bring a value from Unity Pro to Vijeo Citect. We use the


X__Par_PCYCLE_DESC__X and X__Par_PCYCLE_Unit__X parameters to
set the ‘Comment’ field of the following variables:
X__Var_PCYCLE_DDT__X.Comment and
X__Var_PCYCLE_Primary__X.Comment, as follows:

 To set a static value in the program. We use the


X__Par_PCYCLE_NbrPmp__X parameter to give a static value to the
NbrPmp DFB input, as follows:

58
3-Design

Name the instances of the DFB or DDT as follows: X__Var_nom_X:

This DDT is used to ease the creation of the resources components with SGCU
Editor, which allows to automatically generate the Vijeo Citect tags.

• Do not enter parameters in the animation table; only variables such as EDT and
DDT are authorized. Note that the naming of the animation table does not have
such restrictions.

• Do not enter parameters in the operator screens; only variables such as EDT and
DDT are authorized. Note that the naming of the operator screens does not have
such restrictions, but that the objects in the screen must be grouped. This group
must be placed at the coordinates (0,0) as shown below:

• Y
o
u

m
u
s
Name the instances of the DFB or DDT as follows: X__Var_name__X.

Note: It is recommended that you create this DDT, which eases the Resources
Components creation with sg² Framework. Resources Components allows generating
Vijeo Citect tags automatically.

59
3-Design

• You must surround the program with a commentary block of coordinates (0,0),
Note that there are no restrictions with the naming of such blocks.

Overview

Here is an overview of the component both during the development phase with Unity
Pro, and then after its instantiation\ generation with SGStudio Workbench:

Development:

After instantiation\ generation:

60
3-Design

in SGBuilder

Once the component is created in Unity Pro, the next phase in sg² is the generation of
components resources. From these resources, the automatic tag generation can be
done in Vijeo Citect. The sg² phase includes three steps with SGBuilder, SGStudio
Workbench and SGCU Editor. These steps are described below.

61
3-Design

The goal of this phase is, from a .stu Unity Pro file, to generate source files of the
‘user’ component (library + component itself). Proceed as follows:

Step Action

1 Start SGBuilder.

2 Click on the Read sources tab.

3 Select the path to recover the component .stu file, and then click OK. If the path is correct, the
following window appears:

Fill in the Name and Version text boxes. Click Accept and then Yes to validate.

4 SGBuilder creates the source files of the component.

62
3-Design

Once the processing completes, the Results window displays. The Created with error field
must display 0.

Click OK, then Yes. SGBuilder presents the component and its library as follows:

63
3-Design

5 Customize the component.

For example, you can double click on Default Group to rename and change the icon:

and \ or double click on PCYCLE-PCYCLE to rename and change the icon:

The new component displays in the tree:

6 Finalize the component and its associated library, by clicking on Write library. Once the
process completes, the Process ended window displays:

Click OK and then close SGBuilder.

64
3-Design

in SGStudio Workbench

SGStudio Workbench allows you to import the component and the library previously
created with SGBuilder.

65
3-Design

To import the new library, proceed as follows:

Step Action

1 Start SGStudio Workbench.

2 Click on Libraries of SGU Components and then choose Import from the drop down
menu.

3 Select the new library previously created by SGBuilder, and then click OK

4 Once the import completes, the Import Library windows appears:

The component can now be accessed in SGStudio Workbench.

66
3-Design

Step 2: Creation of the Component for Vijeo Citect

In SGCU Editor

Now you can begin the second phase, the creation of the component for the
automatic generation of the Vijeo Citect tags.

SGCU Editor, included in sg² Framework, allows you to define SGCU components
that extract data from the instantiated Unity Pro objects (DDT or DFB).

For more information about the creation of a new component, refer to the SGCU
Editor User Manual.

67
3-Design

The following table provides methods and recommended practices for creating the
mandatory resources that allow sg² to automatically generate the components tags
for a Vijeo Citect application.

Step Action

1 Start sg² Framework.

2 Create a new component by clicking on the sg² Resources tab, and then right click on SGCU
Components and then New, as is shown below:

3 As previously indicated in the Unity Pro section of this chapter, it is recommended that you
create a DDT in the Unity Pro project.

The SGCU Editor works as follows: if an Unity Pro object’s instance (DFB and\ or DDT) for
the new ‘user” component previously defined is detected in the corresponding Unity Project,
then SGCU Editor automatically generates the required tags (that is Variable, Advanced
Alarms, Digital Alarm and\ or Trends) for Vijeo Citect.

68
3-Design

4 Create the components resources, in two main steps:

Define the general attributes of the component:

Fill in the Type and Syntax properties. SGCU Editor uses this information as a filter to detect
the match component instance in the .stu file (see step 3). Here, the data Type is DDT, and the
Syntax is _PCCYLE_DDT.

Define the tags to be created in Vijeo Citect, as shown in the following screenshot:

Note: Marks are available to customize the tags. For more details, refer to SGCU Editor
documentation.

69
3-Design

The following screenshot illustrates the created tag in Vijeo Citect from an instance called
WasteTank in sg²:

70
3-Design

Step 3: Creation of the Component Interface in Vijeo Citect

in Vijeo Citect

The third step of the component creation is to create Genie and Super Genie, which
control and command the previously defined component. The following examples
illustrate the Genie/Super Genie for the 2 and 3 pumps cycle management
respectively.

Genie

The Genie for the 2 pumps cycle management displays one state:

It indicates the normal functioning. plus a detected warning.

The Genie for the 3 pumps cycle management displays two states:

It indicates which pump runs (Primary or Secondary), plus a detected


warning.

71
3-Design

Super Genie

The following screenshot illustrates the Super Genie for the 2 pumps cycle
management:

It includes Preset, Remaining and Current time indications.

The following screenshot illustrates the Super Genie for the 3 pumps cycle
management:

It includes the same previous information, but for two principal pumps.

72
3-Design

3.4. Navigation Rules

Once the component creation is done, define your navigation rules to complete the
Design phase.

The goal of a supervision application is to make access to the targeted object or


information as fast and intuitive as possible. A breakdown of its own application in a
few areas helps to define and identify the different phases of the complete process.

The following illustration defines the navigation rules used:

The pretreatment process is divided into four units: Lifting, Screening, Grease&Sand
Removal and Primary Clarifier. You can access a detailed view of the actuators, such
as motors and digital inputs, by clicking on a unit. Clicking on the equipment leads to
its commands and diagnosis options. On each view, a banner displays the current
alarms. A button enables access to the historical alarms.

73
3-Design

74
4-Configuration

4. Configuration
Here is a sum up of the project‘s progress:

• The sg² components are defined.

• The user component PCYCLE is created.

Thus currently, you need to configure:

• The PAC using Unity Pro

• The Vijeo Citect project using sg² Framework

• The Communication using OFS

The following paragraphs detail these three steps.

Note: A sg² project can contain several PACs. In the current project, only one
Modicon M340 is configured.

Note: The instantiation of some sg² components is available if a controller has been
previously defined only.

Note: Some components can only be instantiated according to the controller’s


hardware configuration.

Before configuring anything, you must consider the project hypothesis regarding the
hardware configuration.

Project’s PAC Configuration

M340 Alimentation CPS 2000

CPU P342020

NOE 0110 module’s IP address:


84.16.1.4/255.255.0.0

75
4-Configuration

4.1. PAC Configuration with Unity Pro

The first step is to define the hardware configuration in Unity Pro, if it does not exist in
the sg² libraries.

The hardware configuration of the wastewater plant includes a Modicon M340 and a
NOE Ethernet module. This hardware configuration is not included in the sg² library.

In SGStudio Workbench, 3 manners are available to define the controller


configuration:

• Pick up a new PAC configuration from the sg² template list. In this case, the Unity
project starts from scratch.

• Create a new PAC configuration from a customized sg² template. This template
comes from a Unity Pro .xef file. The template import is done from the SGStudio
Workbench menu, then Destination Template and Import.

• Start directly from a .stu or a .xef file, then add more features or update it with sg²
without modify the original code.

In the project, we decided to create a customized template coming from a Unity


Pro .xef file.

Note: The templates can be reused for future developments.

76
4-Configuration

4.1.1. Unity Project Creation

The following table shows how to import a hardware configuration from Unity Pro to
sg²:

Step Action

1 Create the material configuration according to the application requirements. Here, the
topology is based on Ethernet, so a NOE module must be implemented to get the I/O
Scanning and Address Server services.

2 Create the network configuration. Validate the I\O Scanning and the Address Server
services of the Ethernet NOE module.

3 Export the Unity project in .xef format. The template is created.

77
4-Configuration

4 Start SGStudio Workbench.

5 Import this template in SGStudio Workbench by clicking Destination Template -> Import.

The template is now available, and you can access the configuration of the M340 + NOE
module through SGStudio Workbench.

78
4-Configuration

4.2. sg² Framework

The second step, after loading the hardware template in SGStudio Workbench,
consists of the Vijeo Citect server’s configuration.

The following table explains the methodology:

Step Action

1 Start sg² Framework.

2 Right click on sg2 Systems, and then select Create sg2 System.

Note: you can also link and update an existing Vijeo Citect project by clicking on the Link sg2
system choice. Once linked, this one is managed from sg² Framework.

79
4-Configuration

3 Name the project, and then select the sg2_blank2.ctz as the sg² Template, which is automatically
created during sg² installation.

The sg2_blank2 template includes the SGC_Include2 project with the following features:

->sg² Symbols

->sg² Genies

->sg² Pages

->sg² Cicode

->Pages templates at Sg² format

->sgc_devices.dbf file: texts and formats management of the sg² devices screens (ATV, ATS, TeSys U
and so on)

->UIMessag.dbf: management of the operator messages

Click OK to create the new Vijeo Citect application.

4 You can see the project previously created by clicking on the Vijeo Citect Explorer button:

80
4-Configuration

The following screenshot shows the created WaterProject:

81
4-Configuration

4.3. OFS Configuration

The final configuration step involves adjusting and establishing the communication
between the PAC and the SCADA system.

The OFS server (OPC Factory Server) is used to make Vijeo Citect communicates
with the M340 PAC, according the following diagram:

The .XVM file establishes the link between the non-located variables of the next Unity
Pro program and Vijeo Citect.

We recommend to use the .XVM file as the symbol file, by this way:

• It is not mandatory to have Unity Pro installed on the machine running OFS,

• It leads to a quicker OFS loading.

Unity Pro allows you to generate and consequently update the .XVM file during a
program download (PC to PLC) or Build Changes. Click the Project autosaving on
download in the Unity Pro Project Settings, as follows:

82
4-Configuration

The following table shows you how to configure OFS:

Step Action

1 Start the OFS configuration tool. In the sg² Framework toolbar, click on the quick launch
button for OFS:

2 Create Unity Pro equipment with an IP address.

You must use the same alias name (here, M340) for the definition of the supervision channel
in sg² Framework. Please refer to the implementation chapter, sg² Framework paragraph.

Adjust the following parameters:

Tick No preload checkbox in the Preload Settings.

Tick Dynamic consistency checkbox.

Tick Debug checkbox for the Consistency level.

The .XVM file path is specified in the implementation phase when the new Unity Pro
application is generated.

3 Save the configuration and then quit the OFS configuration tool.

83
4-Configuration

4.4. ODBC (Open DataBase Connectivity) Configuration

An ODBC installation must be configured to establish the link between Vijeo Citect
and the parameters.mdb sg² file. This file is in the Vijeo Citect folder of the Water
application.

Create a new ODBC link, in Microsoft Access Drive type, following this path:

Control Panel\ Administration tool\ Data Sources (ODBC).

Name it DSNparams, then select the application’s DataBase as shown:

Click on OK then close the ODBC manager.

84
5-Implementation

5. Implementation
The Unity Pro and Vijeo Citect projects have been created during the configuration
phase. The wastewater project must be finalized with the generation and the
completion of all the applications. Consequently, this chapter describes the final
adjustments to finalize the project application in terms of:

• Developments with SGStudio Workbench leading to the generation of the Unity


Pro project,

• Finalization with OFS to allow the communication with the unlocated variable of
the Unity Pro application,

• Developments with sg² Framework leading to the generation of the Vijeo Citect
tags,

• Finalization of the Unity Pro and Vijeo Citect applications,

• Incremental generation to update the project.

85
5-Implementation

5.1. Unity Pro Generation with SGStudio Workbench

The first step in the implementation is to generate the Unity application with SGStudio
Workbench.

The following diagram presents the SGStudio Workbench Implementation:

86
5-Implementation

To sum up, this step allows to:

• Create the sg² project and selecting the library

• Select the type of used PACs

• Instance of all used components

SGStudio Workbench can be launched either from the Windows start menu or from
sg2 Framework. This option offers you to interact with others software programs
(Vijeo Citect) and management system (OFS). Consequently, we recommend this
way.

This section describes how to create a project with SGStudio Workbench, which
leads to the Unity application creation.

5.1.1. Project Creation

Launch sg² Workbench, and then create the water project project.

You can select different sg² libraries used in our project such as Diagnosis,
Communication, Device & Process, as well as the user library (creation of PCYCLE
component for pumping management).

87
5-Implementation

5.1.2. Controller Selection

In SGStudio Workbench, click New from the Controllers tab, and then select the
template previously defined (CPUM340+NOE110):

Note: since the NOE module was successfully added in the Unity hardware
configuration, the sg² Ethernet devices are available. Otherwise, they appear in
grayed out, as follows:

Before the controller was added After the controller was added

88
5-Implementation

5.1.3. Instantiation

SGStudio Workbench proposes 3 instantiation methods, all of which are described in


the following sections with concrete examples.

• Simple instantiation is illustrated by the Gs1Vlv2 creation: the oxygen modulating


valve of the Grease&Sand Removal unit.

• Multiple instantiation by a quantity parameter is illustrated by the Lf1PmpD1,


Lf1PmpD2 and the Lf1PmpD3 creation: the drives of the pumps included in the
wastewater tank of the Lifting unit.

• Multiple instantiation by Export\Import of .csv files is illustrated by the Lf1PmpD1,


Lf1PmpD2 and Lf1PmpD3 creation, the motors associated with the previous
drives.

Note: the multiple instantiation option allows for faster instances creation.

Note: we recommend to use the same names between the devices and the process
instances, such as the drives and motors for example. This automatically places
these two objects in the same program section. Then, sg² creates the unique object’s
variables for each element.

89
5-Implementation

Simple Instantiation

We recommend to use the simple instantiation when the component appears once in
the project.

The following table shows the instantiation of the CVALVE component (unique in the
project) for the analogical valve Gs1Vlv2:

Step Action

1 Select the CVALVE component in the Process library, and then double click.

2 The General Options pop-up window appears. Name your corresponding instance, here
Gs1Vlv2, and then click OK.

90
5-Implementation

3 The ASPECT Control Window appears. In the Properties tab, adjust your object’s
parameters. The example below shows 0-32000 as the value for the configuration of the
Advantys STB:

Note: The user can also modify other properties, such as ranges, alarm time, engineering
units, time watch, thresholds, format and so on.

4 Click OK to complete the object creation.

91
5-Implementation

Multiple Instantiation – Quantity Parameter

We recommend to use this kind of multiple instantiation in the following cases:

• Many instances of the same component are required in the project.

• The difference between the instance’s names of this component is only the final
index.

• The indexes between the entire instance’s names have continuity.

The following table shows the instantiation of the Ethernet ATV61 Drive component
for the pumps Lf1PmpDX (three occurrences in the project):

Step Action

1 Select the Ethernet ATV61 Drive component in the Devices library, and then double
click.

2 The General Options pop-up window appears. Fill in the Object Names box with the
selected name, here Lf1PmpD. Then choose the instance number (Quantity box), the
start index (Start box) and the index form (Minimum Width box), and then click OK.

92
5-Implementation

3 The Aspect CONTROL window displays. In the Properties tab, add the character %n to
the Ethernet.REFRESH_IO_, which corresponds to the ATV position in the I\O scanning
configuration included in the CONTROLLER.

4 Click OK to complete the object creation. The three objects appear as follows:

Note: The user can customize the objects properties, or just refine one of them.

93
5-Implementation

Multiple Instantiation – Export\Import of a .csv file

We recommend to use this kind of multiple instantiation if the same component needs
to be deployed in the project. You can then configure the digital inputs and customize
them before the import.

Note: this method allows the user to directly edit its .csv files from a spreadsheet,
without sg² being installed on the PC.

This method consists of creating the first component’s instance and then exporting it
to the .csv file. You can then edit the .csv file to add modifications and import it in sg²
to include new instances.

The following table explains how to make the multiple instantiation, using the
Lf1PmpD1 motor as the instance’s source:

Step Action

1 Select the Speed Drive Motors\ With Interlocks, Failures, Maintenances, & Devices
(variable speed) component in the process library, then double click.

2 The General Options pop-up window appears. Fill in the Object Names box as desired.

94
5-Implementation

3 The Aspect CONTROL window appears. As previously discussed, you can customize your
object with the Properties tab.

95
5-Implementation

4 In the Interfaces tab, check the connection, here with the speed drive. Then click OK to complete
the object creation.

5 Export the object. Right click on the motor’s instance, and then Export Object/s.

6 Save the .csv file and then select Generate and Open Files to edit. In the following example of
edits, 2 motors (Lf1PmpD2 and L1PmpD3) are added.

1) Duplicate twice the object line Lf1PmpD1.

2) Modify the instance’s name (Object column), object’s name for Vijeo Citect (VC- Control column)
and associated speed drive’s name (DEWS column) fields, thus change the others properties
individually.

Save and close the file.

96
5-Implementation

7 Import the .csv file. In SGStudio Workbench Project window, click on the Objects tab. Right click
on the main project node, select Import object\s, and then open the .csv file.

8 Open the .csv file;

A popup message displays to notify you that the Lf1PmpD1 already exists. If you did not modify the
Lf1PmpD1 object in the .csv file, click on Skip. Note that you can avoid this message by deleting
the line of the Lf1PmpD1 object in the .csv file.

9 The motors (associated to their own drives) are not created. A report of the import is shown below,
and all the objects of .csv files are in the SGStudio Workbench Project.

97
5-Implementation

5.1.4. Project Components List

From the components list defined in the Design chapter, the following screenshot
shows all the instantiated components of the application:

98
5-Implementation

5.1.5. Section Organization

sg² generates Unity Pro sections. Consequently, you can easily organize the project
sections by dragging & dropping. Click on the Controller tab, and then on the
Programs sub-tab to view the sections structure.

Note: sg² can automatically sort components according rules. For more information,
please refer to the sg² Documentation.

The following screenshot shows organization examples:

1: This case shows an automatic organization. The three components have the same
name, ‘Gs1Mot1’, so sg² automatically sorts them together.

2: This case shows a manual organization. The two components dedicated to the
Modbus serial communication are placed together by a drag and drop action. The
section is renamed regarding the common feature of the components, thus
ModbusGateway.

99
5-Implementation

5.1.6. Animation Table

Most of the components provide at least one animation table.

From the Controller tab and the Tables sub-tab, you can see the animation tables as
they will be organized during the Unity Pro project generation.

As for all the sections, you can customize the organization of the future animation
tables for the Unity Pro application by using a drag and drop action.

5.1.7. Operator Screen

Most of the components provide at least one operator screen.

From the Controller tab and the Screens sub-tab, you can see the operator screens
as they will be organized during the Unity Pro project generation.

As for all the sections, you can customize the organization of the future operator
screens for the Unity Pro application by using a drag & drop action.

5.1.8. Unity Generation

Once you organize the future Unity Pro sections, you can generate the Unity Pro
project from SGStudio Workbench. From the Controllers tab, click on Generate
Unity:

The .stu file of the application is created.

5.1.9. Generated Program

You can now open the project from SGStudio Workbench. In the Controllers tab,
click on the Open button:

Once the project is opened, close SGStudio Workbench.

Note: Clicking on the Open button generates the Unity Pro project, if it is not already
done.

100
5-Implementation

The following paragraphs consider the instances of components in order to illustrate


what sg² generates:

Note: To finalize the Unity Pro project in terms of sequential, gateway, messages and
so on, please refer to Unity Pro and Vijeo Citect Finalization section of this current
chapter.

ETG100

The ETG 100 instance of the Ethernet Modbus Gateway component and the EPortM
instance of the Ethernet Port M340 component are manually put in the same section
from SGStudio Workbench. (see section paragraph of this current chapter)

• Sections

The following screenshot shows the generated sections:

In this example, SGStudio Workbench has generated in one hand an instance


corresponding to the Ethernet Modbus Gateway component, and for the Ethernet Port
M340 component on the other hand. These objects are automatically surrounded by a
commentary block that gathers the instance’s name, that is, ETG100 and EPortM
respectively.

Note: an EPortM_EWorkMemory DDT variable is on the two DFBs. This is the link
between the two DFBs.

101
5-Implementation

• Animation Tables

The following screenshots show the animation tables:

• Operator Screens

The following screenshots show the operator screens:

102
5-Implementation

ATV61

The LfPmpD1 instance of the Ethernet ATV61 component (Speed Drive Motors With
Interlocks Failures, Maintenance and Device).

These two objects are automatically put in the same section due to the same
instances names. Refer to instantiation paragraph of this chapter for more details.

Note: The whole content of the section is not shown in this manual.

• Section

The following screenshot shows what is generated by SGStudio Workbench for the
Ethernet ATV61 LfPmpD1 component:

103
5-Implementation

And the following is what is generated by SGStudio Workbench for the whole
Lf1PmpD1 motor control:

Detected
Failures
Maintenance

Motor
Interlocks

You can see the additional components surrounding the motor: Interlocks, Failures,
Maintenance.

104
5-Implementation

If you focus specifically on the Motor component, the automatic generated links with
Ethernet ATV61 are highlighted:

105
5-Implementation

• Animation table

The following screenshots show the animation tables, motor and ATV61 respectively:

106
5-Implementation

• Operator Screen

The following screenshot illustrates the ATV61 operator screen:

The following screenshot illustrates SDDEVCTL operator screen:

107
5-Implementation

5.1.10. Finalization of the PAC Configuration

Before transferring the application to the PAC, the compilation (Unity Pro build) is
required.

The finalization of the PAC configuration consists of the parameterization of the


communication. In the project, we parameterize the communication (NOE module)
before compiling the application.

We proceed as follows:

Step Action

1 Define the IP address of the NOE module, as follows:

108
5-Implementation

2 Define the I/O Scanning of the NOE module to communicate with the Ethernet equipment.
Below is the occupation memory table of the equipment in the I/O scanning of the NOE
module:

Note: The sg² components linked to the Modbus serial via the ETG100 are not mapped in
the I/O scanning. Only the peripherals listed above are present.

109
5-Implementation

3 Define the I/O Scanning in Unity Pro:

Thanks to the previously defined table, we define the I/O scanning in Unity Pro. Each line
corresponds to a device.

Note: The repetitive rate (ms) duration corresponds to the Unity Pro Mast task periodic
duration.

Note: In order to be able to link the sg² objects with the Ethernet network, you need to map
one line per device. Therefore and due to the topology, some IP addresses are scanned
many times.

Validate the modifications and then launch a Build All.

Save and transfer the program.

Note: When Unity Pro is about to transfer the program in the PAC, it generates the .XVM.
This file allows to parameterize OFS.

110
5-Implementation

5.2. OFS

You can now begin the second step of the implementation phase, which is related to
the communication.

As defined in the previous paragraph, the .XVM file allows to parameterize OFS. This
file is mandatory for Vijeo Citect to communicate with the non-located variables
included in the Unity Pro application.

The configuration is explained below:

Step Action

1 Start the OFS configuration tool by clicking on the OFS quick launch button in the sg² Framework
window, as shown:

111
5-Implementation

2 Indicate the path of the previously defined .XVM in the Symbol table file:

3 You can adjust the communication parameters to optimize the communication between Vijeo Citect
and the PAC:

Sampling rate on reception (ms) (1000 ms is recommended)

Group minimum update rate (ms) (1000 ms is recommended)

OFS is now ready to communicate with the PAC.

For more information, see OFS documentation.

112
5-Implementation

5.3. Vijeo Citect Tags Generation with sg² Framework

sg² Framework is at the core of the third step in the implementation phase.

5.3.1. Configuration Finalization

The .stu file is generated by SGStudio Workbench. (Please refer to Unity Generation
section of this chapter). To generate the Vijeo Citect tags, you must configure an I/O
device in sg² Framework, following this method:

Step Action

1 Create the controller in the project, as follows:

In sg² Framework, right click Controllers, and then New,

Fill in the mandatory boxes (marked with *), and then save the modifications.

The Unity Project parameter must point to the previously generated .STU file. sg² Framework uses
the .STU file as a source file to automatically create the Vijeo Citect tags.

113
5-Implementation

2 Configure the communication aspect, as follows:

Right click on the Communications Module, and then New,

Fill in the mandatory boxes (marked with *), and then save the modifications.

3 Configure the supervision aspect, as follows:

Right click on Supervision Channel, and then New,

We recommend keeping the default values and then saving the modifications.

Note: The OPC Alias corresponds to the equipment name in OFS. This name must be identical in
Vijeo Citect and in OFS so that Vijeo Citect knows which equipment to request in OFS.

Deploy Supervision Services tree, right click on I/O Devices then New,

114
5-Implementation

Fill in the mandatory boxes (marked with *), and then save the modifications.

Note: The Supervision Channel box corresponds to the previously created equipment.

4 sg² Framework can now generate Tags of the Vijeo Citect configuration.

115
5-Implementation

5.3.2. Vijeo Citect Data Base Generation

sg² Framework generates the Vijeo Citect tags for one PAC at a time.

To do this generation, you must specify the Unity Pro project source by following the
method described in this table:

Step Action

1 Activate the Controller in sg² Framework, as follows:

Right click on the M340 PAC (included in the Controllers section) in the sg² Framework
configuration screen, and then click Activate:

An activated Controller is displayed as shown:

116
5-Implementation

2 Synchronize Unity Pro and Vijeo Citect. You can use one of the following two ways:

Either click on the Generate button from sg² Framework

Or click on the Manual Generation button from the sg² toolbar, which you can access from
the System Tray icon of the taskbar.

117
5-Implementation

3 Customize the tags and the messages associated with the data.

sg² generates the database of the tags and messages, and displays it in a spreadsheet for
potential modifications.

All the colored textboxes can be modified.

In the Generate column, three variable states can be displayed:

Mandatory: the tag is generated by mandate

Generate: the tag is generated

No generate: the tag is not generated

The Generate states can be modified, and the modifications are taken into account in the
next generation.

The UIM tab displays the Interlocks and detected faults (associated to sg² Components)
messages. These messages can be defined directly in the UIM tab and/or in Unity Pro during
the finalization phase. Nevertheless, the message’s modifications done in Unity Pro have
priority.

Note: To avoid the loss of data in the message modifications, it is recommended not to blend
the two previous ways, that is, make your desired modifications either with Unity Pro or with
the UIM tab.

118
5-Implementation

4 Proceed to the final generation of the messages and tags for Vijeo Citect.

Click Generate, and then Yes in the confirmation window.

The following pop-up window appears:

It indicates the successful operation.

Note: All the tags generated by sg² Framework are in the ‘Linked’ type in Vijeo Citect. A
Linked tag indicates a link with an external data source. Consequently, it cannot be modified
in Vijeo Citect, only by sg².

When sg² generates a database, it always replaces the earlier one to create a new .dbf file.
That is, if a component is deleted in the Unity Project, it is not included in the external
database generated by sg² Framework, and therefore the Vijeo Citect database is
automatically updated and reloaded.

119
5-Implementation

5.4. Unity Pro and Vijeo Citect Finalization

Here is the project’s advancement:

• The components are generated in the Unity Pro project,

• OFS is configured to manage the communication between Vijeo Citect and the
M340 PAC,

• The messages and tags are generated in the Vijeo Citect project.

You can now begin the fourth implementation step, the finalization of the Unity Pro
and Vijeo Citect applications.

In Unity Pro:

• Sequence programming, Interlocks, and default conditions.

In Vijeo Citect:

• Development of the graphic pages (flowchart and network)

120
5-Implementation

5.4.1. SGS Guardian

Before working on Unity Pro and Vijeo Citect, you must update the Vijeo Citect
database with SGS Guardian, following this methodology:

Step Action

1 You must activate the project and thus launch the Unity Pro application from sg²
Framework

2 SGS Guardian is launched when sg² Framework runs.

You can activate or deactivate it through one of the following methods:

Either from the sg² Framework toolbar, as shown:

Or from the toolbar in the taskbar of the System Tray

Note: In the System Tray, the icon displays the Activated/Deactivated state of SGS
Guardian as blue or red.

3 Once SGS Guardian is activated, the Vijeo Citect database is updated with the
modifications in the Unity Pro project.

121
5-Implementation

5.4.2. Unity Pro Finalization

The following paragraphs explain the final developments in Unity Pro, in terms of:
gateway, sequential, interlocks and user variables.

Note: As discussed earlier in the chapter, in order for SGS Guardian to update the
Vijeo Citect Database according to the Unity Pro modifications, you must launch the
Unity Pro project from sg² Framework by clicking on the Active Project button.

Gateway

To communicate with the Modbus serial equipment via Ethernet, an ETG100 gateway
is required. The IP address of this gateway must be configured in Unity Pro as follows:

• Open the Unity Pro section ModbusGateway

• Copy the IP address (84.16.1.15) in the ETG100_GatewayAddr string variable.

Note: The IP address syntax only applies to a NOE module on a M340 PAC. Refer to
the documentation of the sg² component Modbus serial-Ethernet Gateway for the
different syntaxes regarding the PAC configuration.

122
5-Implementation

Sequential

The main part of the sequential is in the STATION_RUNNING section.

We recommend the following methodology:

Step Action

1 Type the step description for the display in the Sequential Control component:

Note: Others Sequential Control components are available.

2 Type the step and the transitions.

3 Type the parameter text of the sequential in the Comment textbox of the following variables:

« STATION_SEQPAR05_ST.IP01 » : “LIFTING to SCREENING (1/10s)”

« STATION_SEQPAR05_ST.IP02 » : “SCREENING to GREASE SAND (1/10s)”

« STATION_SEQPAR05_ST.IP03 » : “GREASE SAND to CLARIFIER(1/10s)”

« STATION_SEQPAR05_ST.IP04 » : “Free”

« STATION_SEQPAR05_ST.IP05 » : “Free”

123
5-Implementation

Messages

sg² uses the Vijeo Citect supervision to display the default and interlock conditions of
the different actuators. You must therefore first instantiate these elements with a
default management (CONDSUM) and/or interlocks (CONDSUM1).

The following table displays the comments management:

Step Action

1 Type the condition messages of the defaults.

Lf1PmpD1 is shown in the below screenshot as an example. Edit the DFB instance
Lf1PmpD1_FC_CONDSUM.

We recommend to type the comment text regarding the default connected in the DFB input.

Note: for the messages on the Interlock conditions, apply the same rule.

124
5-Implementation

2 Before the build, verify that SGS Guardian is activated, as this automatically generates the
messages in Vijeo Citect.

3 Once the build completes, SGS Guardian automatically steps in to generate the export of the
Unity Pro variables. The following popup appears once the export completes:

Click See Changes to display the table describing all the created, modified and deleted
messages and tags. If necessary, make any desired modifications.

Note: You do not need to stop/restart the Vijeo Citect application to account for these
new messages.

User Variables

SGS guardian not only generates the sg² component variables modified, but also the
variables that you created in Unity Pro. The following table shows an example of a
Boolean (HMI_CLEAR_FAULT).; we use this variable to do the acquaintance of the
detected defaults.

Step Action

1 Build from Unity Pro with SGS Guardian activated.

2 The confirmation window displays.

Click See Changes to modify the Generate status, as below shown:

Modify the Generate state in Generate.

Click Generate.

Note: sg² stores the Generate states, so you do not need to define this variable again before future
generations.

125
5-Implementation

5.4.3. Vijeo Citect Finalization

The following paragraphs explain the final developments in Vijeo Citect, in terms of
access level and flowchart.

Access Level

Before creating the access level, you must consider the following privileges. The sg²
column indicates the levels with which the component button are created in sg². As
defined in the selection chapter, the crosses indicate the choices.

Privileges Operator Production Manager Maintenance Access Level in

Minimum Intermediate Maximum sg²

Alarms
× × × 1
acknowledgement

Changes of the operator


× × × 2
parameters

Commands linked to the


× × × 2
sequences

Changes of the alarm


× × × 2
thresholds

Enable/ Disable
× × × 3
First-level Alarms

Change of owner
× × 4
(Operator/ Program)

Changes of the
× 5
parameters

Enable/ Disable
× 5
Second-level Alarms

Interlock Bypassing × 5

Enable/ Disable
× 5
the simulation mode

126
5-Implementation

Here, the goal is to define the three following access levels:

• The Operator profile, including the 1,2 and 3 levels,

• The Manager profile, including the 1,2,3 and 4 levels,

• The Maintenance profile for all the levels.

The following table explains you how to create the users profiles:

Step Action

1 Launch Citect Project Editor

2 Click System-> Users, and then create your profile.

The following screenshot shows the Operator profile, with the fields for levels 1 to 3
completed:

Note: press F2 to get the area parameters.

The following screenshot shows the Manager profile:

127
5-Implementation

The following screenshot shows the Maintenance profile:

128
5-Implementation

Control Views

The different control views of the installation are detailed below.

The project hierarchy is as follows:

Home

• General view

 Lifting

 Screening

 Grease&Sand

 Clarifier

• Network

• Electric

The home view is the start page of the Water Vijeo Citect application, which is
configured in the following path: tools -> project editor -> tools -> computer setup
wizard.

129
5-Implementation

The following table explains the Lifting view implementation:

Step Action

1 Create a new graphic page from the sg²_style template through the following path: file->new-
> template. Name it lifting.

2 Draw the static elements of the graphic page.

Illustrated here is the lifting page:

3 Instantiate the sg² Genies. The libraries of the sg² Genies are marked with a sgc_ prefix.

130
5-Implementation

4 This step explains how to correctly organize the view.

Illustrated here are the Lf1PmpD1 pump, the associated drive, and the corresponding object that is
dedicated to pump cycle management.

1) Press F11, and then select the sgc_rcpump_10 Genie (Speed Driven Centrifuge Pump) of the
sgc_sddevctl library.

Genie parameters:

Use the menu to specify the Control Module name, here Lf1PmpD1.

Note: Due to the sg² filter, only the corresponding instances display.

Set the Area: specify the zone number, here 1, for the object. You must type a zone number >0 and
<255.

Click on OK to complete the instantiation.

Position the object on the Lifting graphic page.

131
5-Implementation

2) You can now add the drive

Select the ATV_10 (altivar) Genie from the sgc_device library:

Component parameters, like previously explained:

Specify the Control Module.

Set the area.

Click OK to complete the instantiation.

Position the Genie on the Lifting graphic page.

132
5-Implementation

3) You can now add the component of the pump cycle management.

Select the created Genie PCYCLE from the sg_device library:

Parameter component:

PumpNumber= 1 (for example, 1 for Lf1PmpD1 and 2 for Lf1PmpD2)

Name = WasteTank (instance name given to the component in SGSWorkbench)

Click OK to complete the instantiation.

Position the Genie on the Lifting graphic page.

Repeat the three previous operations for Lf1PmpD2 and Lf1PmpD3.

133
5-Implementation

Complete the instantiation of all the necessary components on the graphic view, as follows:

5 General alarm acquaintance

This button sets the HMI_CLEAR_.FAULT bit previously created (Input tab). The PAC performs the bit
reset.

A privilege level is assigned:

134
5-Implementation

Entering 1 as a privilege level forces the operator to be connected to acquaint the current alarms.

6 Show/Hide the text and devices.

1) Text

All the instantiated sg² Genies of the Lifting view have an associated text marking them.

The following screenshot shows an example:

This text is a Genie sgc_tag in the sgc_items library.

The call function PageGetInt() is completed on the Appearance properties tab. This function reads a

135
5-Implementation

Page-Based-Variable value. The text displays when the Page-Based-Variable equals 1.

Refer to the sg² documentation for more information about the PageGetInt () function.

A shortcut to the PageDown key, linked to a script, exists on the Lifting Properties page to allow you to
change the value of the Page-Based Variable.

Refer to the sg² documentation to have more information about the PageSetInt () function.

The value is inverted each time the PageDown key is pressed.

136
5-Implementation

2) Devices

This property is assigned for all devices to lighten the display.

Select the 5 instances of the Lifting view (2ATS and 3ATV), and the group them.

Add the function PageGetInt(1)=0, as in the sgc_tag Genie previously described:

This functioning mode is common to the 4 views (Lifting, Screening, Grease&Sand and Clarifier).

The following image illustrates the final lifting view:

137
5-Implementation

Parameters

To access to the parameters from Vijeo Citect, the sg² Genie sgc_parameter_30 of
the sgc_param library is located on the project’s GeneralView view.

We utilize the following parameters:

• Oxygen remote setpoint (mg/) – Min Max [0…100]

• Level remote setpoint (m) – Min Max [0…20]

3
• Minimum inlet Flow to start Lifting Pump (m /h) – Min Max [0…100]

Then, define the three corresponding variables in Unity Pro:

• OICGs1Ot1_RSP for Oxygen remote setpoint (mg/)

• LICLf1LtD1_RSP for Level remote setpoint (m)

3
• MinFlow_Lf1PmpR for Minimum inlet Flow to start Lifting Pump (m /h)

To have different parameters following seasons (winter, summer), we define two


categories of parameters:

• Winter parameters

• Summer parameters

To implement these parameters, edit the C:\Schneider Application\ Vijeo Citect\ User\
WaterProject\ parameters.mdb file with Microsoft Access.

Three tables are defined in this file:

• Definitions

• Enums

• ParametersList

In the project, we use the Definitions and ParametersList only.

Note: The Enums table is used to implement the predefined parameters values via a
menu.

138
5-Implementation

5.5. Incremental Implementation

The incremental management of the project is the final step of the implementation
phase. The goal of the incremental implementation is to update the whole project.

It can be done in one of the following two ways:

• You must add new components in the project. In this case, the incremental
implementation is done trough three steps: SGStudio Workbench, OFS and sg²
Framework.

• The components you want to add already exist. In this case, you can duplicate
them using a copy/paste method.

The following sections explain these two approaches.

139
5-Implementation

5.5.1. Add New Components

SGStudio Workbench

Using SGStudio Workbench is the first step to adding new components in the Unity
Pro sections of the project. Follow the method below:

Step Action

1 Create a new project. Change the version name.

In this example,STG_WATER_M340_V1_1 is typed.

2 Select the .stu file of the WaterProject to be updated by clicking Add, and then open.

3 Name the CONTROLLER, and then click OK.

4 These steps are the same as for a newly created project. See the first paragraph of this
chapter.

OFS

In OFS, you must point to the new project, as follows: modify the path of the symbol
file that must point to the XVM file of the new Unity Pro project generated by the
following new sg² project STG_WATER_M340_V1_1.

If the XVM file is not already created, do an export of variables of the new Unity Pro
project.

140
5-Implementation

Sg² Framework

To generate the Vijeo Citect tags with sg² Framework, modify the .stu source file. This
file must point to the new sg² project, that is, STG_WATER_M340_V1_1, as follows:

A new generation can now be launched.

Note: We recommend you to do a backup of the Vijeo Citect project before this
generation.

141
5-Implementation

5.5.2. Component Duplication

If the component type already exists, you can directly add a new component to a
Unity Pro program without going through an incremental implementation, as follows:

Step Action

1 Copy / paste all the EDT/DDT/DFB variables of the existing component.

2 Rename the variables to apply them to the new component.

3 Launch the generation from sg² Framework to create the new tags in Vijeo Citect.

142
6-Operation

6. Operation

6.1. User Guide

This chapter provides a methodology for operating application. It presents the content
in terms of navigation rules, alarms management, and trends performing.

6.1.1. Home

Once the application is launched, the system opens a home page, which situates the
project in a whole water treatment plant:

A simple click on the home page leads to the general view, which displays the project
and its four pretreatment units:

A navigation toolbar is located on the top of the screen, and a display dedicated to the
alarms is located on the bottom. The current date and time are displayed on the
bottom right corner.

143
6-Operation

6.1.2. Navigation

The navigation takes place through a graphic environment. Once the system runs, a
screen displays the complete installation. You can click on the four following main
units: Lifting, Screening, Grease & Sand Removal and Primary Clarifier. The mouse
pointer highlights them with a square. Clicking on the desired unit displays the
equipment included in the unit and then each control module related to the equipment.
The goal is to make the navigation intuitive: unit-> element-> equipment-> control
module…The following screenshots shows the navigation sequence for accessing the
control panel of the linked Super Genies that manage the Lf1PmpD2 pump in the
Lifting. unit:

144
6-Operation

6.1.3. General View

From the following general view,

you can access many others screens:

• Click on the OperLog

To display the following screen:

This view consists of a traceability tool.

145
6-Operation

• Click on the Electrical button,

to display the following screen:

This view shows the electrical distribution status.

• Click on the Network button,

to display the following screen:

This view shows the Network status.

146
6-Operation

• An sg² component (Cf. Process Control paragraph in the Design chapter) is


implemented for the process control. Consequently, you can find its associated
Genie and Super Genie, as below shown:

For more information about their utilization, please refer to sg² documentation.

6.1.4. Alarms

The bottom of the home page is dedicated to the standard alarms display. At the
center, a screen displays the current alarms. On the left corner, five icons allow you to
manage the alarms display with a simple click:

• : This icon enables/disables the audible alarm notification.

• : This icon displays the alarms that are disabled.

• : This icon displays the hardware alarm page.

• : This icon displays the alarms, sorted historically.

• : This icon displays all alarms.

147
6-Operation

6.1.5. Trends

The trends menu is available on the main navigation toolbar. It permits you to
represent the trends of values through a graphic tool. You can access this graphic
trend tool by directly clicking on the Trends button.

The following figure illustrates a trends display:

This tool has two tool panels: data and graphic management.

The following table explains the different proposed tools:

Data management Graphic management

: Click on this icon to save : Click on this icon

the data as a .dbf file. to show a panel that enables navigation through
the graphic representation.

: Click on this icon to set the duration of the


: Click on this icon to copy
displayed trends.
the current data to the clipboard.

: These icons allow


: Click on this icon to send
miscellaneous handling of the display: zoom,
the trends to a printer.
auto scale, and restoration of the default scale
parameters.

148
Schneider Electric Industries SAS
Head Office Due to evolution of standards and equipment, characteristics indicated in texts and images
89, bd Franklin Roosvelt in this document are binding only after confirmation by our departments.
92506 Rueil-Malmaison Cedex
FRANCE
Print:

www.schneider-electric.com

Version 1.2 1–- 12


Version 2009
10 2008

You might also like