Download as pdf or txt
Download as pdf or txt
You are on page 1of 162

System Technical Guide

How can I ...


Build a Process Control Application with
SoCollaborative Engineering sg
Tested, Validated and Documented


3
Table of Contents

Introduction...............................................................................5
Selection..................................................................................17
Design......................................................................................39
Configuration..........................................................................77
Implementation.......................................................................89
Operation...............................................................................153

4
1-Introduction

5
Introduction
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-Introduction

6
The following illustration shows a synoptic view of the projects approach:


1-Introduction

7
Document Overview
The document provides a step-by-step methodology to create an application with the
sg as a system engineering tool. Here is an overview of the document:
Chapter 2, Selection. The P&ID (Piping and Instrumentation Diagram) of the plant
process is used as the starting point for this analysis. This chapter 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 systems architecture: Define the projects 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.
7. Operating modes: this section describes the operating modes that
manage the installation (remote and local).
Chapter 3, Design. This chapter 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 three software: Unity Pro, sg and
Vijeo Citect.
3. Vijeo Citect Navigation: Customize the UAG project to meet the
project constraints and requirements.
1-Introduction

8
Chapter 4, Configuration. This chapter explains the different elements that you
have to set up in the project:
1. PAC Configuration in Unity Pro
2. Vijeo Citect tags generation using sg Framework
3. Communication configuration using OFS
Chapter 5, Implementation. This chapter 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.
Chapter 6, Operation. This chapter summarizes what the operator can do with the
final SCADA application:
1. process visualization and navigation
2. alarms
3. trends
4. specific sg components
Note: All sectional architectures are interconnected.

1-Introduction

9
Project Requirements
This STG is based on the following specific requirements:
Engineering time reduction,
Customer standards in terms of engineering, operation and maintenance,
Ease of future extension.
Integrity and standardization.
These requirements acted as a guide during the solution development.
1-Introduction

10
Wastewater Project Description
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
Grease&Sand
Primary Clarifier
Screening
1-Introduction

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

1-Introduction

12
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
basins bottom..



1-Introduction

13
Customer Standards
To standardize the design according to customer standards, sg was used as a
system engineering tool when developing this STG.
Using sg maintains the following customer standards:
Naming rules,
Operation rules,
Operating modes,
State-of-the-art start/stop sequences.
A sg application contains objects, variables, and pictures with customized
characteristics in order 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-Introduction

14
How to Use This Guide
No technical details about designing applications on this Distributed Peripheral
Architecture are described here. You can instead get this information from the related
Distributed Peripheral Architecture STG.
Note that you can obtain detailed information regarding sg from the sg
documentation.
Knowledge of the Distributed Peripheral Architecture and sg, aids you in
understanding customized architectures.
The product descriptions in this document do not replace other Schneider Electric
related user manuals or technical publications.
1-Introduction

15
Safety Notice
The standards and level of safety you apply to your system is determined by its
design and the extent to which your system may impact people and equipment. When
building a system based on the architectures introduced in this document, make sure
you follow the relevant national and international safety laws and regulations.
Read these instructions carefully, and look at the equipment to become familiar with
the device before trying to install, operate, or maintain it. The following special
messages may appear in this documentation or on the equipment to warn of potential
hazards or to call attention to information that clarifies or simplifies a procedure.

Please note that electrical equipment should be installed, operated, serviced, or
maintained only by qualified personnel. No responsibility is assumed by Schneider
Electric for any consequences arising out of the use of this material.
1-Introduction

16
Objective
In this architecture building project documentation, several STGs (System Technical
Guide) are tested and validated on a Distributed Peripheral Architecture. This
concise and readable document helps you understand a sg application based on this
Distributed Peripheral Architecture.





2-Selection

17
Selection

This chapter contains the following sections:

Process Description........................................................................................................................... 20
Functional Analysis ............................................................................................................................ 21
Introduction..................................................................................................................................... 21
Lifting.............................................................................................................................................. 22
Screening ....................................................................................................................................... 25
Grease & Sand Removal ............................................................................................................... 26
Primary Clarifier.............................................................................................................................. 27
Common Functioning ..................................................................................................................... 28
Naming Rules .................................................................................................................................... 29
Final P&ID of the Project.................................................................................................................... 30
Automation System Architecture Topology........................................................................................ 31
Automation Requirements ................................................................................................................. 33
Access Level ...................................................................................................................................... 37
Operating Modes ............................................................................................................................... 38



2-Selection

18
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:



2-Selection

19
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 projects
process.
2-Selection

20
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:

2-Selection

21
Functional Analysis
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.
2-Selection

22
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
basins 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:









A level switch indicates a very low level in the tank. Two flowmeters (gauged in m
3
/h)
measure the input and output flows of the basin. Each flowmeter has a totalizer
function.
Regulation Output Signal
Drive Pump Setpoint
2-Selection

23
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 tanks pumps.
2-Selection

24
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 tanks
pumps.
2-Selection

25
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.
2-Selection

26
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 units motors, pumps and valves.
2-Selection

27
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 units motors, pumps and valves.
2-Selection

28
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.
2-Selection

29
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
(according to the
Control Module)
1 letter 1 digit

The following table presents the naming rules in the application:
Unit Unit Index Control Module Sub Index
(Optional)
Control
Module Index
Lf: Lifting
Sc: Screening
Gs: Grease&
Sand
Pc: Primary
Clarifier
1: first
occurrence
2: second
occurrence

Actuators
Pmp: Pump
Mot: Motor
Vlv: Valve
Digital Sensors
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
R: Rain
Tank
D: Dry Rain
Tank
1: first
occurrence
2: second
occurrence

2-Selection

30
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:

2-Selection

31
Automation System Architecture Topology
The functional analysis allows to highlight the automation requirements. From the
final P&ID, we define the automation system 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 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. Ethernet
communication allows the SCADA system to easily access 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.
2-Selection

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

2-Selection

33
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
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
Pumps
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
Lf1LsllR1 Very low level of the rainwater tank on Advantys STB
Lf1LtD1 Analog level of the wastewater tank
Lf1FtD1 Input flow of the wastewater tank
Lf1FtD2 Output flow of the waste tank
Lifting
Analog &
Digital
Inputs
LfLsllD1 Very low level of the waste tank on Advantys STB
2-Selection

34
Sc1Mot1 Direct starter TeSys U Advantys STB advanced extension
rack
Sc1Mot2 Direct starter TeSys U Advantys STB standard extension
rack
Motors
Sc1Mot3 Direct starter TeSys U Advantys STB multi-function
extension rack
Valve Sc1Vlv1 Contactor on Advantys STB
Sc1Lsh1 High level on Advantys STB
Screening
Digital
Inputs
Sc1Lsl1 Low level on Advantys STB
2-Selection

35
Gs1Mot1 Variable speed drive: ATV31 connected on CANopen
via an Advantys STB
Gs1Mot2 Direct starter TeSys U Standard + EPI2145 Advantys
STB Module
Gs1Mot3 Direct starter: TeSys T connected on Modbus serial via
an ETG100 gateway
Gs1Pmp1 Direct starter TeSys U Standard + EPI2145 Advantys
STB Module
Motors
Gs1Pmp2 Contactor on Advantys STB
Gs1Vlv1 Contactor on Advantys STB
Gs1Vlv2 Analog valve on Advantys STB Valves
Gs1Vlv3 Contact open/close on Advantys STB
Gs1Ot1 Oxygen measure on Advantys STB
Gs1Lsh1 High level on Advantys STB
Gs1Lsl1 Low level on Advantys STB
Gs1Lsh2 High level on Advantys STB
Gs1Ls1 Sensor on Advantys STB
Gs1Ls2 Sensor on Advantys STB
Grease&Sand
Analog &
Digital
Inputs
Gs1Fs1 Flow switch on Advantys STB
2-Selection

36
Pc1Mot1 Drive: TeSys U Standard + EPI 2145 on Advantys STB
Pc1Mot2 Drive: TeSys U Standard + EPI 2145 on Advantys STB
Pc1Pmp1 Contactor on Advantys STB
Motors
Pc1Pmp2 Contactor on Advantys STB
Pc1Vlv1 Contactor on Advantys STB
Valves
Pc1Vlv2 Contactor on Advantys STB
Pc1Lsh1 High level on Advantys STB
Clarifier
Digital
Inputs
Pc1Lsl1 Low level on Advantys STB
Note: all the Advantys STB devices are connected on Ethernet.
2-Selection

37
Access Level
sg 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
Minimum
Production Manager
intermediate
Maintenance
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

3-Design

38
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).
3-Design

39
Design

This chapter contains the following sections:

sg System Engineering Tool Overview............................................................................................. 41
SGStudio Workbench..................................................................................................................... 41
sg Framework ............................................................................................................................... 42
SGBuilder ....................................................................................................................................... 43
SGS Guardian................................................................................................................................ 43
sg Libraries ....................................................................................................................................... 44
Diagnosis Library............................................................................................................................ 45
Communication Library .................................................................................................................. 46
Device & Process Libraries ............................................................................................................ 47
Components Creation........................................................................................................................ 57
Step 1: Creation of the Component for Unity Pro ......................................................................... 58
Step 2: Creation of the Component for Vijeo Citect ....................................................................... 70
Step 3: Creation of the Component Interface in Vijeo Citect ......................................................... 74
Navigation Rules................................................................................................................................ 76

3-Design

40
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 Vijeo Citect navigation.
This Design section shows how to realize these three steps.
For this project sg system engineering tool is used to optimize the realization,
reduce the engineering time, and facilitate the deployment of future similar projects.
sg system engineering tool includes many tools. You can find a short description in
the following paragraphs:
3-Design

41
sg System Engineering Tool Overview
sg2 system engineering tool includes pre-configured objects for process control and
device integration. These objects reduce development costs and provide added value
through their use.
sg2 includes tools for automatic code generation and for adapting/creating objects in
line with the specific requirements of each particular solution.
The sg2 system engineering tool is made up of two types of main components:
Development platform: sg2 Platform.
Resources that are ready to be used for the development of automation systems:
sg2 Resources.
The three sg software programs are described below:
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 Unity application.
3-Design

42
sg Framework
sg Framework is the environment from which the engineering tasks related to sg2
Systems are performed. sg Framework makes it possible to manage multiple
Systems. An sg System 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 sg2 Framework:
Managing sg Systems, 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.
3-Design

43
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.
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.
3-Design

44
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.
3-Design

45
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
recovery
M340 PAC M340 Diagnosis/ General Status/
CPUDIAG
This component
allows you to
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 the SCADA facet:

3-Design

46
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
with Ethernet
devices via the
Ethernet NOE
module
Ethernet port
for M340 PAC
EPortM Communication/
Communication in
Ethernet/ Ethernet Port
M340
This component is
mandatory for objects
that exchange data on
Ethernet
Communication
with Modbus
serial devices via
a Modbus serial
/Ethernet
gateway
ETG 100
Gateway
ETG100 Communication/
Communication in
Ethernet/ Ethernet-
Modbus gateway
This component is
mandatory for objects
that exchange data on
Modbus serial line
For the communication, we can define the following inheritance principle:







t
3-Design

47
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





3-Design

48
Rainwater Tank
Function Equipment Instance sg Component Comments
Digital High
Level sensor
Lf1LshR1
Process\ Digital Inputs\
Digital Input
The Digital Input component is
adapted to manage the digital
level.
Digital Low
Level Sensor
Lf1LslR1
Process\ Digital Inputs\
Digital Input
The Digital Input component is
adapted to manage the digital
level.
Digital level
Digital Low Low
Level Sensor
Lf1LsllR1
Process\ Digital Inputs\
Digital Input
The Digital Input component is
adapted to manage the digital
level.
Modbus serial
ATS48
Lf1PmpR1
Lf1PmpR2
Devices\ Devices in
Modbus\ Modbus
ATS48 Progressive
Starter
Ethernet communication with
the two ATS48 via the
ETG100 gateway
Digital Pumps
piloted by
ATS48
Lf1PmpR1
Lf1PmpR2
Process\ On-Off
Motors\ With
Interlocks, Failures,
Maintenance and
Device
This component automatically
associates the motor with the
device.
Basin pumping with pump
cycle management
Pumps cycle
Programmed in
the PAC
Rainwater Tank
Component to be
created
This component automatically
manages the pump cycle
(normal\rescue).



3-Design

49
Wastewater Tank
Function Equipment Instance sg Component Comments
Digital Safety
Sensor
Digital Low Low
Level Sensor
Lf1LsllD1
Process \ Digital Inputs
\ Digital Input
The Digital Input component is
adapted to manage the digital level.
Flow in \ out
Measure in
the basin
Analog Flow sensor
4-20mA
Lf1ftD1
Lf1ftD2
Process \ Analog Inputs
\ With Calculations
The Analog Input with Calculation
meets the need to measure the flow.
ATV61 Ethernet
Lf1PmpD1
Lf1PmpD2
Lf1PmpD3
Devices \ Devices in
Ethernet \ Ethernet
ATV61
The I\O scanning service of the NOE
Ethernet module enables to
communicate with the equipment.
Pumps piloted by
ATV61
Lf1PmpD1
Lf1PmpD2
Lf1PmpD3
Process \ Speed Drive
Motors \ With Interlocks,
Failures, Maintenance
and Device (Variable
speed)
This component automatically
associates the motor with the device.
Analog Level Sensor
4-20mA
Lf1LtD1
Process \ Analog Inputs
\ With Alarms
The Analog Input with Alarms
component meets the need to
manage the different alarms related
to the water level in the basin.
Regulation in PAC LICLf1LtD1
Process \ PIDs \ PID
Block
The PID Block component meets the
need for the regulation of the
wastewater basin. You can easily
customize this component.
Split Range in PAC Lf1_SPLTRNGE
Process \ Advanced
Control \ Split Range
Controller
The Split Range Controller
component manages this
functionality with a control\command
from Vijeo Citect. Refer to the
functional analysis chapter for more
information about the split range.
Basin
pumping with
pump cycle
management
Programmed in the
PAC
WasteTank
Component to be
created

This component automatically
manages the pump cycle
(Primary\Secondary\ Rescue).

3-Design

50
Screening



3-Design

51

Function Equipment Instance sg Component Comments
Digital High
Level
Sc1Lsh1 Process \ Digital Inputs\ Digital Input
The Digital Input component
is adapted to manage the
digital level.
Digital level
Digital Low
Level
Sc1Lsl1 Process \ Digital Inputs \ Digital Input
The Digital Input component
is adapted to manage the
digital level.
Emptying
basin valve
(water)
Digital Valve
with
open/close
feedback
Sc1Vlv1
Process \ ON-OFF Valves \ Valves
With Interlocks & 2 limit switches
This component meets the
need to manage a digital
valve, which includes
detected faults, maintenance
and record managements.
TeSys U
Advanced
Starter
Sc1Mot1
Devices \ Devices in Advantys STB \
Advantys STB TeSys U Advanced
Starter
This equipment is connected
to an Advantys STB Rack
Extension.
TeSys U
Standard
Starter
Sc1Mot2
Devices \ Devices in Advantys STB \
Advantys STB TeSys U Standard
Starter
This equipment is connected
to an Advantys STB Rack
Extension.
TeSys U
Multifunction
Starter
Sc1Mot3
Devices \ Devices in Advantys STB \
Advantys STB TeSys U Multifunction
Starter
This equipment is connected
to an Advantys STB Rack
Extension.
Extraction,
transport and
compacting of
the waste
Digital Motor
piloted by
TeSys U
Sc1Mot1
Sc1Mot2
Sc1Mot3
Process \ ON-OFF Motors \ With
Interlocks, Failures, Maintenance and
Device
This component
automatically associates the
motor with the device.

3-Design

52
Grease & Sand



3-Design

53
Function Equipment Instance sg Components Comments
Digital High
Level
Gs1Lsh1
Gs1Lsh2
Process \ Digital Inputs \ Digital
Input
The Digital Input
component is adapted to
manage the digital level.
Digital Level
Digital Low
Level
Gs1Lsl1
Process \ Digital Inputs \ Digital
Input
The Digital Input
component is adapted to
manage the digital level.
Digital Limit
Switch
Gs1Ls1
Gs1Ls2
Process \ Digital Inputs \ Digital
Input
The Digital Input
component is adapted to
manage the digital level
switch.
ATV31 on
CANopen
Gs1Mot1
Devices \ Devices in Advantys STB
\ Advantys STB ATV31 DriveRamp
The ATV31 communicates
on Ethernet via a CANopen
XBE2100 extension of the
Advantys STB.
Motor piloted
by ATV31
Gs1Mot1
Process \ Speed Drive Motors \
With Interlocks, Failures,
Maintenance and Device (2 speed
Analog \ 2 directions)
This component
automatically associates
the motor with the device.
Gs1Mot1 Process \ Advanced Control \ Ramp
The Ramp component
meets the need to manage
the motor acceleration/
deceleration by program.
Management of the
scraper carriage
movement
Digital Limit
Switch
Gs1Ls1
Gs1Ls2
Process \ Digital Inputs \ Digital
Input
The Digital Input
component is adapted to
manage the digital level.
Management of the
scraper position
Digital Motor
piloted by
simple
contactors
Gs1Mot2
Process \ 2 Speeds-Directions
Motors \ With Interlocks, Failures
and Maintenance
This component meets the
need to manage the 2
speed-directions
functionality.
Regulation of the
oxygen concentration
in the basin
Tesys T on
Modbus serial
Gs1Mot3
Devices \ Devices in Modbus \
Modbus Tesys T Motor
Management Controller
Ethernet communication
with the TeSys T via the
ETG100 gateway.
3-Design

54
Digital Air
Compressor
piloted by
TeSys T
Gs1Mot3
Process \ ON-OFF Motors \ With
Interlocks, Failures, Maintenance
and Device
This component
automatically associates
the motor with the device.
Analog
Modulating
Valve
4-20 mA
Gs1Vlv2
Process \ Control Valves \ With
Position Feedback
This component meets the
need to manage the
functioning of the
modulating valve.
Analog
Oxygen
Sensor
4-20 mA
Gs1Ot1
Process \ Analog Inputs \ Analog
Input
The Analog Input
component is adapted to
manage the digital level.
Regulation in
the PAC
OICGs1
Ot1
Process \ PIDs \ PID Block
The PID Block meets the
need to manage the
regulation. You can easily
customize this component.
Digital
Counting
Contact
Gs1Fs1
Process \ Digital Inputs \ With
Calculations
This component meets the
need to count the sand
quantity.
Digital Valve
with
open/close
feedback
Gs1Vlv1
Process \ ON-OFF Valves \ Valves
With Interlocks & 2 limit switches
This component meets the
need to manage the valve,
which includes detected
faults, maintenance and
record managements.
Extracted sand
pumping
Digital Pumps
piloted by
simple
contactor
Gs1Pmp1
Gs1Pmp2
Process \ ON-OFF Motors \ With
Interlocks, Failures and
Maintenance
This component meets the
following needs: it includes
motor management (1
direction, digital) and
detected fault,
maintenance and record
managements.
Evacuation valve of the
basin
Manual Valve
with
open/close
feedback
Gs1Vlv3
Process \ Hand Valves \ Valves
With 1 or 2 limit switches
This component meets the
needs.
3-Design

55
Primary Clarifier











Function Equipment Instance sg Component Comments
Digital High
level
Pc1Lsh1
Process \ Digital Inputs \
Digital Input
The Digital Input
component is adapted to
manage the digital level
switch.
Digital Level
Digital Low
Level
Pc1Lsl1
Process \ Digital Inputs \
Digital Input
The Digital Input
component is adapted to
manage the digital level
switch.
Extraction of the sludge
included in the decantation
water. Two scrapers with 2
direction functioning.
TeSys U on
EPI2145
Advantys STB
extension
Pc1Mot1
Pc1Mot2
Process \ 2 Speeds -
Directions Motors \ With
Interlocks, Failures and
Maintenance
This component meets the
need to manage the 2
speed-directions
functionality.
Extracted sludge pumping
Digital Pump
piloted by
simple contactor
Pc1Pmp1
Pc1Pmp2
Process \ ON-OFF Motors \
With Interlocks, Failures and
Maintenance
This component meets the
following needs: it includes
motor management (1
direction, digital) and
detected fault,
maintenance and record
managements.
3-Design

56
Digital Valve
with open/close
feedback
Pc1Vlv1
Pc1Vlv2
Process \ ON-OFF Valves \
Valves With Interlocks & 2
limit switches
This component meets the
need to manage a digital
valve, which includes
detected fault,
maintenance and record
managements.
Programmed in
the PAC
ClarifierSludge Component to be created
This component
automatically manages the
pump cycle (Normal\
Rescue).
Process Control
The following table presents the process components:
Function Equipment Instance sg Components Comments
Sequence management and
automatic command of the
wastewater pretreatment
process
STATION
Process \
Sequential
Control \ With
User Sequence
template in
Sections
The control/command are
based on the S88 model,
associated to a 5 parameters
management block. The
component provided by sg
allows forcing transitions from
a Vijeo Citect interface.
Display on Vijeo Citect of the
messages linked to the
process
STATION
Process \ User
Interface \
Message Box
The Message Box component
meets the needs.




3-Design

57
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.
3-Design

58
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:









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.
3-Design

59




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

3-Design

60
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:


3-Design

61
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:






3-Design

62
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.
3-Design

63
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:

3-Design

64
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.
3-Design

65
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.
3-Design

66

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:

3-Design

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

3-Design

68
in SGStudio Workbench

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

69
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.
3-Design

70
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.
3-Design

71
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 objects 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.
3-Design

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


3-Design

73

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


3-Design

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

3-Design

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

3-Design

76
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.
4-Configuration

77
Configuration

This chapter contains the following sections:


PAC Configuration with Unity Pro...................................................................................................... 79
Unity Project Creation .................................................................................................................... 80
sg Framework ................................................................................................................................... 82
OFS Configuration ............................................................................................................................. 85
ODBC (Open DataBase Connectivity) Configuration ........................................................................ 87

4-Configuration

78
Here is a sum up of the projects 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 controllers
hardware configuration.
Before configuring anything, you must consider the project hypothesis regarding the
hardware configuration.
Projects PAC Configuration
M340 Alimentation CPS 2000
CPU P342020
NOE 0110 modules IP address:
84.16.1.4/255.255.0.0


4-Configuration

79
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, three 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.
4-Configuration

80
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.
4-Configuration

81
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.
4-Configuration

82
sg Framework
The second step, after loading the hardware template in SGStudio Workbench,
consists of the Vijeo Citect servers 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.
4-Configuration

83
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:


The following screenshot shows the created WaterProject:
4-Configuration

84

5 Once the project is created, you must configure the OPC client.
Open Vijeo Citect.ini (default path: c:\Windows), and copy the following section at the end of
the file:
[OPC]
LeaveTagsActive = 0
Block = 1
FailOnBadData = 1
FailOnUncertain = 0
AddItemAsVtEmpty = 0
CacheRead = 0
RefreshAfterWrite = 1
UseOPC2 = 1
Save and then exit the application.
For more information about these attributes, please refer to the Vijeo Citect and OFS
documents.

4-Configuration

85
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 PAC) or Build Changes. Click the Project autosaving on
download in the Unity Pro Options window, as follows:

4-Configuration

86

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.
4-Configuration

87
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 applications DataBase as shown:

Click on ok then close the ODBC manager.











4-Configuration

88








5-Implementation

89
Implementation

This chapter contains the following sections:

Unity Pro Generation with SGStudio Workbench .............................................................................. 91
Project Creation.............................................................................................................................. 93
PAC Selection ................................................................................................................................ 94
Instantiation.................................................................................................................................... 95
Project Components List .............................................................................................................. 104
Section Organization.................................................................................................................... 105
Animation Table ........................................................................................................................... 106
Operator Screen........................................................................................................................... 106
Unity Generation .......................................................................................................................... 106
Generated Program...................................................................................................................... 106
Finalization of the PAC Configuration .......................................................................................... 114
OFS.................................................................................................................................................. 117
Vijeo Citect Tags Generation with sg Framework .......................................................................... 119
Configuration Finalization............................................................................................................. 119
Vijeo Citect Data Base Generation .............................................................................................. 122
Unity Pro and Vijeo Citect Finalization............................................................................................. 126
SGS Guardian.............................................................................................................................. 127
Unity Pro Finalization ................................................................................................................... 128
Vijeo Citect Finalization................................................................................................................ 132
Incremental Implementation............................................................................................................. 149
Add New Components ................................................................................................................. 150
Component Duplication................................................................................................................ 152
5-Implementation

90
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.
5-Implementation

91
Unity Pro Generation with SGStudio Workbench
The first step in the implementation of our project automation system with sg is to
generate the Unity application with SGStudio Workbench.
The following diagram presents the SGStudio Workbench 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
5-Implementation

92
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-Implementation

93
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).
5-Implementation

94
PAC 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
5-Implementation

95
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 objects
variables for each element.
5-Implementation

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


5-Implementation

97
3 The ASPECT Control Window appears. In the Properties tab, adjust your objects
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.
5-Implementation

98
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 instances names of this component is only the final
index.
The indexes between the entire instances names have continuity.
The following table shows the instantiation of the Ethernet ATV61 component for the
pumps Lf1PmpDX (three occurrences in the project):
Step Action
1 Select the Ethernet ATV61 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.

5-Implementation

99
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 PAX.

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.

5-Implementation

100
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 components 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 instances 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.

5-Implementation

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

5-Implementation

102
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 motors 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 instances name (Object column), objects name for Vijeo Citect (VC- Control column)
and associated speed drives name (DEWS column) fields, thus change the others properties
individually.

Save and close the file.
5-Implementation

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



5-Implementation

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

5-Implementation

105
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, GsMot1, 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.
1
2
5-Implementation

106
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.
Operator Screen
Most of the components provide at least one operator screen.
From the Controller tab and the O.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.
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.
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.

5-Implementation

107
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 instances 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.
5-Implementation

108
Animation Tables
The following screenshots show the animation tables:


Operator Screens
The following screenshots show the operator screens:


5-Implementation

109
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:
5-Implementation

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

You can see the additional components surrounding the motor: Interlocks, Failures,
Maintenance.
Detected
Failures
Interlocks
Motor
Maintenance
5-Implementation

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

.
5-Implementation

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


5-Implementation

113
Operator Screen
The following screenshot illustrates the ATV61 operator screen:

The following screenshot illustrates SDDEVCTL operator screen:
5-Implementation

114
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:

5-Implementation

115
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.
5-Implementation

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

5-Implementation

117
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:

5-Implementation

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


5-Implementation

119
Vijeo Citect Tags Generation with sg Framework
sg Framework is at the core of the third step in the implementation phase.
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.
5-Implementation

120
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,
5-Implementation

121



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.
5-Implementation

122
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 PAC 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 PAC is displayed as shown:

5-Implementation

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

5-Implementation

124
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 messages 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.
5-Implementation

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


5-Implementation

126
Unity Pro and Vijeo Citect Finalization
Here is the projects 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)
5-Implementation

127
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.
5-Implementation

128
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.
5-Implementation

129
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

5-Implementation

130
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.
5-Implementation

131
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.
5-Implementation

132
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
Minimum
Production Manager
Intermediate
Maintenance
Maximum
Access Level in
sg

Alarms
acknowledgement
1
Changes of the operator
parameters
2
Commands linked to the
sequences
2
Changes of the alarm
thresholds
2
Enable/ Disable
First-level Alarms
3
Change of owner
(Operator/ Program)
4
Changes of the
parameters
5
Enable/ Disable
Second-level Alarms
5
Interlock Bypassing 5
Enable/ Disable
the simulation mode
5
5-Implementation

133
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.
sg proposes two authentication methods:
Standard, which uses your defined method in Vijeo Citect (Citect standard)
Advanced, which uses the OS groups and usersdue to the sgc_include2.ctz
project.
Both methods are listed below for your reference. We recommend to use only one of
the methods.
Standard Method
The following table explains the modus operandi:
Step Action
1 Launch Citect Graphic Builder.
2 Click Tools->Project Editor-> System-> User, 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:
5-Implementation

134

The following screenshot shows the Maintenance profile:


5-Implementation

135
Advanced Method
The sgc_include2.ctz project allows you to authenticate the users in Vijeo Citect
directly from the OS users. Refer to the Vijeo Citect documentation for more details.
The following table focuses on the project modifications:
Step Action
1 From Windows, create 3 groups:

Then create 3 users, one per group:

OS-user1/user 1 is OS_Operator member
OS-user2/user 2 is OS_Manager member
OS-user2/user 2 is OS_Maintenance member
Note: Refer to the Microsoft Windows documentation for more information about profile
creation with Windows..
2 From the Water project in Vijeo Citect, create 3 groups; following the path Tools->Project
Editor-> System-> User. Note that the groups must be the same as those created in
Windows. Create only the groups, and then type the Windows login. Some Cicode functions
attend to the gathering and checking of the name and passwords.
5-Implementation

136
3 Specify @ before the group name. The group name must match with the corresponding name.
The following screenshots show the three OS_users in Vijeo Citect:


5-Implementation

137

4 Add a button that calls a Cicode function, as shown:

The Cicode function enables a popup for this authentication.
Add this template button in all the pages, from the sgc_include2 project. We recommend to
open the template in the project resolution as follows:

5-Implementation

138
Then add 2 buttons to the toolbar (LogIn and LogOut) as shown below:

Right click on the appropriate button. The following screen displays:

Add the call sg function OS_form_login() on the LogIn button.
5 If the OS authentication does not run correctly, you may need to modify the attempt number in
the OSLogin () sg Cicode function. Modify this function in the sgc_user_ci file of the
sgc_include2 project, as follows:


5-Implementation

139
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.
5-Implementation

140
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.
5-Implementation

141
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 DAPUMP_10 Genie (Speed Driven Centrifuge Pump) of the
sgc_pumps 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.

5-Implementation

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






5-Implementation

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






5-Implementation

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



5-Implementation

145
A privilege level is assigned:

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.







5-Implementation

146
The call function PageGetInt() is completed on the Appearance properties tab. This function
reads a 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.

5-Implementation

147
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:

5-Implementation

148
Parameters
To access to the parameters from Vijeo Citect, the sg Genie sgc_parameter_30 of
the sgc_param library is located on the projects GeneralView view.
We utilize the following parameters:
Oxygen remote setpoint (mg/) Min Max [0100]
Level remote setpoint (m) Min Max [020]
Minimum inlet Flow to start Lifting Pump (m
3
/h) Min Max [0100]
Then, define the three corresponding variables in Unity Pro:
OICGs1Ot1_RSP for Oxygen remote setpoint (mg/)
LICLf1LtD1_RSP for Level remote setpoint (m)
MinFlow_Lf1PmpR for Minimum inlet Flow to start Lifting Pump (m
3
/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.
5-Implementation

149
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.
5-Implementation

150
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 PAC, 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 XVM
symbol file that must point to the .XVM file of the new sg project:
STG_WATER_M340_V1_1.
If the file is not already created, export the variables of the new Unity Pro program
before the generation.sg Framework
5-Implementation

151
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.
5-Implementation

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


6-Operation

153
Operation

This chapter contains the following sections:


User Guide....................................................................................................................................... 154
Home............................................................................................................................................ 154
Navigation .................................................................................................................................... 155
General View................................................................................................................................ 156
Alarms .......................................................................................................................................... 158
Trends .......................................................................................................................................... 159

6-Operation

154

User Guide

This chapter provides a methodology for using the application through the SCADA
application developed on Vijeo Citect. It presents the content of the SCADA in terms
of navigation rules, alarms management, and trends performing.
Home
Once the application is launched, the SCADA 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.

6-Operation

155
Navigation
The navigation takes place through a graphic environment. Once the SCADA 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
moduleThe 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:














6-Operation

156
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.
6-Operation

157
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.
6-Operation

158
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 on the SCADA, as below shown:


For more information about their utilization, please refer to sg documentation.
Alarms
The bottom of the home page is dedicated to the Vijeo Citect 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.

6-Operation

159
Trends
The Vijeo Citect standard 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
the data as a .dbf file.
: Click on this icon
to show a panel that enables navigation through
the graphic representation.
: Click on this icon to copy
the current data to the clipboard.
: Click on this icon to set the duration of the
displayed trends.
: Click on this icon to send
the trends to a printer.
: These icons allow
miscellaneous handling of the display: zoom,
auto scale, and restoration of the default scale
parameters.
6-Operation

160

6-Operation

161




Schneider Electric Industries SAS
Head Office
89, bd Franklin Roosvelt
92506 Rueil-Malmaison Cedex
Due to evolution of standards and equipment, characteristics indicated in texts and images
in this document are binding only after confirmation by our departments.
Print:
Version 1 - 10 2008
www.schneider-electric.com
FRANCE
Version 1 07 2009

You might also like