You are on page 1of 194

Quantum PLC

Configuration and Programming


using Unity Pro
Automation Training Manual

4 days

2011

Training Center - Schneider Electric FZE, Dubai, UAE


Quantum PLC Configuration and Programming using Unity Pro - 4 days

Quantum PLC
Configuration and Programming
using Unity Pro
4 days

Your Name:

Company:

Date:

Venue:

Instructor’s
Name:

Schneider Electric FZE, Dubai, UAE


3
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
DISCLAIMER

Schneider Electric FZE makes no representations or warranties with respect to this manual and, to the
maximum extent permitted by law, expressly limits its liability for breach of any warranty that may be
implied to the replacement of this manual with another. Furthermore, Schneider Electric FZE reserves
the right to revise this publication at any time without incurring an obligation to notify any person of the
revision.

Due to continuous product development, the information given in this manual may change without notice.
The information and the intellectual property contained herein is confidential between Schneider Electric
FZE and the client and remains the exclusive property of Schneider Electric FZE.

Schneider Electric FZE does not warrant that the contents of this document are error free. If you find any
mistakes in this manual, please inform us as soon as possible.

LEGAL NOTICE

The contents of this manual are proprietary to Schneider Electric FZE and all rights, including copyright,
are reserved by Schneider Electric FZE. You must not copy any part of the manual in hard or electronic
form or make any adaptation or other commercial use of it without Schneider Electric FZE prior written
consent.

The contents and examples in this manual is for training purpose only. Schneider Electric FZE will not
accept any liability for action taken in reliance on this training manual.

COPYRIGHT

Copyright © Schneider Electric FZE 2010-2012. All rights reserved

Schneider Electric FZE, Dubai, UAE


4
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Course Overview
Abstract
This course is designed for Industrial Automation and Control Systems Engineering and
maintenance personnel, who require a familiarity with Unity Pro, allowing them to apply
and maintain Schneider Electric Quantum Controllers in a variety of Industrial Control
Applications.

Prerequisites
Students attending this course should have a fundamental understanding of Electro-
mechanical control devices, electrical circuits, control logic and Microsoft Windows
98/NT4/2000/XP. All exercises will be performed using Windows XP Professional.
Process and/or Manufacturing Control experience would be beneficial.

Course Objectives
Upon completion of this course, the learner will be able to:
¾ Use Unity Pro software to configure a Schneider Electric Quantum Controller and
associated I/O.
¾ Program, at the basic level, a Schneider Electric Quantum Controller to control an
application using the IEC programming editors FBD, SFC, LD, or ST as found in
Unity Pro Software.
¾ Implement Derived Functions blocks at the basic level.
¾ Demonstrate an understanding of derived data types and their uses in a Unity Pro
program.
¾ Create, Save, Download, Upload, Test, Monitor, Search, and Debug an IEC PLC
Application using Unity Pro Software.
¾ Document and Print a Unity Pro PLC application using Unity Pro software.

Course Length
4 Days

Schneider Electric FZE, Dubai, UAE


5
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

This page is intentionally blank

Schneider Electric FZE, Dubai, UAE


6
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Before you Begin

Make sure you have following items with you before going through this manual

Hardware

1. Two Quantum Backplanes with two power supply modules


2. One Quantum PLC processor ( Ver > 2.0 )
3. At least one Digital Input module, one Digital Output module, One
Analog Input module and One Analog Output module
4. At least one Ethernet Communication Interface
5. One RIO Head module and One RIO drop module
6. RIO Taps, Splitters and Cables
7. Programming Cable ( Serial , USB )
8. Ethernet Cables
9. A Computer with Windows XP OS and minimum 1 GB RAM

Software

1. Unity Pro Ver 4.1


2. Microsoft Excel

Documents

1. This manual

Schneider Electric FZE, Dubai, UAE


7
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Schneider Electric FZE, Dubai, UAE


8
Quantum PLC Configuration and Programming using Unity Pro - 4 days

TABLE OF CONTENTS
1. INTRODUCTION TO AUTOMATION SYSTEMS .................................................................13
2. QUANTUM PLATFORM OVERVIEW ....................................................................................19
QUANTUM CONTROLLER ...................................................................................................................19
I/O ARCHITECTURE ...........................................................................................................................20
CPU FEATURES ................................................................................................................................21
MODULE GENERAL FEATURES .........................................................................................................23
PROCESS CONTROL ..........................................................................................................................25
HOT STANDBY ...................................................................................................................................25
3. UNITY PRO OVERVIEW ..........................................................................................................27
4. EXERCISE - PROJECT SETTINGS .......................................................................................32
5. PLC CONFIGURATION............................................................................................................36
This page is intentionally blank
CONFIGURATION EDITOR ..................................................................................................................36
HARDWARE CONFIGURATION ...........................................................................................................36
REMOTE I/OS AND DISTRIBUTED I/OS ..............................................................................................38
6. EXERCISE : QUANTUM PLC CONFIGURATION...............................................................40
7. VARIABLES ...............................................................................................................................46
8. EXERCISE : VARIABLES........................................................................................................50
9. APPLICATION STRUCTURE..................................................................................................52
OVERVIEW .........................................................................................................................................52
EXECUTION MODE..............................................................................................................................52
TASKS ................................................................................................................................................53
SECTIONS ..........................................................................................................................................53
FUNCTIONAL APPROACH ..................................................................................................................54
PROGRAM PROTECTION ....................................................................................................................54
PROGRAM ANALYSIS ........................................................................................................................55
BUILD APPLICATION ..........................................................................................................................55
10. EXERCISE : CREATE NEW SECTION.............................................................................56
11. FBD LANGUAGE..................................................................................................................57
OVERVIEW .........................................................................................................................................57
FBD EDITOR .....................................................................................................................................57
PROGRAMMING RULES .....................................................................................................................59
EXECUTION SEQUENCE .....................................................................................................................59
12. EXERCISE : FBD LANGUAGE ..........................................................................................61
13. LD LANGUAGE ....................................................................................................................72
OVERVIEW .........................................................................................................................................72
LD EDITOR ........................................................................................................................................72
14. EXERCISE : LD LANGUAGE.............................................................................................74
15. ST LANGUAGE.....................................................................................................................78
16. EXERCISE : ST LANGUAGE .............................................................................................80
17. DERIVED FUNCTION BLOCK ( DFB ) .............................................................................82
OVERVIEW .........................................................................................................................................82
18. EXERCISE : DFB..................................................................................................................84
19. SFC LANGUAGE..................................................................................................................96
OVERVIEW .........................................................................................................................................96

Schneider Electric FZE, Dubai, UAE


9
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
20. EXERCISE : SFC LANGUAGE ........................................................................................ 100
21. IL LANGUAGE .................................................................................................................... 112
OVERVIEW ....................................................................................................................................... 112
22. APPLICATION TESTING .................................................................................................. 114
ANALYZE AND BUILD....................................................................................................................... 114
CONNECTION / DISCONNECTION ..................................................................................................... 114
SIMULATOR ...................................................................................................................................... 115
23. DIAGNOSTICS AND DEBUGGING................................................................................. 116
24. OPERATOR SCREENS..................................................................................................... 121
OVERVIEW ....................................................................................................................................... 121
25. REMOTE I/O CONFIGURATION...................................................................................... 125
26. EXERCISE : REMOTE I/O CONFIGURATION .............................................................. 126
27. UNITY QUANTUM HOT STANDBY ................................................................................ 127
OVERVIEW ....................................................................................................................................... 127
HOT STANDBY ARCHITECTURE....................................................................................................... 127
28. EXERCISE : UNITY QUANTUM HOT STANDBY......................................................... 137
29. I/O SCANNING .................................................................................................................... 138
30. GLOBAL DATA................................................................................................................... 141
31. ELECTIVE 1 : ANALOG PROCESSING ( OPTIONAL ) .............................................. 143
OVERVIEW ....................................................................................................................................... 143
SCALING OF ANALOG I/O................................................................................................................ 144
QUANTUM SPECIAL FUNCTIONS ..................................................................................................... 148
32. ELECTIVE 2 : SECURITY ( OPTIONAL )....................................................................... 152
SECURITY OVERVIEW ...................................................................................................................... 152
PROTECTING PROJECT OBJECTS ................................................................................................... 152
UNITY PRO ACCESS SECURITY....................................................................................................... 157
33. ELECTIVE 3: UNITY ARCHIVE FUNCTIONS (OPTIONAL) ....................................... 170
OVERVIEW ....................................................................................................................................... 170
EXPORTING ...................................................................................................................................... 172
IMPORTING ....................................................................................................................................... 176
34. ELECTIVE 4: DOCUMENT AND PRINT (OPTIONAL)................................................. 179
COMMENTS AND DESCRIPTIONS ..................................................................................................... 179
GENERATING PROJECT PRINTED DOCUMENTATION ...................................................................... 183
35. APPENDIX A – FURTHER TRAINING............................................................................ 188
NEXT STEPS IN TRAINING ............................................................................................................... 188
TRAINING IN THE GULF COUNTRIES ................................................................................................ 188
TRAINING MODULES ........................................................................................................................ 189
36. APPENDIX B – TECHNICAL SUPPORT........................................................................ 192
CUSTOMER CARE CENTER ............................................................................................................. 192

Schneider Electric FZE, Dubai, UAE


10
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Agenda
DAY 1
INTRODUCTION TO AUTOMATION SYSTEMS
QUANTUM PLATFORM OVERVIEW
UNITY PRO OVERVIEW
PROJECT SETTINGS
PLC CONFIGURATION
VARIABLES

DAY 2
APPLICATION STRUCTURE
FBD LANGUAGE
LD LANGUAGE
ST LANGUAGE
DERIVED FUNCTION BLOCK ( DFB )

DAY 3
SFC LANGUAGE
IL LANGUAGE
APPLICATION TESTING
DIAGNOSTICS AND DEBUGGING
OPERATOR SCREENS
REMOTE I/O CONFIGURATION

DAY 4
UNITY QUANTUM HOT STANDBY
I/O SCANNING
GLOBAL DATA
ELECTIVE 1: ANALOG PROCESSING (OPTIONAL)
ELECTIVE 2: SECURITY (OPTIONAL)
ELECTIVE 3: UNITY ARCHIVE FUNCTIONS (OPTIONAL)
ELECTIVE 4: DOCUMENT AND PRINT (OPTIONAL)

Note :

Some of the topics are elective modules and may not be covered in your course if
there are of no interest to the participants in your group. If there is a topic labeled
“Elective” included in the manual that is of particular interest to you, please inform
your Instructor.

Schneider Electric FZE, Dubai, UAE


11
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Schneider Electric FZE, Dubai, UAE


12
Quantum PLC Configuration and Programming using Unity Pro - 4 days

1. Introduction to Automation Systems


Objectives
After completing this lesson, the learner will be able to:
• describe a brief history of PAC systems.
• discuss the different levels of PAC systems.
• discuss the concepts of applying PAC systems to process control.

Lesson Overview
This lesson will provide the learner with an overview of Automation systems and
cover the history, types and evolution of PACs. We will also discuss the basics of
applying PAC systems to a given process and the placement of the Schneider
Processors under the Unity software Platform.

PAC – Definition

A PAC, Programmable Application Controller, is


a solid-state, electronic device that controls the
operation of a machine. It uses Logic functions,
which are programmed into its memory via
programming software.

Almost any “real world” application that needs


electrical control needs a PAC. In fact, whether
you work in machining, packaging, material
handling, automated assembly, or countless
other industries, you are probably already using a PAC.

A Brief History

The PAC was invented in response to the needs of the


American automotive industry. Before the PAC, control,
sequencing, and safety interlock logic for manufacturing
automobiles was accomplished using relays, timers and
dedicated closed-loop controllers. The process for updating
such facilities for the yearly model change-over was very time
consuming and expensive, as the relay systems needed to be
rewired by skilled electricians.

In 1968 GM Hydramatic (the automatic transmission division of


General Motors) issued a request for proposal for an electronic
replacement for hard-wired relay systems. The winning
proposal came from Bedford Associates of Boston,
Massachusetts. The first PAC, designated the 084 because it was Bedford
Associates eighty-fourth project, was the result. Bedford Associates started a new
company dedicated to developing, manufacturing, selling, and servicing this new

Schneider Electric FZE, Dubai, UAE


13
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
product: Modicon, which stood for MOdular DIgital CONtroller. One of the people
who worked on that project was Dick Morley, who is now considered to be the
"father" of the PAC.
The Modicon brand was sold in 1977 to Gould Electronics, and later acquired by
German Company AEG and then by Schneider Electric.

Although relay circuits performed their job well, they could be very expensive to
install and maintain. In fact, the primary reason for designing PACs was eliminating
the large cost of replacing complicated relaybased machine control systems.
Picture a machine control panel that included hundreds or thousands of individual
relays. The size could be mind boggling. How about the complicated initial wiring of
so many individual devices? These relays would be individually wired together to
yield the desired outcome. As you can imagine, such a complicated system brought
with it many problems.

When production requirements changed, the control system had to be updated. If


frequent changes were required, system updates became very expensive. Because
relays are mechanical devices, they also have a limited lifetime, requiring strict
adhesion to maintenance schedules. Troubleshooting was also time
consuming with so many relays involved.

To be a cost- and time-efficient replacement for relays, PACs needed to be easy for
maintenance and plant engineers to program, their lifetime had to be long, and they
had to survive the harsh industrial environment. That's a lot to ask! The answers lay
in using a programming technique— Relay Ladder Logic—based on the relay
technology people were already familiar with, and replacing mechanical parts with
solid-state ones.

Schneider Electric FZE, Dubai, UAE


14
Quantum PLC Configuration and Programming using Unity Pro - 4 days

In the early 1970s, the dominant PAC technologies were sequencer-state machines
and the Bit-slice based Central Processing Unit (CPU). Initially, conventional
microprocessors lacked the power to solve PAC logic quickly in all but the smallest
PACs. However, as conventional microprocessors evolved, larger and larger PACs
were based upon them.

Communications abilities began to appear around 1973. The PAC could now talk to
other PACs and could be far away from the machine it was controlling. Because
PACs could also now be used to send and receive varying voltages, they were able
to enter the Analog world. But despite these advances, lack of standardization
coupled with continually changing technology still made PAC communications a
nightmare of incompatible protocols and physical networks. The 1980s, however,
saw an attempt to standardize communications. PACs also got smaller in size and
became software programmable through symbolic programming on personal
computers (previously, PACs had required dedicated programming terminals or
handheld programmers). Today, the world's smallest PAC is about the size of a
single control relay!

Starting in the 1990s, we have seen a gradual reduction in the introduction of


new protocols and the modernization of the physical layers of some of the more
popular protocols that survived the 1980s.

PACs in the Workplace: – a Simple Example

To see the real-world benefits of using a PAC, let’s look at a batch plant operation
where two ingredients (A and B) are added into a tank in a specified proportion and
properly mixed and conveyed to another area of the process.

Schneider Electric FZE, Dubai, UAE


15
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Two additional input lines are required, one for cleaning solution and one for air. All 4
lines are valve controlled into one common pipe with a flow meter (1 pulse output per
gallon). The other side of the flow meter connects to a Y pipe configuration, where
each leg has a valve. One leg goes to the mixing tank, and the other goes to a runoff
(or wastewater) area. As an example, let’s assume that the goal is to mix 420 gallons
of A with 280 gallons of B and send the mixture to the next process area. As in any
process of this type, there needs to be a safety level float switch in the tank to shut
down the process and sound an alarm if a certain level is exceeded. The sequence
of events to control the process might go something like this:

Operational Sequence
Step Action
1 Open valve for cleanser, other 3 closed, tank inlet valve closed, run-off valve
open
2 Start pump, measure 50 gallons flow of cleanser
3 Turn off cleanser valve, turn on air flow for 5 seconds
4 Open valve for A, open tank inlet valve, close run-off valve
5 Start pump, measure 420 gallons flow of A
6 Turn off valve A, close tank inlet valve, open run-off valve
7 Turn off valve A, close tank inlet valve, open run-off valve
8 Turn off cleanser valve, turn on air flow for 5 seconds
9 Open valve for B, open tank inlet valve, close run-off valve
10 Start pump, measure 280 gallons flow of B
11 Turn off valve B, close tank inlet valve, open run-off valve.
12 Start the tank mixer motor and run for 5 minutes
13 Open cleanser valve, start pump, and measure 50 gallons flow of cleanser.
14 Turn off cleanser valve, turn on air flow for 5 seconds.
15 Once mixing is complete, open valve at tank outlet to allow discharge of
mixture

Schneider Electric FZE, Dubai, UAE


16
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Pretty complicated and time consuming, wouldn’t you say? With a relatively small,
inexpensive PAC, on the other hand, all of this process can be controlled with the
following I/O configuration:

10 digital outputs (one for each of the 7 valves, 1 for the pump motor, 1 for the
mixer motor, and 1 for the alarm)

2 digital inputs (1 as a counter input from the flow meter and 1 as a safety level
float switch in the tank).

15 steps with relays, or two steps with a PAC. Guess why most businesses prefer
to use PACs instead of relay-based systems

Introduction to Process Control

In a system control architecture the Control System element is used to provide the
monitoring, decision making, and physical control of the automated process.
In general, this is achieved using the following:
- Input signals
- Output signals
- Processing electronics
- Communications electronics
- Programming and interfacing software

The control system processing does not extend to the operator interface handled by
the HMI terminal or Computer. It is limited to:
• Reading data from the field inputs, or resulting from communications with
other devices with the aim of providing the current operating status of the
process
• Solving the control logic based on the current operating status of the process
• Writing data to the PAC outputs as a result of solving the control logic, with
the aim of controlling the process via the actuators of the system.

Programming Software

The Unity Pro software is installed on your PC and uses the Windows user
interface.

You use it to create your Control application.

Schneider Electric FZE, Dubai, UAE


17
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
The software also manages the standard functions a PAC application offers, such
as Input and output management, as well as data storage, recipes and other
items.

Also, variables (or tags) are created for communication with the Control System
via communications networks or buses. Once the configuration is complete, the
project is down-loaded to the Controller and the system is ready to use.

Links between the control and the process


There is the interface level:

- This is where the PAC application developed using an HMI tool can be used to
monitor and control the process, based on a set of views.
- There is communication with the control level. This is done via the terminal’s
communication interfaces, such as COM ports or Ethernet links, and standard
networking devices, such as cables, hubs or switches.
There is the monitoring and control level, which applies to:
- Process control devices, such as PACs with their I/O, expert modules like counter
or axis control modules or their communication modules for networks or buses, such
as Modbus, CANopen or AS-i.
- Electrical power equipment, such as motor starters or drives.
There is the process level with:
- Sensors and actuators that have a direct effect on process devices, such as
pressure or temperature sensors, motors and limit switches.
- Process devices, such as conveyors, tanks or hoppers, valves and, of course, all
the piping required to connect these various devices.

Schneider Electric FZE, Dubai, UAE


18
Quantum PLC Configuration and Programming using Unity Pro - 4 days

2. Quantum Platform Overview

Range of PAC Systems from Schneider Electric

Quantum Controller

‰ The new Quantum PLCs are managed by Pentium processors along with a
Phoenix co-processor

‰ Quantum stations are distributed over several


racks connected to Remote or Distributed I/O

‰ A Quantum station is made up of modules in any


order
‰ Power supply
‰ Processor module (single / double wide)
‰ Remote I/O Head module
‰ Discrete I/O, analog I/O, communication
and expert modules

‰ Backplanes sizes available : 2, 3, 4, 6,10 or 16 Slots

Schneider Electric FZE, Dubai, UAE


19
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

I/O Architecture
Quantum Supports 3 Flexible Architectures
¾ Local I/O and its Expansion
¾ Remote I/O
¾ Distributed I/O

Local I/O
In the Quantum Automation Series System, Local I/O rack can be expanded to
add one more Local rack thereby supporting upto 32 Local slots. Expansion
requires a backplane expander module and Separate power supply modules on
both racks.

‰ Note: You may not place Intelligent or Option modules in the secondary
backplane.

Remote I/O (RIO)

C RIO
P DI DI D
P HEA
O
D

Local

RIO RIO
P DI D AI A P DI D AI A
DRO DRO
O O O O
P P

Drop Drop

Up to 31 Remote

For applications requiring large I/O drops remotely mounted, or highest


performance, or connectivity to existing Modicon remote I/O installations,
Quantum provides a Modicon S908 protocol module remote I/O architecture
solution. A drop is a site which consists of up to two (2) backplanes, power supply
module(s), a remote I/O interface, and I/O modules. Remote I/O is a coaxial
cabling scheme providing long distance, up to 15,000 ft. for up to 31 remote
drops. The network operates at 1,544 megabits per second for high I/O data
throughput.

Remote I/O network is most preferred network for connecting I/O modules
remotely.
Distributed I/O (DIO)

Schneider Electric FZE, Dubai, UAE


20
Quantum PLC Configuration and Programming using Unity Pro - 4 days

C MB+ DI D AI
P
P NO O

DIO DIO DIO DIO


DI D DI D AI DI D DI D AI
DRO DRO DRO DRO
O O O O
P P P P

Up to 31 Drops (63 w/ Repeater)

Up to 31 Drops (63 w/ Repeater)

For applications requiring small drops distributed over many locations, the
Quantum system provides Distributed I/O (DIO) which cost effectively locates I/O
closer to the process reducing the cost of wiring sensors and actuators to I/O
modules.

Quantum’s DIO architecture uses the same I/O modules as the Local and
Remote I/O architecture to reduce the cost of spares inventory yet distributes
them over low cost, twisted pair cabling to reduce installation costs.

The Distributed I/O architecture, based on Modbus Plus technology, can support
up to 63 drops per network over 6000 feet.

The system is capable of supporting up to three (3) DIO networks through the use
of Network adapter modules. See the following page.

Note: Distributed I/O drops may only contain one (1) backplane.

Comparison of I/O Architecture

CPU Features

Range of PLCs

Schneider Electric FZE, Dubai, UAE


21
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Purchase only the memory


capacity you require

Applications easily
upgraded for expansion

311 10 434 12A 534 14A 651 50 651 60 671 60

¾ Possibility to extend the "program" memory using a PCMCIA card on high


performance CPUs

¾ Huge memory limits : 7.1 Mb of program, 768 Kb of data and up to 8 Mb for file
storage (recipes and production data)

Main Characteristics

Standard CPUs
Upwards compatibility
‰ Unity firmware can be
downloaded into 431 14A and 534
14A processors
‰ Conversion of Concept
applications

More power through


‰ Increased program capacities
‰ Increased data memory
‰ Increased performance while
keeping the same hardware

New entry level Unity Quantum IEC


‰ Boosted performance from the
"low-end"

High performance CPUs


‰ An exceptional processing power
‰ 4 to 5 times faster than the 534 14A CPU

Schneider Electric FZE, Dubai, UAE


22
Quantum PLC Configuration and Programming using Unity Pro - 4 days

‰ Flexible memory for increased


program and data capacity
‰ A multitasking Operating
System
‰ An USB port for transfer at 12 Mbauds
‰ A built-in Ethernet TCP/IP port and a
web server
‰ A hot-standby CPU (671 60) with a
dedicated Ethernet fiber optic link

Module General Features

‰ Any module in any slot


‰ No slot dependencies – slot free
architecture
‰ Software addressing
‰ Electronic module ID
‰ Configuration and module must match
‰ Optional keying of field wiring terminal strip
and I/O modules to ensure correct pairing

Hot Swapping
All modules can be removed and inserted under power.

‰ Power supply modules


‰ Processors
‰ I/O modules
‰ Expert modules

Power Supply Modules


‰ 3 types of Power supply modules
‰ 3A standalone power supply modules
9 Cost effective modules for small racks
9 24 VDC or 125 VDC or 115/230 VAC

‰ 8 A and 11 A summable power supply modules


9 For large racks
9 Up to 20 A with two 11 A power supply modules
9 24 VDC (8 A) or 48/60 VDC (8 A) or 115/230 VAC (11 A)

‰ 8 A and 11 A redundant power supply modules


9 For reliability critical applications
9 24 VDC (8 A) or 48/60 VDC (8 A) or 125 VDC (8 A) or 115/230 VAC
(8 A and 11 A)

Processors

Schneider Electric FZE, Dubai, UAE


23
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

‰ High performance processors


‰ Double format (2 slots)
‰ Door to access the key switch and battery
‰ LCD display / keypad
‰ Communication ports
‰ Ethernet 10/100 Mbauds for hot-standby
‰ 12 Mbauds USB programming port for faster upload / download of
applications
‰ Modbus plus
‰ RS232 / 485 serial port
‰ 2 PCMCIA slots
‰ For memory extension card (type II)
‰ For communication card of file storage (type III)

Wiring devices
‰ CableFast and Telefast make wiring easy
‰ To interface field devices to Quantum PLCs
‰ 10 customized terminal blocks
9 Support discrete and analog I/O
9 Optional individual fusing
9 Robust 50-pin subD connector
9 Termination point provided for each wire
9 Pre-configured for field power
distribution
‰ 2 system cables (for discrete and analog I/O)
9 Standard power cable for intensity < 0.5
A
9 High power cable for 2 A per point
9 Lengths from 3 to 12 feet (0.9 to 3.7 m)
9 Color coded wiring at XTS connector

Discrete I/O modules


‰ Discrete I/O
‰ Solid state and relay (2 A and 5 A) outputs
‰ 24, 48, 115 and 230 VAC modules
‰ 5, 24, 10-60 and 125 VDC modules
‰ 12, 16, 24, 32 and high-density 96-channel modules (with HE10 connector)

Analog I/O Modules


‰ Wide selection of 12 different analog I/O modules
‰ Input modules
9 8 or 16 input channels / Current or multi-range version
9 8 input channels / Thermocouple and RTD
9 Type configurable by channel
9 Resolution : 12 to 16 bits
9 Insulation : 30 V and 200 V

‰ Output modules
9 4 or 8 output channels / Current
9 4 output channels / Voltage or multi-range
9 Resolution : 12 bits
Expert Modules
‰ Enhance overall system performance by reducing the processor workload

‰ High speed counters


9 2-channel 500 kHz module for incremental and quadrature
applications

Schneider Electric FZE, Dubai, UAE


24
Quantum PLC Configuration and Programming using Unity Pro - 4 days

9 5-channel module for incremental applications : 35 kHz at 24 VDC /


100 kHz at 5 VDC

‰ 2-channel ASCII RS-232 module

‰ 24 VDC 16-point interrupt / latch module Motion control modules


9 Single axis (dual resolver or resolver / encoder)
9 Multi-axis SERCOS module

‰ Time stmaping modules

9 32 input points from 24 to


125 V
9 Input format : DCF077 or
GPS
9 Time event resolution : 1
ms

Process Control
Quantum PLC is know as a Process PLC as it support many functions required to function a
Process Industry

‰ Several Process control libraries


‰ PID loop control (PI, PID with filter, Cascade, external integral, ...)
‰ Process calculation (mass flow converter, square with dead band, ...)

‰ Possibility to create your own library (C toolkit)

‰ PID Autotune
‰ Easy commissioning
‰ Easy to implement in an application

Hot Standby
Hot Standby or Redundancy feature of Quantum PLC makes it a most
available PLC which can be used in any critical process industry

‰ Fiber optic link between 2 PLCs

‰ Maximum distance : 2 km
‰ Ethernet 100 Mbit/s link
‰ The whole data are exchanged without any user configuration
‰ One scan is sufficient to exchange the whole context
‰ Hot-standby processor : 140 CPU 671 60
‰ Embedded fiber optic port (Ethernet 100 Mbit/s)

Schneider Electric FZE, Dubai, UAE


25
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
‰ No need of specific module and specific software
‰ Use of existing remote I/O drops (single or dual cable) or an Ethernet
architecture

Schneider Electric FZE, Dubai, UAE


26
Quantum PLC Configuration and Programming using Unity Pro - 4 days

3. Unity Pro Overview

What is Unity Pro?

‰ Unity Pro is a all in one software for all platforms


‰ Quantum, Premium, Atrium and Modicon M340

‰ The Scalability of the software is based on the supported


platforms and not on features
‰ Unity Pro Small supports only Modicon M340 PLCs

‰ Unity Pro for all the life cycle of your project

Design Debug Operation Maintenance

Selection Guide

Unity Pro S M L XL XLS


Modicon M340

57-00 57-10 57-20 57-30 57-40 57-50

57-20 57-30

31110 43412 53414 65150 65160 67160 65160S 67160S

‰ Single and multi-seats


‰ Upgrades
‰ Ease to make transition path from legacy software (PL7, Concept, ProWorx)
for customers with active subscription only
‰ Education and Schneider Alliance special offer

Schneider Electric FZE, Dubai, UAE


27
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Up to 3 ……….10 ………...100

Singl Grou Tea Facilit


Unity Pro X Large 9 9 9 9
Unity Pro Large 9 9 9 9
Unity Pro Medium 9 9 9 9
Unity Pro Small 9 9 9

Presentation
‰ The right tool for all phases of your project

‰ Design : structured variables, libraries of


FFBs and 5 IEC languages to develop your
application program

‰ Debug : a PLC simulator and high level of


debug services to test and debug your
program

‰ Operation : operator screens and diagnostic


viewer to monitor and control your process

‰ Maintenance : on-line modifications to update


your application program

‰ Openness : use of XML format

Design your Program


‰ Unity Pro is a full featured software package

‰ All platforms benefit of the whole richness of the features


‰ 5 IEC languages – LD, FBD, SFC, ST and IL
‰ Standardization capabilities
9 Through data : unlocated variables, structures and arrays
9 Through program : sections of program, user function blocks,
functional modules
‰ Multitasking capabilities
9 MAST, FAST and AUX tasks
9 Event triggered treatments
‰ Functional view to map your application to the process

‰ With the possibility to bring more value through the openness


‰ Interface to any client application through XML format

Debug your Application


‰ Embedded PLC simulator
‰ No hardware constraints to debug your program
‰ Provide the same execution capabilities as a PLC
‰ Possibility to use function blocks of IO management library to
simulate %I, %IW, %ID and %IF inputs (WRITE_INPUT_EBOOL,
WRITE_INPUT_INT, …)
Schneider Electric FZE, Dubai, UAE
28
Quantum PLC Configuration and Programming using Unity Pro - 4 days

‰ An large set of debug services


‰ Power flow animation for graphical languages
‰ Breakpoint and step by step to test and debug the program
‰ Watch point to know the real time value of a variable
‰ SFC monitoring of step activity times
‰ Color used during execution progress (boolean variables, steps, transitions,
…)
Operate and Maintain your Application
‰ Visualize and control the application with operator screens
‰ Graphical and animated view of your process

‰ PLC and module diagnostic through configuration editor

‰ Integrated system and application diagnostic accessible through the built-in


diagnostic viewer
‰ No programming required
‰ Display defaults saved in the PLC with source time stamping
‰ Fault cause analysis to find origin of process default
‰ Possibility to acknowledge

‰ Upward compatibility of the PLC applications


‰ Last version of Unity Pro supports the installed base design with the previous
versions

Openness
‰ Create links between the project and external documents
‰ Import / Export all or part of application in XML format
‰ Re-use the knowledge base developed with legacy software

Don’t Reinvent the wheel each Time


‰ Design and combined your standards to develop your application in short time
‰ Manage and share your standards
‰ Describe the process through functional approach
‰ Debug and adjust your application directly on your PC to reduce commissioning time
‰ Use embedded diagnostic to reduce downtime
‰ Manage all process data in the PLC

Combine your standards


‰ Arrange PLC data according to the process
‰ Data structures and multi-dimensional arrays
‰ Unlocated variables to create standard
databases without memory mapping
‰ Reusability simple through standards in
libraries and import / export features

‰ Move to a component approach in design with Derived


function blocks (DFB)
‰ Create standards of your often used logic
‰ Combine these standards to design more
complex logic (nested DFB)
‰ Protect your know-how

Schneider Electric FZE, Dubai, UAE


29
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Share your Standards


‰ Organize your standards in user libraries and families
‰ Library manager is the repository of your
standards

‰ Share your standards to developpers


‰ Standards are accessible to all programmers
‰ Be sure that your
application contains the
right version
9 Comparison of
project to the
library
9 Versioning to
trace
modifications

‰ Make modifications only to the


model (type)
‰ All instances are
automatically updated

Think Process and not PLC


‰ Break down your application into functional modules
close to the process

‰ Use modular functional modules to describe a


complex machine
‰ Tree description with nested modular
modules
‰ Easy to find the right information through the
functional description of your application

‰ Reduce design time to create custom machines by


combination of existing functional modules
‰ Create standardized functional modules
‰ Export / import modules
‰ Wizard to manage variables when reusing a module

Debug and Adjust the Application on your PC


‰ Debug your program without hardware
‰ Simulate the PLC on your PC
‰ All debug tools are available

‰ Use embedded services to reduce commissioning


time
‰ Graphical operator screens to display the
behavior of the machine or process
‰ Quick access to additional documents
about application through hyperlinks
(documentation, wiring diagrams, …)

Reduce Downtime during Operation


‰ Use embedded diagnostic without programming

Schneider Electric FZE, Dubai, UAE


30
Quantum PLC Configuration and Programming using Unity Pro - 4 days

‰ Hardware and program diagnostic are easy through clear messages


‰ Choice of language for system messages
‰ Time stamping and navigation to the root cause

‰ Access to advanced diagnostic through function blocks


‰ To monitor a movement or any execution of the process
‰ Fault cause analysis

‰ Diagnostic through Web pages accessible via Ethernet port

Store Data in the PLC


‰ Some memory cards can save data files accessible from the
PLC application through function blocks
‰ Create / delete files
‰ Get / modify file attributes
‰ Read / write data

‰ Use Ethernet / FTP to upload / download files


‰ Memory card is managed as FTP server
‰ Use Unity Loader or a standard tool (Internet
Explorer FTP Client) to exchange with the memory
card

Schneider Electric FZE, Dubai, UAE


31
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

4. EXERCISE - Project Settings


Objective After the completion of this lab, the learner will be able to:

• Set the Parameters of a Project

Before you Read each section of the Lab Exercise carefully before responding to
begin the instructions.

Step Action
1 If it is not already running, start Unity Pro.

2 Create a new Project with a :


ƒ 140 CPU 43412A/U Processor
and save under the name Training in the folder C:\Schneider_application.

3 Access the parameters of the project and validate the diagnostic system and
application.

4 Define 11 columns for the Ladder Diagram Sections without Right-justify


coil.

5 For the SFC section, allow the multiple token and uncheck the option Allow
multiple evolutions by divergence of sequence selection.

6 Utilize the Navigator application to navigate within the project and access all of
the Editors.

Suggested Solutions: Project Settings


Turn on Unity Launch Unity Pro by accessing Run / Programs / Schneider Electric / Unity Pro
Pro / Unity Pro XL

Schneider Electric FZE, Dubai, UAE


32
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Create a new Select the command File/New


project Training
with Premium
CPU

Select the 140 CPU 434 12A/U Processor and Click OK.

Save the project by selecting File/Save as


Create a Folder: C:\Schneider_application
Type in the name Training then Save

Schneider Electric FZE, Dubai, UAE


33
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
Modify the Access the Project Parameters under Tools/Project settings
Project
Parameters Select System and Application Diagnostics

Define the number of Ladder Logic columns

Schneider Electric FZE, Dubai, UAE


34
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Allow the multiple token under SFC

Navigate within
the Project and
the different
Editors

Schneider Electric FZE, Dubai, UAE


35
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

5. PLC Configuration

Configuration Editor

‰ Accessible from Structural view to :


‰ Configure the racks of the local bus
‰ Address 0 for Premium PLCs
‰ Address 1 for Quantum PLCs

‰ Configure the remote racks


‰ Configure the distributed I/O (Quantum)
‰ Configure the field bus (Fipio / CANopen)
‰ Link communication hardware to logical network
(Ethernet / Modbus + / Fipway)

Hardware Configuration

Processor
replacement
„ Only same family is proposed
„ Replacement is possible only in offline mode
„ Quantum processor can be placed anywhere in the rack

Schneider Electric FZE, Dubai, UAE


36
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Rack configuration
1. Choose the rack
2. Define the power supply (first
position on Premium and first / last
position suggested on Quantum)
3. Replace the processor (if
necessary)
4. Define the modules (add a device or
drag & drop from hardware catalog)

Processor Configuration
1. Select the operating mode
2. Define the memory cards
3. Define the global objects of the application (number of bits and words)

Module Configuration
1. Configure the parameters of each channel (function, task, IODDT, …)
2. Adjust the channels of expert module

Schneider Electric FZE, Dubai, UAE


37
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
3. Define addresses used by Quantum module : mapping (bit or word) and first address

Configure a network
1 – Create a logical
network
„ Add a new
network (right
click)
„ Choose the type
of network
„ Change name if
necessary
2 – Configure the logical
network
„ Open the logical
network
„ Configure the parameters (IP address, global data, …)
3 – Define the communication module (drag & drop from hardware catalog) or the PCMCIA
card (double click on card
position and add submodule)
4 – Associate the logical
network to the module or card
„ Open the
communication module
„ Select the channel
„ Choose the function
„ Link the logical network
to the channel

Remote I/Os and Distributed I/Os

Schneider Electric FZE, Dubai, UAE


38
Quantum PLC Configuration and Programming using Unity Pro - 4 days

„ Remote I/Os (RIO) - Decentralized input /


output architecture solution, Up to 31
decentralized stations
„ Distributed I/Os (DIO) - Distributed input /
output solution based on Modbus+ technology,
32 subscribers may be configured over 500
meters

Schneider Electric FZE, Dubai, UAE


39
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

6. EXERCISE : Quantum PLC Configuration


Objective After the completion of this lab, the learner will be able to :
• Configure the PLC (Local Rack, …)
• Configure the network
Before you Read each section of the Lab exercice carefully before responding to the
begin instructions

Exercice 1 Configuration of the local rack with a Quantum PLC

Step Action
1 Access the configuration of the local rack
2 Configure all modules as per the hardware available
3 Access the discrete input module and configure it with the following
parameters :
• Task should be MAST
• Validate the configuration of the module
4 Access the discrete output module and configure it with the following
parameters :
• Task should be MAST
• Timeout State should be “Hold Last Value”
• Validate the configuration of the module
5 Access the analog input module and configure it with the following
parameters :
• Task should e MAST
• Data Format is Voltmeter ( Scale -10,000 to +10,000)
• Range should be 0v TO +5V for channel 1
• Range should be 4mA TO 20mA for channel 2
• Validate the configuration of the module
6 Access the analog output module and configure it with the following
parameters :
• Task should e MAST
• Channel1 Timeout State : Hold Last Value
• Channel2 Timeout State: 100
• Validate the configuration of the module
7 Double click on the processor module and configure it with the following
parameters :
• %MWi reset on cold start
• 512 %M
• 2048 %MW
• Validate the configuration of the module

Schneider Electric FZE, Dubai, UAE


40
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Exercice 2 Configuration of the network

Step Action
1 Create an Ethernet logical network with the default name Ethernet_1
2 Configure the logical network :
• IP address : your station IP address
• Subnetwork mask : corresponding to your station IP address
• Gateway address (optional)
3 Configure the Ethernet port of your processor :
• Ethernet TCP/IP
4 Associate the logical network to the NOE port

Schneider Electric FZE, Dubai, UAE


41
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Suggested Solution : Quantum PLC Configuration

Access the In the application browser, double click on 1 : 140 XBP 016 00 to access the
configurati configuration of the local rack
on editor

Configure Double click the Rack 1 and change the rack to 10 slot
the local
rack

• Configure the Rack as per your work bench

Configure Double click on module in slot 2. Define the parameters:


the discrete
Input • MAST Task
module • Input Starting Address
• Validate the configuration with Edit/Validate

Schneider Electric FZE, Dubai, UAE


42
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Configure Double click on module in slot 3. Define the parameters


the discrete
Output • MAST Task
module • Timeout State : Hold Last Value
• Validate the configuration with Edit/Validate

Configure Double click on Analog Input module. Define the parameters


analog
Input • MAST Task
module • Data Format : Voltmeter (Scale : -10,000 to +10,000)
• Channel1 : 0v TO +5V
• Channel2 : +4mA TO +20mA
• Validate the configuration with Edit/Validate

Configure Double click on module in slot 5. Define the parameters


analog
Output • MAST Task
module • Channel1 : HOLD LAST VALUE
• Channel2 : USER DEFINED , TIMEOUT VALUE : 100
• Validate the configuration with Edit/Validate

Schneider Electric FZE, Dubai, UAE


43
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
Configure Double click on processor module in slot 0. Define the parameters :
the • Operating mode On Cold Start : %MWi Reset
processor • State RAM fields : 512 %M, 2048 %MW
• Validate the configuration with Edit/Validate

Create an Go to the Project Browser, right click on Communication/Networks then select New
Ethernet
logical
network

Network

In Network tab :
• Select Ethernet network
• Accept the given name Ethernet_1
• Validate with OK

You have just created an Ethenet network

Schneider Electric FZE, Dubai, UAE


44
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Configure Double click on Ethernet_1 logical network to access to the configuration. Define the
the parameters :
Ethernet
network • IP address : 192.168.1.x (station IP address)
• Subnetwork mask : 255.255.255.0
• Gateway address : 0.0.0.0
• Validate with Edit/Validate

Configure Double click on Ethernet Port in NOE Module to access to the configuration
the
Ethernet
port

Choose Ethernet_1 as the Link and Edit > Confirm

Schneider Electric FZE, Dubai, UAE


45
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

7. Variables

Overview
‰ Max 32 characters
‰ Located & Unlocated
‰ Located Variables
‰ Has an Address Specified
‰ Required to communicate outside PLC ( eg, SCADA )
‰ Unlocated Variables
‰ No address specified
‰ Easy to Create, Faster to execute

‰ A Data Type is must for any variable


‰ Unity Pro software provides Elementary Data Types (BOOL,, INT, WORD, REAL,
String, …) or Derived Data Types (Array, Structure)
‰ Each Variable has to be declared with the Variable Data Editor before using it
‰ Either independently by double clicking in the Variables & FB Instances area
of the Structural View tree

‰ Or during programming with a double-click on an input / output assignment


‰ Each Variable has to be declared with the Variable Data Editor before using it
‰ Either independently by double clicking in the Variables & FB Instances area
of the Structural View tree

‰ Or during programming with a double-click on an input / output assignment

‰ A data type must be assigned to each Variable

‰ Unity Pro software provides elementary and derived data types

Common Data Types and Ranges


‰ BOOL/EBOOL : Boolean variable must be FALSE (0) or TRUE (1). EBOOL manage
also forcing and edge detection

‰ WORD represents a “bit string 16”, meaning the length of data is 16 bits

‰ INT represents an integer value. The range of values are


-32768 through 32767

‰ UINT represents an unsigned integer value. The range of values are 0 through 65535

‰ REAL represents a floating point value. The range of values are -3.40e+38 to
3.40e+38

Entering Literal Values


‰ Literal values are used to assign values to pins or to assign constants to variables,
and are not meant to be changed by the program

‰ You can enter literal values as


‰ Base 2 (binary) 2#1111111111111111
‰ Base 8 (octal) 8#177777
‰ Base 10 (decimal) 65535 (no 10# needed)
‰ Base 16 ( hexadecimal) 16#FFFF

Schneider Electric FZE, Dubai, UAE


46
Quantum PLC Configuration and Programming using Unity Pro - 4 days

All of the above values are equal and were just entered differently

Data Editor

Data editor is used to


‰ Create variables and its data types
‰ Create DDT ( Derived Data Types )
‰ Create Function Block Intstances
‰ Create DFB ( Derived Function Blocks)

Unlocated
Variables

Located
Variables

Types in 32 bits (DINT, DWORD, REAL) are always mapped on an even address
(i.e. %MW102)

REAL type is mapped on a %MW or %KW address (not on %MD, %MF, %KD or %KF
address)

Derived Data Type (DDT)

DDT is a user defined Data Type which can comprise of different other Data Types and/or
Arrays. By creating DDTs the program can be made simple and engineering time can be
saved.

Following snapshot shows a DDT named ‘Motor’ which consists of 4 BOOL data types ( Start,
Stop, Cmd, Error) and an INT data type (Speed)

Schneider Electric FZE, Dubai, UAE


47
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Derived Function Blocks (DFB)


DFB is a user created encapsulated block to achieve a specific programming task. It can have
maximum of 32 inputs ( any Data Type) and 32 outputs ( any Data Type ) and unlimited
sections inside which contains the logic written in LD,FBD,ST or IL. By way of using DFBs,
your main program become more structured, easily readable, powerful

DFB structure (inputs, outputs,


public variables, …)

One or several sections of


program

Editing a Variable through


Program Editor
Smart analyzer check availability of
variable name
Popup (window) to create variable if it
doesn’t exist
Display or modify variable attributes
inside the editors

Schneider Electric FZE, Dubai, UAE


48
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Assign Variables to I/Os of a Module


1 – Select the module in the Configuration Editor
2 – Choose module reference and open I/O objects tab
3 – Select type of objects to display (ie %Q) then click on 1
Update grid button
4 – Select the list of objects to assign
5 – Enter the prefix of the name then create the variables
6 – A variable is assigned to each selected I/O object
(out_0 to out_15) 2

Variables Export and Import

Variables can be exported in text file format


or XML ( XSY ) format with associated
types for reusing in new program.

During import of the variables, use a wizard


to modify the variables. Change the naming
and the mapping addresses of variables

Schneider Electric FZE, Dubai, UAE


49
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

8. EXERCISE : Variables

In this exercise, we will look at the steps required to create variables for later use
in our Logic.
Step Action
s
1 To create variables we use the Data Editor tool. This is opened from the
browser opening the Variables & FB Instances folder and double clicking
on the Elementary Variables item as shown.

This will open the Data Editor tool with the Variables tab pre-selected.
This is shown below.

2 At this point we are only interested in the Variables tab. The other functions
of the Data Editor will be explained as we use them. To create a new
variable using the data editor, proceed as follows:
3 Click in an empty Name field, and type in the new instance name.
4 Click in the Type field and enter the data type name. You can also select
the type from a pull down list or browse for it by clicking on the browse button
that appears in this field while it is selected.

Schneider Electric FZE, Dubai, UAE


50
Quantum PLC Configuration and Programming using Unity Pro - 4 days

5 If required, click in the Address field and type in the appropriate address for
the instance. If this field is left blank, then the variable is an unlocated
variable.
6 If this variable requires an intialisation value to be loaded at start time, enter
that data in the Value field.
7 Should the Symbol name not be descriptive enough, enter a comment in the
Comment field. An example is shown below.

8 Create the variables shown in the figure below.

Schneider Electric FZE, Dubai, UAE


51
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

9. Application Structure

Overview
‰ Application management
‰ Single station but multi-instance software
‰ Complete application saved in a single file (*.stu)
‰ Software structure
‰ Tasks (single or multi task)
‰ Sections and subroutines
‰ Functional modules

‰ Import / Export of program source


‰ Partial or total (one or several sections, entire application)

‰ Protection
‰ Partial or total (one or several sections, entire application)

‰ Program analysis

Application Structuration
‰ In different tasks
‰ Single task (only MAST) or
multitask (MAST, FAST and
AUX )
‰ Event tasks : IO event (EVT)
and TIMER event

‰ In execution mode
‰ Cyclic execution (only for
MAST task)
‰ Periodic execution

‰ In sections
‰ Tasks are structured in
sections of program

‰ In subroutines (SR)
‰ MAST, FAST and AUX tasks
can contain subroutines which are called by a section or another subroutine

Execution mode

Schneider Electric FZE, Dubai, UAE


52
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Tasks
MAST : Contains sections and subroutines, Programmed in
LD, FBD, IL, ST or SFC, Cyclic or periodic execution (0 to 255
ms), Controlled by watch dog and system bits & words

FAST : Contains sections and subroutines, Programmed in LD,


FBD, IL or ST, Periodic execution (1 to 255 ms), Controlled by
watch dog and system bits & words

AUX : Up to 4 auxiliary tasks (AUX0 to AUX3) on Premium


and Quantum PLCs, Contains sections and subroutines, Programmed in LD, FBD, IL or ST,
Periodic execution (10 to 2.55 s), Controlled by watch dog and system bits & words

EVT and TIMER: To reduce response time of application program, Single section
programmed in LD, FBD, IL or ST, EVTi : events come from I/O modules, TIMERi : events
come from event timers

Priority and Execution

Sections

Unlimited number of sections


Attributes of each section
Name : 32 characters maximum
Language : LD, FBD, IL, ST or SFC
Associated task : MAST, FAST, AUX, Event
Condition (optional) : validation bit for execution
Localization : functional module containing the section
Protection : No, write or read/write
Comment : 256 characters maximum
Order of execution
Order in which the sections appear in the structural
view of the browser

Add New Section

1. Right-click => New section


2. Localize the section –
Association with functional
object
3. Condition execution – BOOL
variable to execute this section

Schneider Electric FZE, Dubai, UAE


53
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
4. Enter the section name
5. Protect the section – None, Read only, No read & write
6. Select the language – LD, FBD, SFC, ST, IL

Subroutines
Unlimited number of subroutines
Attributes of each subroutine
Name : 32 characters maximum
Language : LD, FBD, IL, ST
Associated task : MAST, FAST, AUX
Call is carried out from a section or another
subroutine Number of nesting is limited to 8. A
subroutine should not call itself (not recursive)
Subroutine is linked to a task. It cannot be called
from sections or subroutines of the other task

Functional Approach

‰ To structure your project in direct relation to


the organization of the process
‰ Tree structure of functional modules
‰ Multitask management to simplify the
programming environment

‰ To create a modular application

‰ To facilitate the reuse of program


‰ Import / export of functional modules
with reassignment of variables

‰ To translate directly the functional analysis


‰ Reusable and nested modules
‰ Built with sections
‰ Basic component of a PLC program
‰ LD, IL, ST, FBD or SFC with macro-steps
‰ Uses function libraries of instructions, EFBs, DFBs
‰ User function block «encapsulated program »
‰ I/O interface can be parametered
‰ Uses public or private unlocated variables
‰ Code created in LD, ST, IL, FBD
‰ Basic and standard instructions

Program Protection
The project protection function is accessible from the Properties screen of the project in offline
mode.
This function is used to protect the program sections.

Note: The section protection is not active as long as the protection has not been activated in
the station.

Note: The project protection is effective to the marked sections only. This does not prevent
from:
¾ Connecting to the PLC
¾ Uploading application from the CPU
¾ Changing the configuration
¾ Adding new sections
¾ Changing the logic in a new (not protected) section
Schneider Electric FZE, Dubai, UAE
54
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Activation of protection and creation of the password


The following table shows the procedure for activating the protection of sections and creating
the password:
Step Action
1 In the project browser select the Station directory.
2 Select the Properties command from the popup menu.
3 Select the Protection tab.
4 Activate the protection by checking the Active protection box.
5 Enter a password in the Input field.
6 Enter the confirmation of the password in the Confirmation field.
7 Click OK to confirm your choice.

Notes
If a section is configured with a protection (read or read/write), when protection has been
activated this will be indicated by a locked padlock at the section level.
If the section is configured with a protection but the protection is disabled, an open padlock is
displayed at the section level.

Program Analysis
‰ Allows to detect the errors generated for each application modification
‰ The errors detected during the analysis phase generate automatically a warning or an
error message in the output window
‰ The color of the messages is blue for the warnings and red for the errors
‰ Double click on a message to directly access the corresponding part of program and
correct it
Build/ Rebuild
Analyse

Output window

Build Application
‰ Allows to generate a « compile » project needs for the PLC running
‰ Rebuild all project creates a file of your complete project that can be downloaded to
the PLC or the simulator
‰ Build project takes into account the changes made to an existing project
‰ A build is always preceded by an analyze of the project and is not done in case of
errors (displayed in red color)

Schneider Electric FZE, Dubai, UAE


55
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

10. EXERCISE : Create New Section


In the following exercise, we are going to create three new Sections in the master
task in our Unity Class Lab project. Proceed as follows:

Steps Action
1
Right-Click on the Sections directory of the MAST task.
2
Select New Section in the context menu. The Section Properties dialog will
then display.
3
Enter the Section Name as Motor_Control.
4
Set the Language to FBD.
5
Enter a comment in the Comment field if desired.
6
Click on Apply.
7
Change the Name to ABC_Tool_Control, and the Language to LD.
8
Click on Apply.
9
Change the Name to ST_Section, and the Language to ST
10
Click on OK.
11
You should now have 3 Sections shown in the project browser under the
MAST task.

Schneider Electric FZE, Dubai, UAE


56
Quantum PLC Configuration and Programming using Unity Pro - 4 days

11. FBD Language

Overview
‰ Function Block Diagram (FBD) is a graphical language that is data flow oriented

‰ Complies with IEC 61131-3 standard

‰ Particularly suitable for continuous or discrete control applications

‰ FBD program uses functions and instances of function blocks linked each other by
links or intermediate variables. Comments can be add to describe the logic of
program

‰ FBD programming is not cell oriented but a grid help you to position the blocks

FBD Editor
‰ Based on a customizable grid (by default 36 columns x 24 rows)
‰ Free form editor
‰ Execution number - Execution sequence is defined by the position of FFBs and links
but can be changed

FBD Toolbar

Schneider Electric FZE, Dubai, UAE


57
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Select a FFB

Use FFB Input Assistant

Insert a FFB by Drag and Drop

Schneider Electric FZE, Dubai, UAE


58
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Extendable Blocks

Programming Rules
‰ Variables
‰ Directly entered
‰ Define through the data selector or by drag and drop from the data editor

‰ FFBs
‰ Define through the data selector or by drag and drop from the <Libset>
browser
‰ Define through the FFB input assistant

‰ Loops
‰ Links are not permitted to create a loop
‰ Use intermediate (feedback) variable to resolve a loop

‰ Link of string variables


‰ Pins of type string cannot be link together (FFB output to another FFB input)
‰ Use intermediate variable to resolve a string link
Execution Sequence
‰ Execution sequence is determined by the position of the FFBs (executed from left to
right and from top to bottom)

Schneider Electric FZE, Dubai, UAE


59
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

‰ If FFBs are linked graphically the


execution sequence is determined by
the signal flow

‰ The execution sequence is indicated


for each FFB by the execution number
(if the top right corner of the frame)

‰ To change the execution order


suggested by the system
‰ Change the FFBs position
‰ Modify the links between
FFBs
‰ Modify the execution number
of some FFBs

Schneider Electric FZE, Dubai, UAE


60
Quantum PLC Configuration and Programming using Unity Pro - 4 days

12. EXERCISE : FBD Language

In this exercise we will create a simple motor starter circuit with a time
delayed startup. We will also track the current running time of the motor, and
create logic to drive fault indicators. Once this circuit is complete and
operating correctly, we will build a circuit that allows and operator to increase
or decrease a value by using input switches. That value could be used to
drive a motor speed controller or provide manual control for a control valve.
Step Action
1 Open your Motor_Control Section and Create a Comment “Motor Start/Stop
Control”

2 Modify your logic to match that shown below.

3 Analyze your logic ( Build > Analyze Project )

4 Fix if there is any errors or warning ( Double click on the Error or warning to
take you the place where error/warning occurred)

Schneider Electric FZE, Dubai, UAE


61
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

5 Rebuild your project ( Build > Rebuild All Project )


‘Rebuild All’ is required for first time building, next time onwards you can
perform ‘Build Changes’

Notice the BUILT sign in the status bar


6 Download Project to built-in simulator

1. Select PLC > Simulation Mode

OR

Notice TCPIP:127.0.0.1 in the status bar

2. Select PLC > Connect.

OR

3. This will start simulator in your PC

Notice and DIFFERENT and NO CONF on the status bar

4. Select PLC > Transfer project to PLC

Schneider Electric FZE, Dubai, UAE


62
Quantum PLC Configuration and Programming using Unity Pro - 4 days

OR

You can see the download progress through a progress bar

After download is successful, Notice the EQUAL and STOP on the status
bar

Select PLC > Run

OR

Notice RUN on the status bar

7 Test logic by modifying/forcing variables

1. Right click any variable and select Modify or Set or Force to test

Schneider Electric FZE, Dubai, UAE


63
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
Note: All variables with a memory address or no address can be Modified/Set ,
whereas all physical digital variables can be Forced

2. Or create new Animation table to modify/force

Note: Animation Table will display the values of variables in real time; you can
Modify/Force variables using Animation Table.

Hint: Right click any variable and click on Initialize Animation Table. You may
select part of logic and right click and select “Initialize Animation Table” option
so that all variables inside the selection will be captured in the new animation
table.

8 Disconnect Simulator

Choose PLC from top menu then click Disconnect

Schneider Electric FZE, Dubai, UAE


64
Quantum PLC Configuration and Programming using Unity Pro - 4 days

OR
9 Connect to your Quantum PLC through USB

1. Connect USB cable to laptop and PLC

2. Select PLC > Standard Mode

OR

3. Select PLC > Set Address

4. Select USB with address field as empty


5. Click “Test Connection” button

6. If “Successfully Connected” message is not received, check your


cable

Schneider Electric FZE, Dubai, UAE


65
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

7. Once “Successfully Connected” message is received, close this


window

8. Select PLC > Connect


9. Select PLC > Transfer Project to PLC
10. Select PLC > Run
10 Disconnect PLC through USB and connect again through Ethernet

1. Select PLC > Disconnect


2. Select PLC > Set Address
3. Select TCPIP and enter IP address : 192.168.1.X

4. Make sure your PC IP Address is in the same network


( 192.168.1.Y )

5. Make sure you have connected your PC to 140 NOE module ( either
through a switch , or a directly using a cross over cable )

6. Click “Test Connection” button

Schneider Electric FZE, Dubai, UAE


66
Quantum PLC Configuration and Programming using Unity Pro - 4 days

7. If “Successfully Connected” message is not received, check your


cable

8. Once “Successfully Connected” message is received, close this


window

9. Select PLC > Connect

11 Perform Online Modification


Make sure that you are connected online and the Status shows EQUAL ,
RUN and BUILT

We are now going to add another interlock to the circuit online. This is done
by increasing the number of pins on the AND function to accommodate the
new input. Click on the center of the AND block. Your screen should like the
one below.

Point at the Black box at the bottom of the AND_BOOL block and pull it
down 1 grid point. You will get a confirmation pop-up message.

Press YES to confirm


Your status will change to EQUAL and NOT BUILT. You are now in online
modification stage. Note that the Controller is still in RUN Mode

You can now continue with editing. An extra pin will be added to the
AND_BOOL block. Assign ‘Overload’ variable to the new PIN.
Perform ‘Build Changes’ to accept the new modification

Schneider Electric FZE, Dubai, UAE


67
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

OR
Note that your status will now show EQUAL , RUN and BUILT

Your logic should now look like the figure below.

12 Add to the logic program to include an indicator which displays the status of
the motor when it is stopped. Use the NOT_BOOL function block. Also, add
an indicator for the motor being in the overload state. The tags for this
already exist.

Hint : Use OR

13 Add an On Delay timer function block to your program to indicate the motor
runtime. Use the following new time variable on the ET pin to identify this
new output point: Motor_Runtime
This circuit can be created with one TON timer block. Identify this timer
function block with the instance name Motor_Time. Use 49 days as the
timer preset.
Your logic should now look similar to that shown below.

Schneider Electric FZE, Dubai, UAE


68
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Build Changes (Online Modification) and test this logic.


14 Add to your program the logic required for a 5 second start up delay when
the operator presses the Start button. The operator should not have to hold
the button for 5 seconds. Your logic should look like that shown below.

Build and test this logic.

15 We will now add some logic to generate an operator controlled value that

Schneider Electric FZE, Dubai, UAE


69
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

could be used to drive a set point. The operator has two control inputs that
can make a value move up or a value move down. The rate of the
movement is controlled by internal logic from a programmed pulse
generator. This signal could also come from a System bit (%S6), but the rate
options are not as great. Start by adding the pulse generator logic as shown
below in the same section as the motor control circuit.

Build and test this logic.


16 The logic for the value control is up – down counting based on operator
inputs.
We want to limit the values to a range of 0—100. We also want to interlock
the Increase and Decrease inputs so that if the operator should press both
inputs at the same time, the value will not move.

Therefore, the up logic is: Increase AND NOT Decrease AND Value LESS
THAN 100 AND pulse.

The Increase signal should use the 4th Input point on your workstation, and
the Decrease signal the 5th. Use the correct topological addresses for your
hardware when you create these variables.
A possible solution is shown in the following figure.

Schneider Electric FZE, Dubai, UAE


70
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Build and test this logic.


If necessary, fix any errors. You did select the correct data
type for the two inputs, didn’t you?
How did you do? Consult with your instructor to verify your answers and results.
Your instructor can help you with any questions you may have.

Schneider Electric FZE, Dubai, UAE


71
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

13. LD Language

Overview
‰ Ladder Diagram (LD) corresponds to a rung for relay switching. Left power rail
corresponds to the phase and right power rail corresponds to the neutral of the rung

‰ Complies with IEC 61131-3 standard

‰ A group of objects linked together with no link to other objects (excluding power rail)
is called a network

‰ LD programming language is cell oriented (only one object can be placed in each
cell)

‰ Process sequence is determined by the data flow within the section. Networks
connected to the left power rail are processed from top to bottom
LD Editor
‰ 11 - 64 columns and 100 – 2000 lines
‰ Grid divides section into rows and columns
‰ Execution sequence is defined by position of the networks (from top to bottom)

LD Toolbar

Schneider Electric FZE, Dubai, UAE


72
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Links

Control Elements
Designation Representation Description

Jump NEXT When status of the left link is 1 this object makes a jump to
a label in the section
For unconditional jump place the jump object directly on the
left power rail
For conditional jump place the jump object after the contacts
Tag Label: Jump target is indicated as text ended with colon
Label (32 characters max) is unique within the section and
is placed in the first cell

Return Return Return object is used only in DFBs and subroutines to force
return to the main program. DFBs and subroutines are
automatically exited after being processed (without return
object)

Operate & Control Blocks


Designation Representation Description

OPERATE block Operate blocks are used to


execute a ST instruction
All ST instructions are allowed
except the control instructions
(RETURN / IF / FOR / JUMP /
CASE / etc)
Operate block requires 1 line and 4
columns

COMPARE block Compare blocks are used to


execute a compare expression in
ST language (<, >, <=, >=, =, <>)
Compare block requires 1 line and
2 colums

Schneider Electric FZE, Dubai, UAE


73
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

14. EXERCISE : LD Language


In this exercise we will create a series of networks to control a motor, use the running
time of the motor to control the clamping of a piece in a machine, and control the
cooling fan of the motor. Proceed as follows:
Action
1 With your lab project open, ensure that you are connected to your lab work
station or the Unity Simulator, and that your project is Built, Equal, and
Running.
2 In your lab project, open your LD section named Tool_ABC_Control.
3 Using the Data Editor, create the following variables:
Name Type
ABC_Start EBOOL
ABC_Stop EBOOL
ABC_Motor EBOOL
ABC_Seq_1 EBOOL
ABC_Seq_2 EBOOL
ABC_Fan EBOOL
ABC_Clamp EBOOL
ABC_Runtime TIME
4 Analyze and Build your program.
5 Using contacts and coils, create a motor control circuit using the ABC_Start,
ABC_Stop, and ABC_Overload inputs to control ABC_Motor. Your circuit might
look like the one below.

Note: The link to the right power rail will automatically, is not always required.
Analyze, Build and test your logic.

Schneider Electric FZE, Dubai, UAE


74
Quantum PLC Configuration and Programming using Unity Pro - 4 days

6 Program an ON delay timer to track the current motor running time. Your circuit
might look like the one below.

Note: The right hand side of a coil is always the same as the left hand side. That
means that the coil passes the logic.
Analyze, Build and test your logic.
7 Program the logic required to control the tool ABC_SEQ_1 output so that it
turns ON when the motor run time is in the range of two to four seconds. This
logic might look like that shown below.

Comparison statement is
ABC_Runtime >= t#2s AND ABC_Runtime <t#4s
Analyze, Build and test your logic.
8 Program the logic required to control the tool ABC_SEQ_2 output so that it
turns ON when the motor run time is in the range of six to eight and one half
seconds.

Schneider Electric FZE, Dubai, UAE


75
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Comparison statement is
ABC_Runtime >= t#6s AND ABC_Runtime <t#8500ms
9 Program the logic required to control the ABC motor cooling fan output so that it
turns ON when the motor turns on, and turns OFF 20 seconds after the motor
turns off.

Analyze, Build and test your logic.


10 Program the logic required to control the ABC_Clamp output so that this output
is set ON at the beginning of ABC_Seq_1 and is reset OFF at the end of
ABC_Seq_2.
Note: The clamp should also reset (open) if the motor stops.
The completed logic is shown below.

Schneider Electric FZE, Dubai, UAE


76
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Test the operation of the logic as a whole to ensure it meets the specifications.

How did you do? Consult with your instructor to verify your answers and results.
Your instructor can help you with any questions you may have.

Schneider Electric FZE, Dubai, UAE


77
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

15. ST Language
Discrete Control using Structured Text
Overview Generally speaking, ST is very seldom used for discrete machine control,
except in those cases where speed of execution is critical in order to keep the scan
times low. More often, ST us used for complex data manipulations or arithmetic
calculations. Even then, you would be unlikely to see an ST section used directly in
your project. The code is most often encapsulated inside of a DFB, and the DFB
implemented in either FBD or LD code. A brief explanation of the properties and
operation of ST sections can be found below.

An ST program (Structured Text) consists of a list of statements that are executed in


sequence by the controller. Using these statements you can call function blocks,
functions, and procedures conditionally or unconditionally, make assignments,
execute statements explicitly, repeat statements and execute jumps conditionally or
unconditionally within a section.

Properties of an ST Section
• Statements consist of:
o an operator,
o an operand,
o an expression if required and
o a comment if required.
o In addition, every statement can be provided with a label.
• Statements must be concluded with semicolons.
• Several statements (separated by semicolons) may be present in one line.
• A single semi-colon denotes an empty statement.
• Each line is limited to 300 characters.
• Program length is limited only by the size of the controller memory.
• Line breaks are possible in statements (multi-line statements).
• Labels, symbols and comments can be placed anywhere in a section.
(Comments can be entered anywhere where empty spaces are permitted.)
• A syntax and semantics check is performed immediately after the statement
is entered. The result of this check is displayed in colored text.
• Syntactically or semantically incorrect sections can be saved.

Schneider Electric FZE, Dubai, UAE


78
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Representation

Instructions
The following instructions are available in the ST language. They are used in
conjunction with operators and operands, FFB calls, literal values and direct address
data, to form the program.

IF … THEN … ELSIF … THEN … ELSE … END_IF


CASE … OF … END_CASE
FOR … TO … BY … DO … END_FOR
WHILE … DO … END_WHILE
REPEAT … UNTIL … END_REPEAT
EXIT

Execution Sequence
Statements are evaluated in sequence, starting from the top of the program.

This consists of evaluating the expressions, and setting values as a result, or making
decisions based on the type of statement encountered.

The evaluation of an expression consists of applying the operators to the operands in


the order defined by the rule of precedence of the operators.

The operator with the highest rule of precedence in an expression will be executed
first.

Operators with the same precedence are executed from left to right, as described in
the expression. This order can be changed through the use of parentheses.

Schneider Electric FZE, Dubai, UAE


79
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

16. EXERCISE : ST Language

In order to get a feel for why ST is seldom used for motor control or other discrete
applications, we will build a duplicate of the machine control circuit that we built with
LD, and then test its operation.
Proceed as follows:
Action
1 Open the Structured Text section that we created in a previous exercise. This
section should be named “ST_Section” and is located in the MAST task.
2 Create the new variables as shown below:
Name Type Address
DEF_Start EBOOL

DEF_Overload EBOOL

DEF_Motor EBOOL

DEF_Seq_1 EBOOL

DEF_Seq_2 EBOOL

DEF_Fan EBOOL

DEF_Clamp EBOOL

DEF_Runtime TIME

Analyze and Build your project.


3 Create the Structured Text program shown below.

Schneider Electric FZE, Dubai, UAE


80
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Analyze and Build your project. Fix errors as required. Consult with your
instructor if you are having difficulties.

4 In order to test the operation of the section, we will create and use an Animation
Table. Create the table as shown below.

Use the Modification feature with the tags as shown to operate the logic. Consult
with your instructor if you are having difficulties.

How did you do? Consult with your instructor to verify your answers and results.
Your instructor can help you with any questions you may have.

Schneider Electric FZE, Dubai, UAE


81
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

17. Derived Function Block ( DFB )

Overview
‰ DFB is a user logic encapsulated in a reusable block
‰ To structure the application, simplify the program creation, improve
readability, make debugging easier and
protect your know-how

‰ The designer programs and debugs the DFB


function block model called “DFB Type”
‰ DFB can be protected and exported /
imported between designer and users
‰ DFB is local to an application or global
in library

‰ The end user creates an image of this block


called “DFB Instance" and use it on the
application
‰ DFB code is loaded only once in the
CPU
DFB Structure

I/O Parameters and Internal Variables


‰ Inputs : 32 max
‰ In read only by the DFB
‰ To transfer values from application to DFB

‰ Outputs : 32 max
‰ In write only by the DFB
‰ To transfer values from DFB to application

‰ Inputs / outputs : 32 max


‰ In read / write by the DFB
‰ To transfer values to DFB, modify and return them to application

‰ Private variables : unlimited


‰ Only used by DFB (i.e. : intermediate variable)

‰ Public variables : unlimited


‰ Used by DFB and application or user in adjust mode
‰ Values modified (program / adjustment) can be saved as initial values by
setting %S94

Schneider Electric FZE, Dubai, UAE


82
Quantum PLC Configuration and Programming using Unity Pro - 4 days

DFB Instance
‰ DFB instance
‰ Used in all application
tasks except event
tasks and SFC
transitions
‰ Connect inputs /
outputs to application
variables of same type

‰ DFB instance used as


‰ A standard block in LD
and FBD languages
‰ An elementary function
in ST or IL languages

Store DFB in Library

Schneider Electric FZE, Dubai, UAE


83
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

18. EXERCISE : DFB


In this portion of the module we are going to create a new DFB to encapsulate the
logic we developed previously to manipulate a value up or down using operator
inputs.
Note: You should be aware that a DFB may be created or modified while you are
connected to the controller, and then downloaded without stopping the system.
Once this new function is developed, we will replace the existing code with the new
function block.

Proceed as follows:
Action
1 Ensure that you are connected to your lab workstation or the simulator, and
that your project is Built and Equal.
2 Double click on the Derived FB Types header in the project browser. The
Data Editor dialog should appear with the DBF Types tab selected.

3 Enter the name of your new DFB in the name field as shown below. Press
Enter after typing in the name, and answer Yes to confirm the modification.

Schneider Electric FZE, Dubai, UAE


84
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Note the 3 icons to the left of the name. The + indicates that we can expand
the object to configure it. The next icon (under constructions) indicates that the
definition of the new function is incomplete or did not analyze correctly and will
disappear after the new block analyzes with no errors. The last icon is the
symbol for a Function Block vs. a Function.

4 Click on the + sign to expand the DFB. This will open the block to let you
define the different components of the DFB:
- Input Pins,
- Output Pins,
- Input/Output Pins,
- Public Variable,
- Private Variables, and,
- Sections.
You should note that not all of these items need to be configured.

5 To create your input parameters, expand the Inputs object and define the
names of the parameters and their required data types. You should note that

Schneider Electric FZE, Dubai, UAE


85
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

you cannot assign addresses to these parameters, but you can specify the pin
location on the block. Create the inputs as shown in the figure below.

6 Create the Output parameters as shown below.

7 We do not need any Input/Output or Public variables for our DFB, but we do
need an internal (private) variable to make the pulse generator operate. Create
this variable as shown below.

Schneider Electric FZE, Dubai, UAE


86
Quantum PLC Configuration and Programming using Unity Pro - 4 days

This completes the definition of the parameters and variables required for our
DFB.The next step will have us create a Section definition to hold the
operational code of the DFB.
8 The last thing we need to define prior to programming the internal logic of the
DFB is the names and types of any Sections for the DFB. You should note that
a DFB may contain as many sections as required to perform its function, and
that you may use all of the IEC languages except SFC. Define a section of
FBD using the name shown below.

As soon as you enter the name of the section, the New dialog will appear to
allow you to set the properties of the new Section. Select FBD, as shown
below.

Schneider Electric FZE, Dubai, UAE


87
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Note that the new section is now shown in the Project Browser.

9 We will now move the logic for the Setpoint Generator from the Motor_Control
section in the MAST task into the section for the Derived Function Block.
Open the Motor_Control Section.

10 Select the logic for the value generator as shown below, and copy it to the
clipboard.

11 Open the Function Block section in your DFB. This can be done either from

Schneider Electric FZE, Dubai, UAE


88
Quantum PLC Configuration and Programming using Unity Pro - 4 days

the Project Browser or the Data Editor by double-clicking the Section name.
You will be presented with an empty section as shown below.

12 Paste the logic that you copied from the Motor_Control Section into this DFB
section as shown.

13 Close this window.


14 Validate your project. If all is well, there will be no errors and the “At Work”

Schneider Electric FZE, Dubai, UAE


89
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

icon for the DFB will be cleared.

Exercise: Inserting a DFB into Logic

Now that we have created our DFB, we need to use it in the logic. As Unity considers
a DFB to be just another FFB, all of the processes we used earlier can be used to
insert the block. The only distinction is where the FFB is located. The DFB is stored
in the Project or Application library for the project. Unless you specifically copy your
DFBs to the Library, they are strictly local in scope, and can only be accessed from
the project in which they are created.

To insert your DFB into your already existing logic, proceed as follows:
Step Action
s
1 Open the Types Library Browser. You should see your DFB in the
<Project> library as shown.

2 Insert a copy of your new DFB into the Section.

Schneider Electric FZE, Dubai, UAE


90
Quantum PLC Configuration and Programming using Unity Pro - 4 days

3 Apply the existing variables to the pins as shown below.

4 Build Changes and test the function. Repair any errors encountered.
If you encounter any difficulties, consult with your instructor for assistance.

Viewing Internal Logic of a Running DFB


Often, we want to look at the internal operating logic of a DFB. This might be
because we are not certain it is operating correctly, (usually in the design phase), or
because we are curious about what makes it work (usually in the operations phase).
If you desire to see the internal logic of a DFB in operation, proceed as follows.

Schneider Electric FZE, Dubai, UAE


91
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Actions
1 Open your Project
2 Connect to the controller. You should be Built and Equal.
3 Open a section containing the DFB of interest. (Perform a search if necessary).
4 The section should be animated, with the DFB visible in the window.
5 Right – click on the DFB. The context menu will appear as shown.

6 Select Refine, as shown above. The internal logic of the DFB will be displayed
and animated as shown.

Schneider Electric FZE, Dubai, UAE


92
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Viewing Properties of DFB


As with any object in Unity, there are properties associated with DFBs. To view those
properties, proceed as follows:

Steps Actions
1 From the context menu of the Derived FB Types folder, DFB name, select
Properties.
OR
2 From the context menu of the DFB name in the Data Editor DFB Types tab,
select Properties.
3 A Data Properties window for that DFB will appear. An example is shown
below.

Schneider Electric FZE, Dubai, UAE


93
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Some of the properties of the DFB can be modified using this


form. They are:
Name
Comment
Diag (this DFB used as a diagnostic DFB)
Protection and Password, and
Version Number
4 If you change the protection status of a DFB, you will be prompted to enter a
password as shown. Do not forget this password, as recovery is not
possible.

Schneider Electric FZE, Dubai, UAE


94
Quantum PLC Configuration and Programming using Unity Pro - 4 days

How did you do? Consult with your instructor to verify your answers and results.
Your instructor can help you with any questions you may have.

Schneider Electric FZE, Dubai, UAE


95
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

19. SFC Language

Overview

Step and Macro Step

‰ A SFC section indicates the state of a machine through the


active steps (100 steps maximum in multiple token)

‰ Normal step becomes active when the prior transition is true and
becomes inactive when the succeeding transition is true
‰ Each step contains no, one or several actions

‰ Initial step starts the sequence when the application is initialized (one initial step must
be defined for each graph)
‰ Don’t contain action

‰ Macro step is used to call a macro step section


‰ Input / Output steps automatically created are respectively the first and last
step of a macro section

‰ Qualifiers can be used to define actions


‰ Supervision and delay times can be defined

Transition
‰ For each transition the condition can be a Boolean variable or a transition
section
‰ Transition condition is edited using FBD, LD, ST or IL
language. The result of the evaluation of the transition
condition is assigned to a Boolean variable with the same
name as the transition itself

‰ To minimize graphical creation predefined sequences are


proposed

Schneider Electric FZE, Dubai, UAE


96
Quantum PLC Configuration and Programming using Unity Pro - 4 days

‰ Simple sequence beginning with a step or a transition


‰ Parallel sequence from AND divergence and convergence
‰ Selection sequence from OR divergence and convergence

SFC Editor
‰ Cell oriented editor based on Window multiple document
interfaces
‰ 32 columns and 200 rows
‰ 1024 steps maximum

SFC Toolbar

Step Properties

Qualifiers

‰ Define the control for the action of a step


‰ None / N : action is set when the step is active
‰ R (Reset) : action is reset when the step is active
and stays at 0 even if the step becomes inactive
‰ S (Set) : action is set when the step is active and
stays at 1 even if the step becomes inactive

Schneider Electric FZE, Dubai, UAE


97
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
‰ L (time Limited) : action is set when the step is active
‰ D (Delayed) : action is set after a delay and stays at 1 during active period of
the step
‰ P (Pulse) : action is set when the step is active and stays at 1 for one
program cycle
‰ DS (Delay Set) : action is set after a delay and stays at 1 even if the step
becomes inactive. If the step becomes inactive before the delay time the
action is not set
‰ P1 (Positive edge) : action is set for one program cycle when the step
becomes active (0 -> 1 edge)
‰ P0 (Negative edge) : action is set for one program cycle when the step
becomes inactive (1 -> 0 edge)

Transition Properties

Transition Section

Single / Multiple Token Execution


Single token
„ Only one initial step
„ One step active at same time (except in parallel branches)
„ Jump to or out of a parallel branch is not possible

Multiple token
„ Several initial steps (up to 100)
„ Initial steps inside a macro step
„ Several steps active at same time
„ Jump to or out of parallel branch is possible

Schneider Electric FZE, Dubai, UAE


98
Quantum PLC Configuration and Programming using Unity Pro - 4 days

„ Step can be active from a non-SFC section (SETSTEP block)

Online Modifications
‰ Full modification in online mode
‰ SFC section can be created in online mode
‰ A step can be added / modified (properties and actions) / deleted
‰ A transition can be added / modified (type and expression) / deleted

Schneider Electric FZE, Dubai, UAE


99
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

20. EXERCISE : SFC Language


The following process will be used for the SFC exercises that follow.

Exercise: Step 1: Create Variables

As some of the lab workstations have a limited amount of real I/O, we will use
unlocated variables for this exercise. If you have free I/O points available in your
workstation, you may please use those addresses

Create the following variables for use in your Drill Press SFC control program:
Name Type
Drill_Start EBOOL
Drill_Top_Switch EBOOL
Drill_Mid_Switch EBOOL
Drill_Bot_Switch EBOOL
Drill_Motor EBOOL
Drill_Advance_Fast EBOOL
Drill_Advance_Slow EBOOL
Drill_Retract EBOOL
Proceed to the next exercise.
Exercise: Step 2: Create SFC Section

Create a new SFC section as shown below:

Schneider Electric FZE, Dubai, UAE


100
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Action

1 In the Project Browser, navigate to Program » Tasks »


MAST » Sections.
2 Right-click your mouse on Sections.
3 Select New Section… from the context menu.
4 In the New dialog, enter the name Drill_Process as the Section Name. Select
SFC as the language.

5 Click on OK. Your section list in the project Browser should show the new
section, and the section should be open on the screen.

Proceed to the next exercise.


Exercise: Step 3: Create SFC Chart
When a chart is open on the screen and its window has the focus, there will be a
toolbar displayed that provides you with the ability to select objects to be placed on
the chart. This toolbar looks like the following:

Schneider Electric FZE, Dubai, UAE


101
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

When you point at any of the individual buttons on the tool bar, a tool tip will pop up
to explain its purpose. We can use these buttons in the creation of our chart.

You should note that these tool are also available from the context menu in the
section. This is shown below.

To create the chart, proceed as follows:

Action
1 Open your Lab project and connect to your controller.
2 Ensure that your project is Built and that you are Equal to the controller.
3 If it is not already on the screen, open your SFC section.
4 Use the Step tool to insert a new step in the upper left cell of the graph as
shown.

Note that the step frame is blue. That indicates that the step is not yet
configured correctly. If you point your mouse at the block, the tool tip will tell
you what action is required to complete the step.
5 We will now complete the insertion of transitions and steps for our Drill

Schneider Electric FZE, Dubai, UAE


102
Quantum PLC Configuration and Programming using Unity Pro - 4 days

process. We will use the Multiple insert tool for this step.

Open the context menu and select Transition Step Sequence as shown
below.

6 In the Transition-Step Sequence dialog, set the rows value to 3 as shown.


Click on OK

7 Click in the cell directly below your first step. The chain of transitions and
steps is entered into the chart.

Schneider Electric FZE, Dubai, UAE


103
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

8 Add a transition at row 8.


9 Add a jump at row 9. This completes the graph.
Note that when you analyze the section at this point, there will be 2 errors.
These errors will be removed in the next 2 steps.
10 The first error is that the Jump does not have a target. Double-click on the
jump and point it back to the first step as indicated in the figure below.

11 The last error is because there is no initial step defined. Double-click on step
S_2_1. This will open the step properties dialog. Select the Initial Step
checkbox as shown.

Click on OK

Proceed to the next exercise, programming the transitions.

Schneider Electric FZE, Dubai, UAE


104
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Exercise: Step 4 : Program the Transitions


In this exercise we will program the transitions to track the process conditions that
would cause a change of state. Once this is done, and analyzed and built, the chart
will animate and run, even though no outputs are being driven. Proceed as follows:

Step Action
1 Double-click on the transition under the first step. That will open the
Transitions properties dialog as shown.

2 Assign the variable Drill_Start to this transition. You may type it into the
entry field or look it up using the browse button. See below for the result.

3 Assign the variable Drill_Mid_Switch to the transition in cell 4 of the chart


using the same process as above.
4 Assign the variable Drill_Bot_Switch to the transition in cell 6 of the chart
using the same process as above.
5 Assign the variable Drill_Top_Switch to the transition in cell 8 of the chart
using the same process as above.

Schneider Electric FZE, Dubai, UAE


105
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

6 Your chart should now look like the one shown below.

7 Analyze your project and Build the changes in the controller. Repair any
errors as required.
8 Using an animation table, run your chart by manipulating the transition
variables.
Note: If your chart does not animate (you don’t see a green fill at step 1), you
will have to initialize the chart.
That is done from Services » Animation Panel » InitializeChart. You will
have to perform this operation twice.
The running chart and animation table is shown below. Note that the chart
has been rearranged for better viewing only. This does not change its
functionality.

Schneider Electric FZE, Dubai, UAE


106
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Proceed to the next exercise, programming the steps.

Exercise: Step 5 : Program the Steps for Direct Control

In this exercise we will program the outputs directly into the steps. Each of the
outputs is referred to as an Action.
This action can be as simple as a single Boolean variable, or as complex as an
included private action section with many outputs.
An action will turn on when the step is entered, and turn off when you leave the step.
Actions can also be assigned what are called Qualifiers. These qualifiers can be
delays, sets, resets, etc., and should only be used with direct actions and not action
sections.

Schneider Electric FZE, Dubai, UAE


107
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
Remember that each step is limited to 20 actions maximum, so careful planning
might be required.
To program our drill example, proceed as follows:
step Action
1 No actions are required in step number 1.
2 Double-click on Step number 2. The step properties dialog will appear as
shown.

Note that this is a multi-tabbed dialog. We will change the names of the steps
in addition to setting the actions.

3 Change the step name to Drill_Down_Fast.

4 Select the Actions tab. The screen will look like the following:

In the upper fields we select the Boolean variable we want and give it a
qualifier, or we can create an action section.

Schneider Electric FZE, Dubai, UAE


108
Quantum PLC Configuration and Programming using Unity Pro - 4 days

The large field in the middle of the dialog is the action list field, and contains a
list of all the actions or sections that will be executed when the step is active.

5 Program the Drill_Down_Fast step with the variables


Drill_Motor, and Drill_Advance_Fast that we created in an earlier exercise.
When you are finished, your dialog should look like the one shown below.

Don’t forget that the Drill_Motor output will be turned off when we leave this
step. Therefore, we have to enter this variable at each of the operational step
in the chart that requires the motor to be running.

6 Program the next step as name Drill_Down_Slow with variables


Drill_Motor and Drill_Advance_Slow

7 Program the last step as name Drill_Up with variables Drill_Motor and
Drill_Retract.

8 Your chart should now appear as follows.

Schneider Electric FZE, Dubai, UAE


109
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

9 To view the actions programmed in the steps in the chart, you can expand
the view. Select View » Expanded Display from the menu.

10 Build your changes, and test using an animation table.

Schneider Electric FZE, Dubai, UAE


110
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Schneider Electric FZE, Dubai, UAE


111
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

21. IL Language

Overview
‰ Instruction List (IL) is a Boolean machine language for numerical and logical
processing

‰ Complies with IEC 61131-3 standard

‰ Difficult to write, read and understand the program

Language Reference

IL Editor

Programming Rules

‰ Variable is entered directly or selected through the Data selection tool


‰ Elementary function don’t require declaration and don’t need to be called (CAL
operator is not used). It can be entered directly, selected through the Data selection
tool or defined with the FFB input assistant
‰ Function block (EFB or DFB) don’t require declaration but needs to be called. It can
be entered directly, selected through the Data selection tool or defined with the FFB
input assistant
Schneider Electric FZE, Dubai, UAE
112
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Call can be formal (each used input / output are assigned by an argument) or informal
(each input / output of the block are associated to an argument that is an empty field
for non-assigned I/Os)
EN /ENO input / output can be used in formal call to control the execution of the block
but are not possible in informal call

Schneider Electric FZE, Dubai, UAE


113
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

22. Application Testing

Analyze and Build

‰ Build menu allows to analyze and build your project


‰ Analyze : scans the program of the current section
‰ Analyze Project : scans the entire application
‰ Rebuild All Project : create a compile file of the complete application that can
be downloaded ans executed by the PLC (or simulator)
‰ Build Changes : take into account in the compile file the program
modifications

‰ Result of analyze and buiding is displayed in the output window (warnings


appear in blue color and errors appear in red color)

Connection / Disconnection

‰ Connection enables to change from offline to online mode


‰ Project in the PLC and project in the terminal are compare
9 If they are identical online mode is Equal and you can modify the
project in the same way as for offline mode. The non modified parts
are always animated and you must build the modifications to animate
the entire project once again
9 If they are different online mode is Different and you must transfer the
project between the terminal and the PLC to run your project in Equal
online mode

‰ Connection procedure is the following :


1. Choose the connection mode (standard mode to PLC or simulation
mode)
2. Set address of the PLC or simulator (according to your choice)
3. Connect the terminal to the PLC or simulator

‰ Disconnection enables to return to offline mode from online mode

Set PLC or Simulator Address

Schneider Electric FZE, Dubai, UAE


114
Quantum PLC Configuration and Programming using Unity Pro - 4 days

‰ In connect mode you can


‰ Compare the projects in the
PC and the PLC
‰ Transfer the project from
terminal to PLC or from PLC
to terminal
‰ Transfer the data from
terminal to PLC or from PLC
to terminal
‰ Run / stop / initialize the PLC
‰ Update the upload information
or the initial values
‰ Make a backup of your project
‰ View the memory consumption and the state RAM

Simulator
‰ Use the simulator to operate your application with hardware

‰ Launch the simulator from Start menu (Programs / Schneider Electric / Unity Pro /
PLC Simulator) or from the desktop (connection to simulation mode)

‰ Connect the simulator (if necessary) then tranfer your project to the simulator. To
load the simulator with your project it’s also possible to drag & drop the application file
to the simulator icon or simulator control panel (if simulator is already started)

Schneider Electric FZE, Dubai, UAE


115
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

23. Diagnostics and Debugging

Overview

To shorten debugging and commissioning time Unity Pro provides services


‰ Dynamic animation of the program
‰ Inserting a breakpoint in the program and executing it step by step
‰ Inserting a watch point in the program
‰ Using display boxes attached to variables
‰ Using animation tables or operator screens to drive inputs / outputs
‰ Using cross reference to see usage of a variable

Dynamic Animation and Display Boxes

Variable Window

Modify Variable through Program Editor

Schneider Electric FZE, Dubai, UAE


116
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Modify Variable through Animation Table

Breakpoint
„ Breakpoint is necessary to execute the program step by step
„ Breakpoint is unavailable on event tasks
„ One breakpoint (or watch point) can be set in all the program

Step by Step Commands


‰ Go executes the code until the breakpoint (cycle by cycle)

Schneider Electric FZE, Dubai, UAE


117
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
‰ Step over executes the current element
‰ Step into the code of the current
element
‰ Step out the code of the current
element
‰ Show the instruction of the current
step
step by step mode the task manager will not detect a watchdog overflow

Watch Point

„ Watch point is unavailable on event tasks


„ One watch point (or breakpoint) can be set in all the program

SFC Animation Panel


‰ SFC Animation Panel enables to execute a SFC
section step by step and debug a graph
‰ Step Over and Step Out commands can be
used
‰ Step Into is not available

‰ Set a breakpoint in your program before using step by


step mode

‰ The task is not stop but the attached graph is frozen

‰ The panel is not available for macro steps debugging

Schneider Electric FZE, Dubai, UAE


118
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Diagnostic in Run Time

Integrated Diagnostic
„ Choose to display or
not the cause of the
fault through the
application level (local
to the section of
program or global to the
project)
„ Choose the language to
display the system error messages

System Diagnostic
„ System diagnostic is automatic (works without programming)
„ All system errors are recognized ans saved by the PLC
„ System diagnostic uses system bits ans words (ie %S18 indicates an overflow
default)
„ Diagnostic viewer of Unity Pro displays the messages
„ List of error messages (columns are configurable)
„ System bit or diagnostic FFB which detects the fault
„ Error message
„ Symbol associated to the fault
„ Date and time of appearance / disappearance of the fault
„ Date and time of acknowledgement of the fault
„ Supplementary information on the selected message
„ Double clicking on a message line displays the faulty program

Schneider Electric FZE, Dubai, UAE


119
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Process Diagnostic
„ Process diagnostic is implemented with the use of EF / EFB and DFB
„ SFC diagnostic is directly integrated (step time errors / transition condition errors)
„ DEREG : alarm deregistration (for user DFB)
„ ONLEVT : online event
„ REGDFB : alarm registration (for user DFB)
„ REGEXT : registration of expanded FFB errors
„ UREGDFB : registration of error messages in the diagnostic block
„ D_ACT : extended locking /
action diagnostics
„ D_DYN : extended dynamic
diagnostics
„ D_GRP : extended signal
groups monitoring
„ D_LOCK : extended locking
diagnostics
„ D_PRE : extended process
requirement monitoring
„ D_REA : extended reaction
diagnostics
„ ALRM_DIA : interface with
diagnostic buffer
„ EV_DIA : event monitoring
„ MV_DIA : motion monitoring
„ NEPO_DIA : command and
diagnostics of operating
section
„ SAFETY_MONITOR : safety
„ TEPO_DIA : command and diagnostic of operating section

Cross Reference
Allows you to see usage of a variable everywhere in the application and how it is used

PLC Debug Screen

Schneider Electric FZE, Dubai, UAE


120
Quantum PLC Configuration and Programming using Unity Pro - 4 days

24. Operator Screens

Overview
‰ Control and monitoring for first and second level diagnostic
‰ Displaying real time state of a machine / process
‰ Run time screens customized to needs of operator

‰ Completely integrated in Unity Pro


‰ Use same browser, data editor, cross reference tool, …
‰ Use existing application resources
‰ Run time screens are part of PLC application file
‰ No need for additional hardware like communication module
‰ Easy to create screens : toolbar, predefined objects, library of objects,
configuration dialog boxes, …
‰ Easy to create animations : visibility, flashing, bargraph, trend diagrams,
predefined animated objects, …

Graphic Editor and Toolbar

Edit your Graphical Screen

Schneider Electric FZE, Dubai, UAE


121
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Use Object from Library

Define Object Properties

Define Object Animations

Schneider Electric FZE, Dubai, UAE


122
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Define Animation Type

Configure the Screens

Create Screen and Properties

Schneider Electric FZE, Dubai, UAE


123
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Use Messages List

Basic Functions in Online Mode

Schneider Electric FZE, Dubai, UAE


124
Quantum PLC Configuration and Programming using Unity Pro - 4 days

25. Remote I/O Configuration

‰ Large number of I/O drops remotely mounted


‰ Highest performance,
deterministic
‰ Modicon S908
protocol
‰ A drop is a site which
consists of up to two
(2) backplanes, power
supply module(s), a
remote I/O interface,
and I/O modules.
‰ Coaxial cabling
scheme providing
long distance, up to
15,000 ft. for up to 31
remote drops.
‰ 1.5Mbps for high I/O
data throughput.
‰ Most preferred
network for connecting I/O modules remotely.

Schneider Electric FZE, Dubai, UAE


125
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

26. Exercise : Remote I/O Configuration

In this exercise, we will configure one RIO drop for your local Quantum station.
Please follow the steps given the snapshots. Also instructor will demonstrate the
steps for you.

Schneider Electric FZE, Dubai, UAE


126
Quantum PLC Configuration and Programming using Unity Pro - 4 days

27. Unity Quantum Hot Standby

Overview
‰ Designed for use where downtime cannot be tolerated.
‰ Deliver high availability through redundancy.
‰ Two backplanes are configured with identical hardware, software and firmware.
‰ One of the PLCs acts as the Primary.The Primary controller updates the
Standby controller after each scan.
‰ Primary and Standby states are Switchable.
‰ The Remote I/O network is always operated by the Primary controller.
‰ A UNITY Hot Standby system supports only Remote I/O.
Hot Standby Architecture
‰ UNITY PRO V2.0 or later

‰ Hot Standby controller


‰ 140 CPU 671 60

‰ Embedded Fiber Optic port


‰ Based on Ethernet
‰ 100 Mbits/sec

‰ No need for dedicated module

‰ No need for dedicated software

‰ Use of existing Remote I/O Drops

Schneider Electric FZE, Dubai, UAE


127
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Schneider Electric FZE, Dubai, UAE


128
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Schneider Electric FZE, Dubai, UAE


129
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Schneider Electric FZE, Dubai, UAE


130
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Schneider Electric FZE, Dubai, UAE


131
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Schneider Electric FZE, Dubai, UAE


132
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Schneider Electric FZE, Dubai, UAE


133
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Schneider Electric FZE, Dubai, UAE


134
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Schneider Electric FZE, Dubai, UAE


135
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Transferring User Data


At the end of Scan in a Redundant System,
the Primary must send its Data to the
Standby in order to keep it ready to assume the role of Primary if the need arises.
The transferred User Data includes:
‰ Located Variables (in State RAM)
‰ All Unlocated Variables (in State RAM)
‰ All instances of DFB and EFB data
‰ SFC states
‰ System Bits and Words

Executive Upgrade Procedure


UNITY Hot Standby Systems allow EXEC Upgrades without stopping the Application.

This is a Multi-Step Procedure:


z Enable “EXEC Upgrade without Stopping the Application”
z Upgrade the EXEC on the Standby
z Perform an Application Program Transfer
z Initiate a Hot Standby Switch Over
z Upgrade the EXEC on the new Standby
z Perform an Application Program Transfer to new Standby
z Disable “EXEC Upgrade without Stopping the Application”

Schneider Electric FZE, Dubai, UAE


136
Quantum PLC Configuration and Programming using Unity Pro - 4 days

28. EXERCISE : Unity Quantum Hot Standby

Configure a Unity Hot Standby System

Test all features of Hot Standby System

Schneider Electric FZE, Dubai, UAE


137
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

29. I/O Scanning


The IO scanner makes it possible to periodically read or write to/from remote I/O
on the Ethernet network without requiring any specific programming.

This service comprises the following essential elements:


¾ a read field containing all the values of the remote inputs,
¾ a write field containing all the values of the remote outputs,
¾ scanning periods independent of the PLC cycle and dedicated to each remote
device.
I/O scan will only be performed if the PLC is in Run Mode

¾ As soon as the PLC goes into Run, the module opens one connection per
scanned device.
¾ Then, the module periodically reads the input words and periodically writes the
output words of each device.
¾ If the PLC goes into Stop, the connections with each device are closed.
¾ This service works with all devices supporting Modbus communication on the
TCP/IP profile in server mode.

‰ Activate the IO Scanning tab from the Module Utilities dialog box

‰ Master %MW zones


‰ This sub-window is used to define the ranges of internal words of the
application memory (%MW) specific to the read and write zones.

Schneider Electric FZE, Dubai, UAE


138
Quantum PLC Configuration and Programming using Unity Pro - 4 days

¾ for the read zone Read Ref., the starting address in the table of internal words for
reading inputs,
¾ for the write zone Write Ref., the starting address in the table of internal words for
writing outputs,
The length of tables has a maximum exchange capacity of:
¾ 2 Kwords for the read zone
¾ 2 Kwords for the write zone

‰ Scanned peripheral devices are configured in a table


‰ list remote devices to be scanned, using the IP address,
‰ specify a time out for each device
‰ specify the scanning period allotted to it for each remote device
‰ specify the amount of space the input and output words take up in the read
and write zones,
‰ to set the output fallback mode for each device and add comments for each
device.

The IP Address field is used to list the devices which must be scanned by the Ethernet
module.

The Unit ID field is used to associate the slave address of the device connected to an
Ethernet/Modbus gateway with the IP address

The Health Time out field is used to set the maximum time out for waiting for the
response from the remote device. Beyond this time limit, the Health bit switches to 0.

The Repetitive rate field is used to associate an IP address with its scanning period. See
Scanning Period. The scanning time value is entered in ms.

Master RD ref. and master WR ref : These parameters give the addresses of the
beginning of each range reserved for the device. These parameters cannot be accessed.
They are calculated automatically as the sum of:
¾ the address of the beginning of the Read Ref. table and the Write Ref. table,
¾ and the length of the Read Length and Write Length fields.
Slave RD ref. and slave WR ref:These fields correspond to the first word to be read and
written for remote devices to be scanned.
¾ slave RD ref.: specifies the address of the first word to be read
¾ slave WR ref.: specifies the address of the first word to be written
Read Length and Write Length corresponds to the number of words to be addressed
in the remote device.
Last value (inputs) is used to configure the behavior of inputs in the event of an access
error in relation to the remote device (example: cut-off of the device, etc.)
Fallback to 0 Maintain

Schneider Electric FZE, Dubai, UAE


139
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
Independent control of the inputs and outputs of the same slave may be accomplished by
using separate lines for the read function and the write function

Schneider Electric FZE, Dubai, UAE


140
Quantum PLC Configuration and Programming using Unity Pro - 4 days

30. Global Data


‰ A Distribution group is a group of communication modules identified by the same
multicast IP address. Exchanges in "multicasting" are used to distribute Global Data.
Several independent distribution groups can co-exist on the same sub-network with
their own multicast address.

The communication modules are grouped together into a Distribution group.


Each communication module publishes a local application variable for the other
communication modules in the distribution group.
Each communication module can also subscribe to the application variables published by
all other modules belonging to the distribution group.
The Global Data service should be configured to determine the location and the number
of application variables of each communication module. Once the modules have been
configured, exchanges between communication modules belonging to the same group
are automatically carried out when the PLC is in RUN mode.

‰ Activate the Global Data tab from the Module Utilities dialog box
‰

The aim of the Global Data service, which is supported by Ethernet modules, is to provide
an automatic data exchange for PLC application co-ordination. Data is shared according
to an inter-device publication/subscription method.

‰ In the Global Data tab assign a Group Name, (Multi-cast) Address, Health time out
and Distribution Period.

Schneider Electric FZE, Dubai, UAE


141
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
1- Indicate the Distribution Group Address to which the station belongs, between
224.0.0.0 and 239.255.255.255
2 - Adjust the Distribution Period to between 1 and 50 PLC cycles.
3 - Fill in the group name defined in the Unity Pro data editor
4 - Define the Health time out. This value can be adjusted from 50 to 1000 ms (in
increments of 50ms).

‰ For each Global Data variable, define whether it is published (PUB) or subscribed
(SUB) in the Global Data field.

Publication/Subscription protocol on UDP/IP is used for data distribution.


There are no theoretical limits for the number of stations belonging to a distribution group.
The main limitation is the number of variables exchanged in a group (64 variables).

‰ Any or all stations in the group may Subscribe to the published data

Schneider Electric FZE, Dubai, UAE


142
Quantum PLC Configuration and Programming using Unity Pro - 4 days

31. Elective 1 : Analog Processing ( Optional )

Overview
In general, analog processing and control in a controller is done by interfacing the
continuously variable electrical signals (voltage or current) generated by the field
measuring devices to a hardware (electronic) interface that converts that signal to a
numeric value that is representative of (proportional to) the level of the process. An
example of this might be a device that measures temperature in the range of -100ºC
to + 500ºC. The device would convert the actual temperature measured into a
transmitted electrical signal.

Most process control signals are in the range of 4.0 to 20.0 mA, where 4.0 mA
represents the minimum measurement value (minus 100ºC), and 20.0 mA represents
the maximum measurement value (+500ºC). The 4.0 - 20.0 mA signal is applied to
one of the inputs of the controllers Analog input module, where the electronic circuits
will convert the electrical signal to a number. That is done using a circuit called an
analog to digital converter (A/D). Depending on the resolution of the conversion, the
signal will be converted to various numeric ranges. The most common conversion is
what is called a 12 bit conversion, where the signal is converted to a value between 0
and 4095.

In some cases the Input module will then take this converted value and scale it for
you. This is most commonly found in temperature modules, but is also available with
Premium and M340 general purpose Analog I/O modules. The converted value is
then placed in an Input Register location within the controller, where it is available for

Schneider Electric FZE, Dubai, UAE


143
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
use in the control circuits. In a Unity based system, this would be a type %IWx
location as specified by the I/O map.
If the value has not been scaled by the module, then this value is often referred to
as the raw analog input.

Scaling of Analog I/O

Because your system may contain many analog signal types, all with the same raw
value range, we typically want to re-state these values in the original measurement
range. That process is called an Engineering Units (E.U.) conversion (scaling).

Unity has functions available for converting your field values into usable (E.U.) values
for display or control. The purpose of this lesson is to introduce you to some of these
functions. There are two different categories of Analog scaling functions, general
purpose, and specialized (Quantum only). The general purpose function blocks
reference the addressed input locations, and the specialized blocks abstract the data
into special datatypes. General purpose blocks do not require special configuration
logic and specialized ones do.

Scaling Function

There is only one general purpose scaling function available in the Unity function
library. That is the SCALING function block. This function block is found in the
CONT_CTL library. This function is available on all hardware platforms. This block is
sometimes referred to as parameterized function, as it requires you to pass the
scaling parameters in a variable of derived data type called Para_SCALING. As this
function block has a data type of REAL on the IN pin, we cannot use it directly with
the addressed analog inputs, as they are typically data types of type INT or WORD.
That means we have to do a conversion first.

Because of all of the complexity involved in using this block, and because we might
also want to incorporate limits or alarms in the same input processing, the scaling
function is most often encapsulated in a DFB. Our exercise will incorporate that
method. We will require 2 DFBs. One for scaling inputs, and one for converting back
to raw units for outputs.
Exercise: Scaling DFB

Schneider Electric FZE, Dubai, UAE


144
Quantum PLC Configuration and Programming using Unity Pro - 4 days

In this exercise we are going to create 2 DFBs and then implement them in an FBD
section to scale an analog input and send a value to an analog output. Proceed as
follows:

Input Scaling DFB:


Step Action
1 Open the Data Editor dialog and select the DFB Types tab.

2 In the blank row at the bottom of the list, type the name Input_Scaler as the
new DFB name.

4 Open the In_Scale section and program it as shown below.

Schneider Electric FZE, Dubai, UAE


145
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

5 Analyze your DFB, and correct any errors.

6 Build your changes.

Output Scaling DFB:


Step Action

1 Open the Data Editor dialog and select the DFB Types tab.

2 In the blank row at the bottom of the list, type the name Output_Scaler as
the new DFB name.

3 Expand the DFB and set the parameters as shown below.

Schneider Electric FZE, Dubai, UAE


146
Quantum PLC Configuration and Programming using Unity Pro - 4 days

4 Open the Out_Scale section and program it as shown below.

5 Analyze your DFB, and correct any errors.

6 Build your changes.

Implement the new DFBs:

Schneider Electric FZE, Dubai, UAE


147
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Step Action

1 Create a new section of FBD named “Analog_Scaling”.

2 Create the following variables.


Name Type Address
Analog_In INT %IW1.5.1
Analog_Out INT %QW1.6.1
Scaled_Input Real NONE
3 Program the new section as shown below.

4 Build the changes and test the logic.

Quantum Special Functions


The final type of scaling abilities are the abstracted scaling functions. By abstraction,
we mean that the functionality of the scaling operations “know” where to go to get
the data they need. No I/O address references are required.
This abstraction is accomplished using two functionalities: A configuration using
logic blocks that mimic the analog I/O mapping, and, a set of scaling function blocks
that use two special datatypes developed for this purpose, and usable only with this
functionality.
This capability is only available with Quantum Analog I/O modules.

Abstracted Functions

Schneider Electric FZE, Dubai, UAE


148
Quantum PLC Configuration and Programming using Unity Pro - 4 days

The following configuration and scaling blocks are available for the Quantum
Platform analog management.

For detailed information on the functions, consult the Help files.

Exercise: Quantum Only Analog Scaling Configuration

This exercise is only valid for the Quantum workstations. The M340 and Premium
platforms do not have these capabilities. To complete this exercise, proceed as
follows:
Build the Analog Configuration Logic:
Step Action
1 From the Project Browser, create a new FBD section named
“Analog_Config”.
2 Change the execution sequence so that the Analog_Config section
executes first.
3 Create the following variables.
Name Type Address
AnalogIn01 ANL_IN NONE

Schneider Electric FZE, Dubai, UAE


149
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

AnalogOut01 ANL_OUT NONE


4 Program this section as shown below.

5 Analyze your changes and correct any errors.

Build the Analog Scaling Logic:

Step Action

1 From the Project Browser, create a new FBD section named


“Quantum_Analog_Scaling”.
2 Change the execution sequence so that the
Quantum_Analog_Scaling section executes second.
3 Create the following variables:
Name Type Address
QuantumScaledInput REAL NONE
4 Program this section as shown below.

Schneider Electric FZE, Dubai, UAE


150
Quantum PLC Configuration and Programming using Unity Pro - 4 days

5 Build and test this logic.


Note that the animated displays are not nearly as informative as the other
methods. Also note that no references are made to the I/O addresses using
this method.

How did you do? Consult with your instructor to verify your answers and results.
Your instructor can help you with any questions you may have.

Schneider Electric FZE, Dubai, UAE


151
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

32. Elective 2 : Security ( Optional )


Security Overview
Security in Unity takes a 2 pronged approach. You can: - Protect project sections and
DFBs from modification, viewing or both.
- Secure access to, and use of the software by assigning users with passwords and
log all none, some, or all major activities performed in the software. In this module we
will discuss all of the above subjects and perform exercises to reinforce the
information discussed.

Protecting Project Objects


The Protect option provides us with the ability to protect sections within the project.
The degree of protection can be set to read only, which will allow your to view the
logic, but not modify it; or to read/write, which will not even allow you to view the logic.
All you would be permitted to do with a read/write protected section is to download
the project.
As a separate, but related function, you may also provide protection to DFBs created
in your project. The degree of protection available is the same as that shown for the
sections.
In both cases, to protect an object you must provide a password. This password is
encrypted into the protected object, (DFB or Project), and must be used to unlock the
object.
Caution: Ensure you have an unprotected backup of the protected project or DFBs,
as recovery of a lost or forgotten password is not possible.

Exercise 1: Protecting Project Sections


To protect your logic sections in Unity you must take 2 different actions. Firstly, you
must activate the protection at the project level and supply a password. Be cautious
and ensure you have an unprotected backup available in case you lose or forget the
password. A protected Project’s password is NOT recoverable!
Secondly, you must select the appropriate protections level for each section that you
desire to be protected.
To Implement Section Protection, proceed as follows:
Activating Protection:
Step Action
1 Right – click on the project name in the Project Browser and select

Schneider Electric FZE, Dubai, UAE


152
Quantum PLC Configuration and Programming using Unity Pro - 4 days

properties.

2 From the Protection tab, select the Protection active checkbox.

3 In the Modify Password dialog, create your new password.


Don’t forget to record the password used!

Click on OK
4 In the Project properties dialog, click on OK. Protection is now activated.

Protecting a Section:

Schneider Electric FZE, Dubai, UAE


153
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Step Action
1 Right – click on the section name to be protected and select properties.

2 From the General tab, pull down the Protection list.

3 Select the appropriate protection level:


Read only: Allows you view but not modify the logic.
No read & write: Access is denied.
4 Click OK in the properties dialog and confirm the modification.

5 The section will now be displayed with a closed padlock in the Project
Browser view. If we were to go to the Project properties and turn off the
protection, the padlock symbol would show as open.

Schneider Electric FZE, Dubai, UAE


154
Quantum PLC Configuration and Programming using Unity Pro - 4 days

6 Note that the section can no longer be exported until the protection is
deactivated.

Exercise 2: Protecting DFB


Protecting DFBs is done from the DFB properties dialog. Every DFB can have
protection active. Be cautious and ensure you have an unprotected backup available
in case you lose or forget the password. A protected DFBs password is NOT
recoverable!
To protect a DFB, proceed as follows:
Step Action
1 In the Project Browser, right-click the DFB to be protected and select
Properties.

2 In the Data Properties dialog Value column, pull down the selection list for
the Protection row.

Schneider Electric FZE, Dubai, UAE


155
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Select the appropriate protection level:


Read only: Allows you view but not modify the logic.
No read & write: Access is denied.
No Modify of Version: Protects only the version number.
3 Close the Properties dialog. You will be prompted to create a password.

4 In the DFB Type Protection dialog, enter and confirm your password for this
DFB.

Click on OK.
5 As this is a project change, you must confirm the modification.

Click on Yes
6 Build your change to have this protection take effect in the controller.

Schneider Electric FZE, Dubai, UAE


156
Quantum PLC Configuration and Programming using Unity Pro - 4 days

7 The DFB will now have the lock symbol in front of its name.

Unity Pro Access Security


The Security Editor program lets you limit and control access to the software's
different functionalities. This type of protection is optional. Unity Pro access security
only configures the computer on which the software is installed and not the project,
which has its own protection system.
A log file can be used to keep a chronological record of the various operations
carried out by users with access to the software.
The Super User
The super user is the only person with rights to manage access security for the
software. The super user defines all the configurations including the names of users
who can access the software and their access rights. Only the super user can access
the security configuration without any limitation of rights. The default super user
name is Supervisor, and the default password is blank (no password).
The Super User has the following rights in the security software: (S)he can:
• create or modify the user list
• create or modify user profiles
• disable one or more users
• modify the rules for software access security
• modify his password
• reset user passwords
Users
Software users are defined in the list of users by the super user, if Unity Pro access
security is active. If your name is in the user list, you can access a software instance
by entering your name (exactly as it appears on the list) and your password.
A user has the following rights:
• access to all the software functions defined by the assigned profile
• ability to change the user password.
User Profile

Schneider Electric FZE, Dubai, UAE


157
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
The profile for a user comprises all of his access rights. It is defined by a name (2
to16 characters), an optional comment (maximum of 256 characters) and a list of
access rights. Unity Pro provides 5 preconfigured user profiles that cannot be
modified. In addition to this, the super user can create all the personalized profiles
that are required.
Preconfigured Profiles
Unity Pro provides the following 5 preconfigured user profiles:
Profile Description
ReadOnly The user can only access the project in read mode, with the
exception of the PLC address, which can be modified. He can
also copy or download the project.
Operate The user has the same rights as with a ReadOnly profile, with the
added ability to modify execution parameters (constants, initial
values, task cycle times, etc.).
Adjust The user has the same rights as with an Operate profile, with the
added ability to download a project (transfer to the PLC) and
modifying the PLC operating mode (Run, Stop, ...).
Debug The user has the same rights as with an Adjust profile, with the
added capability of using the debugging tools.
Program The user has the same rights as with a Debug profile, with the
added capability of modifying the program.

Default User Profile


When the software access security is active, the supervisor can authorize a given
user to open the software instance, without having to enter his name and password.
In that case, the user will have a default profile that has been set by the supervisor.

Log Information Generated by the Security Editor


Security editor log information is managed by the Microsoft Windows Event Viewer. If
you want to display the log information you must launch the Event viewer. Here you
can filter according to all the server sequential events.
You can use all the Event viewer functions, like sort, filter etc.
Multiple Instances
When Unity Pro executes multiple instances concurrently on the same computer,
each of these instances will grant access to the functions that were defined by the
rights of the user who created this instance.

Schneider Electric FZE, Dubai, UAE


158
Quantum PLC Configuration and Programming using Unity Pro - 4 days

However, the Unity Pro access method used (inactive security or type of active
security) is identical for all the instances.
Implementing Access Security
The security editor software tool is used to define software users and their access
rights. It also allows you to define actions which will be protected (user name and
password) and which will be stored in the log file.
The following exercises will take us through the various aspects of using this tool.
Exercise 3: Starting the Security Editor
Step Action
1 Click on Start » Programs » Schneider Electric » SoCollaborative »
Security Editor. The sign in dialog will appear as shown below.

2 Enter your name and password. Password is case sensitive.


Default Username is Supervisor and there is no password
3 Click on OK.

4 If you are a super user, the following dialog will appear, giving you full
administrative rights.

Schneider Electric FZE, Dubai, UAE


159
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

5 If you are a standard user, the following dialog will appear, giving you the
ability to view your profile or change your password.

Schneider Electric FZE, Dubai, UAE


160
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Note: the Security editor is used for more than one product. Ensure you are setting
security for the right tool, i.e. Unity Pro.
This same scenario applies to all of the setup functionality of the Security Editor. You
must ensure that you select the correct product before making any additions or
changes.

Exercise 4: Working with the Users tab


The Users tab of the Security editor dialog is where we manage all aspects of
working with users. This tab can only be accessed by a user with supervisor rights.
As with all of the editor tabs in this software, you must ensure that the first thing you
do is to have the correct product selected. The dialog is shown below.

Note the predefined users. These users cannot be modified in any way.
We will add a new user in this exercise. Proceed as follows:

Step Action
1 Click on Add. The following dialog will appear.

Schneider Electric FZE, Dubai, UAE


161
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

2 Enter the name of your choice in the User name: field. Leave the password
empty and the profile as supervisor. Your dialog should look like the one
below except for the name.

3 Click on OK to close the Add a user dialog.

4 Close the Security editor dialog saving your changes.

5 Restart the Security editor and test your new user name.
The Security editor should open with administrative rights.

Schneider Electric FZE, Dubai, UAE


162
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Exercise 5: Working with the Profiles tab


The Profiles tab of the Security editor dialog is where we manage all aspects of
working with profiles. This tab can only be accessed by a user with supervisor rights.
As with all of the editor tabs in this software, you must ensure that the first thing you
do is to have the correct product selected. The dialog is shown below.

Schneider Electric FZE, Dubai, UAE


163
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,
Note the predefined profiles. These profiles cannot be modified .We will add a new
Profile in this exercise. Proceed as follows:

Step Action
1 Click on Add. The following dialog will appear.

2 For the profile name, enter Maintenance.

3 For the “With the following:” field, leave the default.

The With the following: field pre-selects a group of rights. Click on OK.
4 Select your new profile and Click on Edit. The Edit Profile dialog will appear.

Schneider Electric FZE, Dubai, UAE


164
Quantum PLC Configuration and Programming using Unity Pro - 4 days

5 The 3 buttons under the list control the activities for each of the rights in the
list.
State On/Off: turn on or off the selected access right.
Audit Yes/No: enable or disable logging for selected item.
Confirm Yes/No: enable or disable secondary log in.
We will select all of the access rights and turn on the log function.
At the top of the list, select the top item.
6 Using the scroll bar on the right, go to the bottom of the list.

7 Press and hold the shift key and click on the bottom item in the list. The
entire list should now be selected.

Schneider Electric FZE, Dubai, UAE


165
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

8 Click on the State On/Off button. Check marks should appear on all the
items in the list.
9 Click on the Audit Yes/No button. The Audit column should change to Yes
for all items.
Note: You may have to click twice.

10 Click on OK to close the Edit profile dialog.

Exercise 6: Working with the Policies tab


The last step in implementing access security is to turn it on. This is done from the
Policies tab Again, as with the other tabs, you need to ensure that you have the right
product selected. Proceed as follows:

Schneider Electric FZE, Dubai, UAE


166
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Step Action
1 Click on the Policies tab.

Selection Description
Security Off Security is disabled. You have direct access to Unity
Pro. This is the default setting.
Security on, Security is enabled. To access Unity Pro, it is
mandatory login mandatory that you enter your name and password,
which will determine your profile.
Security on, Security is enabled. To access Unity Pro, enter your
avoidable login name and password. In this case, you will have your
user profile. You can also access Unity Pro without
entering the password. In this case, you will have the
default user profile.
Security on, no Security is enabled, but you have direct access to
login Unity Pro. The profile then is the default profile.

2 Select Unity Pro XL in the Product pull down list.

3 Select Security on, mandatory login.

Schneider Electric FZE, Dubai, UAE


167
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

4 Click in the Audit check box to turn on the logging function.

5 Click on OK to exit the Security editor.

6 Click on Yes to save your changes.

Exercise 7: Testing and Cleanup


It is now time to test your system. Proceed as follows:
Step Action
1 Start Unity Pro

2 At the login screen, enter the user name you created earlier.

Click on OK.
3 Open your project.

4 Connect to your controller.

5 Make some random changes and then restore them. This will create some
Log entries.
6 Close Unity.

7 Open the Windows Event viewer. ( Under Control Panel >> Administrative
Tools )
8 Open the Applications log.

Schneider Electric FZE, Dubai, UAE


168
Quantum PLC Configuration and Programming using Unity Pro - 4 days

9 Review the entries.

10 Close everything.

11 Start the Security editor.

12 Delete all your changes.

13 Don’t forget to turn Security off.


How did you do? Consult with your instructor to verify your answers and results.
Your instructor can help you with any questions you may have.

Schneider Electric FZE, Dubai, UAE


169
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

33. Elective 3: Unity Archive Functions


(Optional)
Overview
Unity Pro contains an option to save your project in an archive file. This function is
accessed from the file menu. The only condition for using this option is that the
project must be in the built state.
The properties of the STA file are the following:
• The STA file is very compressed (approximately 50 times more so than the
STU). It is used to transfer projects to networks (local or Internet, for example).
• The STA file can be used to transfer projects between versions of Unity Pro
software (for example, between version 2.0 and version 2.0.2 or later. For
version 1.0, only the XEF file can be used to switch to version 1.1).
• The STA file contains the entire project:
o The PLC binary,
o The Upload information: comments and animation tables,
o The operator screens.
Note: When an STA file is selected, the software provides a certain amount of
information: the project name, associated comment, version and date the project was
generated, PLC targeted by the project, and date of last modification to the source
code, as well as the version of Unity Pro used to create this archive.
Note: as the file is very compressed, loading takes much longer than for an STU file.
This is why we recommend that you use the STA file to archive the project and the
STU file as the actual work file
Exercise 1: Create an Archive file.
To archive a project in STA format, proceed as follows:
Step Action
1 Click on menu selection File » Save Archive…

Schneider Electric FZE, Dubai, UAE


170
Quantum PLC Configuration and Programming using Unity Pro - 4 days

2 Navigate to the folder where you want to store the archive file.

3 Enter the desired file name.


Note that Unity will automatically suggest the project name, but you are not
required to use it.
4 Click on Save to complete the action.
Result: The archive file will be saved.

Exercise 2: Open an Archive file.


To open an existing archive file proceed as follows:
Step Action
1 Click on menu selection File » Open…

2 From the “Files of Type:” list select .STA files

Schneider Electric FZE, Dubai, UAE


171
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

3 Select the correct file from the list.

4 Click on Open.

Exporting
The export function allows you to export part or all of your project to a file. You can
then retrieve this exported information for use in a different project using the import
function.
The export function generates a file that contains unprotected data and references to
protected data. You must define the name of this file and its location (directory), the
extension of the file is determined by the export type (for example, XDB if you export
a DFB type, etc.).
The most common exports are:
- Variable list (for use in Excel)
- Sections
- entire project.
File Extensions
All export files are ASCII text files in XML format (except for variables which have
multiple export format options).
Note: A discussion of XML coding is outside the scope of this course.
Each different type of export has it’s own extension, which indicates its origin. These
extensions are listed below.

Schneider Electric FZE, Dubai, UAE


172
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Exported Element Extension


Configuration XHW
Task XPG
Section of LD SLD
Section of IL XIL
Section of ST XST
Section of FBD XBD
Section of SFC XSF
DFB types (all or individual) XDB
DDT type (all or individual) XDD
Variables SCY/TXT/XSY/XVM
Network definitions (all or individual) XCM
Runtime Screens (all or individual) XCR
Animation Table (all or individual) XTB
Functional Module (all or individual) XFM
Entire Project XEF

Exercise 3: Exporting all Variables to Excel


To export all variables as a delimited text file that can be modified in Excel, proceed
as follows:
Note: This procedure is an offline function.
Step Action
1 Right-click on the Variables & FB Instances » Elementary Variables folder
in the Project Browser.
2 From the Context Menu, select Export…

3 From the “Save as type:” pull down list, select” Data Text file (*.TXT)”

4 Enter “Vars” as the file name.

5 Click on Export. The file will be created.

6 Start Microsoft Excel.

7 Select File » Open… from the menu or the toolbar.

8 In the Open dialog, select Text Files in the Files of type: pull down.

Schneider Electric FZE, Dubai, UAE


173
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

9 Navigate to the folder that contains your exported file and select it.

10 Click on Open. The text import wizard will open.

11 Click on Next. Ensure that Tab is selected as the delimiter.

12 Click on Next. Verify that you are at Step 3 of 3.

13 Click on the column header of the far right column in the list and select Text in
the Column data format box. See below.

14 Click on Finish.

15 The list will now open in Excel. Resize the columns to provide you with a better
view of the data.

Note that your list may look different than the one shown above.
16 Select Column E by clicking on the header, and set its Number format to Text.

Schneider Electric FZE, Dubai, UAE


174
Quantum PLC Configuration and Programming using Unity Pro - 4 days

17 Scroll to the bottom of the list.

18 Add the following items as shown below.

19 Select File » Save. Answer Yes to the Warning.

20 Exit Excel. Click on No in the Save Changes dialog.

21 That completes the exercise. We will import this file in the next exercise.

Schneider Electric FZE, Dubai, UAE


175
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Importing
The import function allows you to retrieve part or all of a project program for use in
your project. When you perform a partial import, the software asks you if you want to
save the current project. This allows you to have a pre-import version of the project.
If during an import an element with the same name is found in the project, a dialog
box allows you to choose between a number of operating modes:
· Keep: the element that is already present in the project is kept (the element with the
same name is not imported),
· Replace: the element that is already present in the project is replaced by the
imported element with the same name,
· Rename: you can change the name of the element to be imported in order to
remove the conflict.
Which of these three modes you choose depends on the element you wish to import.
Following an import, you must confirm the imported data (analysis and generation).
In fact, import works like a manual input and is not confirmed automatically.
You should note that, depending on what you import, a Rebuild All may be required.
When you select the import function from the Unity Pro menu or from an element to
be imported, various dialog boxes appear on the screen.
These dialog boxes allow you to define:
· The name of the import file,
· The location of the file,
· The type of file,
· The import option,
· The import procedures (Keep, Replace, Rename).
Note: For Variables, you can only import .XSY or .TXT files. Files in XVM and SCY
format cannot be imported

Exercise 4: Importing Variables Modified in Excel


In the previous exercise, we exported the variable list and modified it’s contents. We
will now import that modification into our project. Proceed as follows:
Note: This procedure is an offline function.
Step Action
1 Right-click on Variables & FB Instances in the Project Browser.

2 Select Import… from the context menu.

3 Select Yes to save your project.

Schneider Electric FZE, Dubai, UAE


176
Quantum PLC Configuration and Programming using Unity Pro - 4 days

4 From the “Files as type:” pull down list, select” Data Text file (*.TXT)”.

5 Navigate to the folder that contains the file you want to import and select it.

6 Click on Import, and confirm the modification.

7 In the Import Trouble Report dialog, click on Keep All.

Schneider Electric FZE, Dubai, UAE


177
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

This will ensure that we perform updates, and add new definitions, but do not
create duplicates,
8 Open the Data Editor, Variables tab. Ensure your new variables appear as
shown below.

9 Connect to your controller.

10 Build your changes.


How did you do? Consult with your instructor to verify your answers and results.
Your instructor can help you with any questions you may have.

Schneider Electric FZE, Dubai, UAE


178
Quantum PLC Configuration and Programming using Unity Pro - 4 days

34. Elective 4: Document and Print (Optional)


Comments and Descriptions
Comments and descriptions can be entered for:
• Functions and Function Blocks (FFB’s)
• Derived Function Blocks (DFB’s)
• Sections
o Specific comments
o General comments
• Project Descriptions

Exercise 1: Commenting FFBs


A comment can be entered for each FFB instance of your project. Proceed as
follows:
Step Action
1 Double click on the FFB to be documented

2 Click on ‘Comment’.

3 Enter your text.

Schneider Electric FZE, Dubai, UAE


179
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

4 The comment will appear as a tool tip when you point your mouse at the FB.

Note: This only works if the animation is turned off.

Exercise 2: Commenting Sections

There are 2 different methods for comments in sections. You can put comments right
on the graphic with the text tool, or you can provide a more general comment in the
section properties dialog. Proceed as follows:
Text on the Graphic:
Step Action
1
Click on the comment button on the toolbar.
2 Click on any open position of the section with the cursor. An empty comment
box will appear.

3 Enter your comment text into the entry dialog for specific parts of the
section.
4 Move the text freely within the Section.

5 Size the comment as appropriate. Note that the coloured area goes behind
the code.

Schneider Electric FZE, Dubai, UAE


180
Quantum PLC Configuration and Programming using Unity Pro - 4 days

Section General Comments:

Step Action
1 Right click on a Section in the Project Browser, and select properties from
the context menu.
2 Enter general section comments into the entry dialog.

Exercise 3: Commenting the Project


The project can also have a general comment attached to it. Proceed as follows:

Step Action
1 Right click on the Project title, and select Properties from the context menu.

2 Enter a general project description / comment in the comment field as


shown.

Schneider Electric FZE, Dubai, UAE


181
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Exercise 4: Adding Hyperlinks


The hyperlink function enables links to be created between your project and external
documents. You can create hyperlinks in all the elements of the project directory, in
the variables, in the processing screen objects, etc. For example, you can create a
hyperlink in the Program directory. You can also create another hyperlink in the
Sections sub-directory of the MAST task directory. In addition, you may create user
folders in most locations of the project browser to hold your hyperlinks.
Refer to Appendix A in the Unity V3.0 Operating Modes manual.
To create a hyperlink in an existing folder, proceed as follows:

Step Action
1 Right-click on the desired folder in the Project browser:

2 In the context menu, select Add Hyperlink…

3 In the Hyperlink properties dialog, enter the name you want to use for this
hyperlink in the User name: field.

Schneider Electric FZE, Dubai, UAE


182
Quantum PLC Configuration and Programming using Unity Pro - 4 days

4 In the Target Path field:


· Use the browse button to navigate to the file you wish to open when the
hyperlink is selected. Or,
· Enter the URL of an internet site you wish to open.

5 Click OK to close the dialog, and build your changes.

To open your hyperlink, proceed as follows:


Step Action
1 Double-click the hyperlink in the Project Browser.

2 The linked file or web page opens.

Generating Project Printed Documentation


Unity Pro provides the ability for you to create documentation for your project. The
subjects for documentation are displayed in a tree structure. The structure contains
all the project browser elements that were used, i.e. elements that you have not used
in the project do not appear as subjects in the documentation. In addition the
structure contains some subjects specific to printing, e.g. the title page and table of
contents. In the tree structure, you can choose which subjects you want to print or
display (print preview) and which you do not. For some subjects, parameters are
available that you can use to define the printout.
For the printout you can choose between the Structural view or the Functional view.
You can print this documentation partially or fully after it has been created.

Exercise 5: Generating Project Printouts


Step Action
1 Right click on Documentation in the Project Browser and select Open as

Schneider Electric FZE, Dubai, UAE


183
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

shown.

.
That will open the Documentation window.

2 Right-click on the project title and select “Printout Setup…”. Set your
options as required. (See Help files) then click on OK.

3 Right-click on the project title and select “Page Setup…” and configure as
required.

Schneider Electric FZE, Dubai, UAE


184
Quantum PLC Configuration and Programming using Unity Pro - 4 days

4 Expand the Project as shown, then right click on the project title and select
“Include all headings”.

The result is shown on the right above


5 Right click on the title and select “Generate Printout”. The system will now
generate the documentation.

Schneider Electric FZE, Dubai, UAE


185
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

The result is shown below.

6 Right click on the title and select “View”. The system will now display the
printout.

Schneider Electric FZE, Dubai, UAE


186
Quantum PLC Configuration and Programming using Unity Pro - 4 days

7 Once you are satisfied with the results, you can print the document.
How did you do? Consult with your instructor to verify your answers and results.
Your instructor can help you with any questions you may have.

Schneider Electric FZE, Dubai, UAE


187
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

35. Appendix A – Further Training


Next Steps in Training

Schneider Electric FZE offers a variety of technical training courses to meet your
specific training requirements. Instructor-led courses provide you with hands-on
experience, leaving you feeling confident to design and configure your own systems.
Schneider Electric training services include configuration and programming courses,
Troubleshooting and Maintenance courses on various PLC platforms and Vijeo Citect
SCADA systems

We have developed unique, step-by-step training that has proven highly effective,
and our curriculum is continually updated, enabling you to stay in step with rapidly
changing technology.

Training in the Gulf Countries

Schneider Electric FZE has state of the art training center with fully equipped lab
work stations at Dubai, United Arab Emirates. Various technical trainings are offered
in Automation, Electrical and Building Automation Products and Solutions.

● Two Training Locations


● Dubai Silicon Oasis, close to city
● Jebel Ali Free Zone, mid-way between Dubai- Abu Dhabi
● Fully equipped training rooms
● 300K$ worth of hardware
● 8 Training laptops loaded for all necessary software and simulators
● Portable kits for onsite training
● Well experienced Trainers

Schneider Electric FZE offer two kinds of Training Services

● Standard Training Modules


● Location will be Dubai
● Schedules are finalized when minimum participation available
● Participants can be from different companies
● Fees charged on per head basis

Schneider Electric FZE, Dubai, UAE


188
Quantum PLC Configuration and Programming using Unity Pro - 4 days

● Custom Training Modules


● Location can be at our office in Dubai or your site
● Schedules are at your convenience
● Participants are only from your company
● Fees charged is lump-sum per session

Training Modules
Complete details of training modules available in the training Catalogue available at our
website (http://www.schneider-electric.ae and then visit Products and Services → Training)

Schneider Electric FZE, Dubai, UAE


189
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

Schneider Electric FZE, Dubai, UAE


190
Quantum PLC Configuration and Programming using Unity Pro - 4 days

How to contact

You can visit our website: http://www.schneider-electric.ae and then visit


Products and Services → Training

You can also Email to: ae-tc-gulf@ae.schneider-electric.com

Schneider Electric FZE, Dubai, UAE


191
Quantum PLC Configuration and Programming using Unity Pro - 4 days
,

36. Appendix B – Technical Support


Customer Care Center

Why Call?
Your dedicated Customer Care team members are available to respond to questions
and concerns related to:

• Commercial – Products, Solutions, post-sales queries and claims.


• Logistics- delivery enquiry, order processing, price, availability and claims.
• Technical- catalogues, product selection or more complex questions and
claims.
• Service – intervention requests

How are Customer Care Centers organized?

The Customer Care team located in Dubai provides support to United Arab
Emirates, Qatar, Kuwait, Bahrain, Oman, Saudi Arabia, Pakistan & Yemen with
dedicated people to deliver a world class level of support, about all Schneider Electric
Offers.
Operating Hours: 8am-7pm (Saturday – Thursday)

Local level (Customer Care Center-CCC)


The first level of support in local countries resolves the commercial, logistics and
simple technical queries of the customers.
Regional level – Technical Service Centers (RTSC)
More complicated application and solution issues are quickly escalated to the
Regional Technical Service Centers. RTSC is located in Dubai and supports 30
countries in the Middle East and African region.

Global level – Global product department


Schneider Electric FZE, Dubai, UAE
192
Quantum PLC Configuration and Programming using Unity Pro - 4 days

The more complex technical queries that need R& D / manufacturing expertise are
escalated to and resolved by Global product departments.

Strong knowledge management and dedicated training programs allow the first level
of support to resolve most of the customer queries within 24 hours. So, contact your
nearest Customer Care now!

Schneider Electric FZE, Dubai, UAE


193
make the most of your energy

Contact our local offices

www.schneider-electric.com | www.schneider-electric.ae

You might also like