Welcome To All Participants: Plastics Machinery

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 78

Factory automation

Plastics Machinery
Training Institutes
Group of Companies Educational Institutes

WELCOME TO ALL
PARTICIPANTS
WHAT IS SCADA?
Supervisory
Control
And
Data
Acquisition
WHY SCADA IS REQUIRED?
SCADA
It generally refers to an industrial control system: a computer system
monitoring and controlling a process

EXAMPLE:
 Machinery.
 Telecommunications.
 Water and Waste control.
 Energy.
 Oil and Gas refinery.
 Process Industries like Sugar, Cement, Paper, Pharma
A SCADA Systems usually consists
following sub systems:

Human Machine Interface(HMI):


It is a operator which presents process data to a human operator and
through this human operator monitor and control the process.

A supervisory (Computer) system, gathering (acquiring) data on the


process and sendind commands (Controll) to the process.

Remote terminal Unit (RTUs):


Connecting to sensors in the process converting sensor signals to digital data to the
supervisory system.

Communication:
Infrastructure connecting the supervisory system to the remote terminal
units.
Configuration of SCADA system
Point- to- Point Configuration
Data is exchanged between two stations (1:1)

PLC
Work station

SCADA
Master

RS 232
PC

PC PORT: RS 232 PLC PORT: RS 232


Configuration of SCADA system
Point to Multi Point Configuration
One master unit several slave units (1:n)
Slave PLC-1

Work station

SCADA Slave PLC-2


Master

PC
Slave PLC-3

PC PORT: RS 232
SUPERVISORY STATION
Supervisory Station Components
• PC/Servers
• Software for communicating with field equipment PLCs, etc,
• HMI’s with software running on workstations in control room

Simple SCADA system


-Master station is composed of single PC
Larger SCADA systems
The master station includes multiple servers
Distributed software applications
Disaster recovery sites.
Note : To increase integrity of system multiple servers will be configured in a
dual-redundant or hot-standby formation providing continuous control and
monitoring in the event of a server failure.
• .
COMMUNICATION PROTOCOL

SCADA Protocols
1. Send information to the master station.
2. Information is stored when master station polls the PLC.

Standard SCADA Protocols


Modbus, Ethernet, Profibus,Conitel.

Note:
Communication protocols are SCADA vendor specific but are
widely adopted and used.
MODBUS PROTOCOL
Modbus
1. It is a serial communication protocol published by
modicon for use with its PLCs.
2. This protocol is on of the standard and most commonly
used serial protocol in industrial communication.
3. It allows for communication between many devices
connected to a same network.
Example devices that measure Temperature, Humidity
will communicate the data / results to PLC.
Modbus is used to connect PLC in SCADA with Supervisory
computer .
DATA ACQUISITION IN SCADA
Data Acquisition:
-Trough PLC’s , sensors, HMI
Data Analysis :
-Data is compiled and formatted
-Formated Data displayed on HMI / PC
-Supervisory decision done to override normal controls.

Data Analysis Representation:


- Historical Report
- Database Management system
- Trending and another Analytical auditing.
DATA STORAGE IN SCADA

Storage of Data :
- In the form of Tags or points.
- Tag can be “Hard or Soft”
(Hard- Direct I/P, O/P Soft-Memory areas).

- Other fields like path to a field device.


Design time comments and alarm information can
also be stored.
Application Examples Overview
LEARNING HOW TO CONFIGURE

 PC and PLC Port configurations.


 Connections and Protocols
 What is Tag.
 Parameters for PLC tags.
 Interface between PLC Data Registers and SCADA.
 Types of Command Buttons.
 Screen Development.
PC and PLC Port Configurations for SCADA

PC – WE CAN USE THE STANDARD RS232C PORT / Ethernet


OF PC TO CONNECT TO THE PLC

• The following are the minimum requirement for PC


• Pentium 100 MHz or superior
• Memory 16 MB (32 MB recommended)
• SVGA Monitor(800 x 600, 256 colors or superior)
• Microsoft Windows 95 / 98 / Millenium/ XP or NT
• 1 Serial port. and one Parallel Port if Hard Key is given for running
the program. The Hard key can be USB also for latest
configurations.
STEPS FOR PLC CONFIGURATION

 PLC should have a dedicated port to connect to SCADA equipment.


It can be a RS232C/RS485/RS422/TCP-IP (LAN) depending on
length and exchange of data.

 A protocol has to be chosen for communication.


EXAMPLE: Modbus protocol

 The port setting and parameters of both PLC and PC with the chosen
protocol are to be matched then only both the devices can
communicate on a common platform.
Communication Parameters setting for Modbus
Protocol in PLC with NEXGEN

• The Modbus RTU FB library is designed to configure the on-


board serial ports of Nexgen series CPUs as Modbus protocol
port.
• Various PLC CPU’s in Nexgen series, provide additional
serial ports with open protocol feature. The Modbus RTU
library FBs are compatible with all these ports and extends the
facility of handling these ports with minimum configuring
parameters.
Communication Parameters setting for Modbus
Protocol in PLC with NEXGEN

• Port 1
This is basically used as a programming port when connected to
CoDesSys. Alternatively,it can also be used in open protocol
mode also.

• Port 2
This port is used as port with open protocol.

• Port 3
This port is used as port with open protocol.
Configuring Of MODBUS_RTU_SLAVE FB
MODBUS_RTU_SLAVE

TRUE RUN STATUS


1 PORT REPLIES
1 SNO
COMSET ERROR COUNT

This FB handles serial communication with Modbus RTU Protocol as


slave device. The RTU slave FB is useful to communicate with any
external master PLC, SCADA or DCS systems.
RUN:
The FB will operate the specified port as RTU Slave ,when this
Input is TRUE. Other wise command processing is skipped.
PARAMETERS OF FUNCTION BLOCK
PORT:
This input byte holds communication port number to be activated with Modbus RTU
slave FB.
It should contain constant value of 1 or 2 or 3 for Port1 , Port2, Port3 respectively.
Any other value will be invalid.
SNO:
This input byte holds the station number.
Valid range is from 1 to 247.
For invalid number above 247,FB is not executed.
COMSET:
This is input variable of user defined data type RTU _COMSET.
It is a 16 Bit Word and defines communication parameter settings like Baud rate,
Parity, No.Of Data Bits, No. Of Stop Bits, HandShake Etc.
Baud rate: Speed of Data Transmission (bps = bits per second).

Parity: An error detection scheme that uses an extra checking bit, call the
parity bit to allow the receiver to verify that the data is error free.
PARAMETERS OF FUNCTION BLOCK

STATUS:
This input byte holds the status of execution.

Status.0 This bit is TRUE when port is opened successfully with


communication parameter assigned.
Status.1 This bit is TRUE if checksum error is observed in
recent reception.
Status.2 This bit is TRUE if time out of 1sec is observed in
recent reception.

REPLIES:
This word holds number of healthy replies send to the commands from master.
After 65535 , value rolls over to 0.

ERR COUNT:
This word holds number of errors occurred like received time out; transmit time out or
checksum error , received from master.
After 65535 value rolls over to 0.
User should take proper action.
Comset Word Description
• RTU_ComSet
• This is user defined data type provided in Modbus library. The
definition of this user defined data type along with default values is
as shown below.
• TYPE RTU_ComSet :
STRUCT
ComSet : WORD:=16#773;
TX_delay : BYTE := 4;
RX_Delay :BYTE := 0;
Time_out : TIME:= t#500ms;
RetryCount : BYTE:=1;
END_STRUCT
END_TYPE`
• First member of ComSet defines basic communication parameters. The table for
ComSet explains the communication parameter settings for FBs ‘RTU_SLAVE’.
16#703 (HEX) REPRESENTS 9600BPS,8-Databits,1Stopbit,Odd
Parity. Other Baud rates can be chosen depending on application and values
are as per the table below
Comset Word Description
Comset Word Description
Comset Word Description
STEPS FOR CONFIGURING PC
STEP-1:
Load the SCADA Software
STEP-2 :
Choose the protocol and driver files required for communicating
to the PLC
STEP-3:
Choose the Physical Layer that is the connection type between PC and
PLC. Ex : RS232C/ RS485/ RS422 /TCP-IP
Note: Data between PLC and PC will be transmitted via the Physical
layer at the transmission rate choosen in Communication / driver
parameters. The Protocol links the data by Memory Mapping the
addresses which is understood both by the master and the slave for
interpreting the data to the SCADA system software and PLC
SCADA SOFTWARE
Elipse pro is the software used with messung PLC for
implementing the SCADA package.

It uses the Modbus protocol to communicate with PLC.

The function block for linking the PLC to Elipse software is


Modbus_RTU_SLAVE.

The Parameters related with the protocol on the PLC and


SCADA side are described below.
Communication Parameters In SCADA
• PLC and SCADA Package Communicate on a common
Platform with tags vide Specified Protocol for which some
parameters are to be set.

• Some of the important parameters can be categorized as


follows
– Driver/Communication Parameters (P1…P4)
– PLC Tag Parameters (N1----N4)
– Tag Block Parameters (B1---B4)
WHAT IS A DRIVER? & ITS
FUNCTION
DRIVER:
It Allows communication with data acquisition equipment.
It will be in the form of a DLL file.
Note: “.DLL” file should be in the same path as application

ITS FUNCTION:
It Allows to get Data into the Tags Configured in the application
based on the function choosen i.e Read /Write Register or
Coil .
DRIVE PARAMETER SETTING IN
SCADA FOR NEXGEN PLC
ELIPSE SCADA:
Select the application created or new application and choose
the organizer to select the driver.

Configure new driver and select the required Modbus DLL file
for the given PLC in the driver location using browser.

Configure the parameters to match to that of PLC.


Driver Parameters In Elipse SCADA
Driver "P" Parameters

• P1: Communication port


= 1: COM1
= 2: COM2
= n: COMn

• P2: Parity (see Table 1) + Baud rate (see Table 2)


Example:
= 61: 9600 bps (60, from Table 2) and Odd Parity (1, from Table 1)

• P3: Data bits (see Table 3) + Stop bits (see Table 4)


Example:
= 18: 8 Data bits (8, from Table 3) and 1 Stop bits (10, from Table 4)

• P4: Time-out, in milliseconds


= 1000: 1 s
= n: n ms
Driver Parameters In Elipse SCADA
• Table 1 - Parity
Value Parity
0 No parity
1 Odd
2 Even

• Table 2 - Baud rate


Value Baud rate (bps)
0 110
10 300
20 600
30 1200
40 2400
50 4800
60 9600
70 19200
80 28800
90 38400
Driver Parameters In Elipse SCADA
• Table 3 - Data bits
Value Databits
7 7
8 8

• Table 4 - Stop bits


Value Stopbits
10 1
20 2
Driver Parameter in Elipse SCADA

EXAMPLE:
P1 P2 P3 P4
1 61 18 500

P1:
It is communication port select com1 if standard RS232C port of pc is used or
any other number depending on the connection.

P2:
It is baud rate selection 61 indicates a baud rate of 9600 kbps and odd parity .

P3:
No of data bits this should be 8-data bits and 1-stop bit.

P4:
Time for declaring that no connection was established.
Driver Parameters in SCADA
TAGS
The supervision of a process with Elipse SCADA occurs
through the reading of process variables in the field.

EXAMPLE:
Motor ON/OFF Push button,
Pressure of Hydraulic pump,
Temperature of oil etc.
Note : The values of these variables are associated to
objects of the systems through tags.

To each object inserted on screen, we should associate


at least a tag or attribute.

Tags are all variables (Numeric or alpha numeric) involved in


a application.
TAGS

• When creating tags, the user can freely organize them in groups
• Groups help in a way as to facilitate search and identification during the
process of configuration.
• Tthe creation of a group, just select the Tags item in the Organizer, and
click New Group.

• When you press the New Tag button, a window will appear.
Define the tag name,
The quantity of tags
The type of tags.
All tags specified in the Quantity field will be of the same type defined in the
Tag Type field.
TAGS

Note : Commonly used tags are PLC tags or BLOCK tags


PLC TAGS
• The PLC Tag is used in order to exchange information with
data acquisition equipment i.e. PLC by using I/O drivers –
MODBUS.DLL supplied by Elipse depending on the type of
equipment.
• “N” Parameters It allows the configuration of parameters of
“N” address for current Tag according to the selected driver
• The driver file also to be given in addition to the “N”
Parameters for each tag
• Note: Expand bits…option available which allows
dismembering the Tag in bits, by creating Bit Tags for each bit
or group of bits in the Tag.
PLC BLOCK Tags

• Block Tags are used in order to simultaneously


read a block of values. Block Tags allow block
communication with data acquisition equipment
by using I/O drivers supplied by Elipse
depending on the type of device
• Each element of Block tag has its properties,
which can be accessed by selecting the desired
element in the application tree in Organizer.
• Note: Expand bits…It allows dismembering the
Tag in bits, by creating Bit Tags for each bit or
group of bits in the Tag.
Parameter “N” For PLC Tags and “B” for
PLC Block tags
N: Addressing parameter for PLC Tags.
N1: CPU Addressing (Station number).
N2: Sequential number of the function created in "Extra..." dialog .
N3: Not used.
N4: Variable address (PLC Memory Address)
Addressing Parameters "B" for Block Tags
B1: CPU Address
B2: Sequential number of the function for read/write created in "Extra..." dialog
B3: (Not used)
B4: Variable address

N1: 1- Station -1
B1: 1- Station -1
N2:, B2: are Modbus Functions defined in Extras of driver Communication Page
Note: Modbus functions are same for PLC tag and Block tag. Funtions depend only on
protocol.
MODBUS FUNCTIONS ARE USED TO READ AND WRITE
PLC DATA
Modbus functions
In the Modbus page are described the Modbus functions which are set in the N2/B2
parameters of the tags. For each Function code must be specified one function for
Read and other for Write, and also the data type, which is being dealt with, and the
field size.
The Modbus functions are as follows:
Read
01 - Read Coil Status (0x)
02 - Read Input Status (1x)
03 - Read Holding Registers (4x)
04 - Read Input Registers (3x)
07 - Read Exception Status
20 - Read General Reference (6x)
Write
05 - Force Single Coil (0x)
06 - Preset Single Register (4x)
15 - Force Multiple Coils (0x)
16 - Preset Multiple Registers (4x)
21 - Write General Reference (6x)
MODBUS FUNCTIONS
Data Types are to be specified for each function selected. Different
Data Types are as Follows
Char: 8-bit data, character.
Byte: unsigned 8-bit word.
Int8: signed 8-bit word.
Int16: signed 16-bit word.
Int32: signed 32-bit word.
Word: unsigned 16-bit word.
Dword: unsigned 32-bit word.
Float: 32-bit floating-point value (4 bytes in the order: EXP F2 F1 F0)
Double: Real 64-bit.
String: multiple 8-bit chars (text).
BCD: 8-bit value in BCD format (Binary Coded Decimal).
Size: The data format size must be informed, which depends on data
type used. Example: Dword and float have size equals 4. String types,
on the other hand, have variable sizes that depend on the specific size
of the expected text.
Example Of Modbus Function
FUNC READ WRITE DATA SIZE
01 03 06 WORD 02
02 03 06 DWORD 04
03 03 16 FLOAT 04
04 01 05 BYTE 01
Explanation : Read -03 Read Holding Registers
Read -01 Read Coil
Write -06 preset single register
Write -16 preset multiple register
Write -05 Force single Coil
Modbus Function Using “Extra”
“N” Parameters for PLC Tags
“B” Parameters for BLOCK Tags
Variable address
• The variables supported by RTU_SLAVE
FB are mapped in such a way that entire
range of PLC variables of Nexgen
Processor can be accessed with Modbus
protocol. The variables I (Input), Q
(Output) and M (Marker) are mapped as
0nnnn (coils), 1nnnn (input bits), 3nnnn
( input registers) and 4nnnn ( holding
registers). The table below shows the
memory mapping of PLC variables.
Variable address MAPING TO PLC
Variable address
Function Code For Variable address
EXAMPLE OF VARIABLE / MODBUS
ADDRESS FOR DATA REGISTERS
IF PLC REGISTERS MW0 – MW6 ARE TO BE USED IN
SCADA FOR READING PLC STATUS OR UPDATATION
OF VALUES THEN THE N4 OF PLC TAG PARAMETERS
ARE TO BE GIVEN AS SHOWN IN TABLE

SL # PLC TAG MODBUS


ADDRESS (N4)
1 MW0 00000
2 MW2 00001
3 MW4 00002
4 MW6 00003
Cont….
Modbus Functions And “N” Parameters for PLC Tags
The following functions are to be declared in driver
configuration of scada in EXTRA dialog
FUNC READ WRITE DATA SIZE
01 03 06 WORD 02
02 03 06 DWORD 04
03 03 16 FLOAT 04
04 01 05 BYTE 01
TO READ/WRITE THE PLC HOLDING REGISTERS MW0-MW6
THE FOLLOWING ARE TO BE SET IN “N” PARAMETERS
N1 N2 N3 N4
1 4 0 0 PLC TAG1 (Read And Write %MB0)
1 1 0 1 PLC TAG2 (Read And Write %MW2)
1 2 0 3 PLC TAG3 (Read And Write %MD6)
WITH FUNCTION-4 WE CAN SET %MX0.0 - %MX0.7
DEVELOPING APPLICATION IN SCADA

 Types of Command Buttons.


 Screen Development.
 Properties & Methods
 Data Base (Store the data)
 Browser,report generation and print formats.
 Alarams.
 Events.
 Login, Logout and Administrative PASS WORDS etc….
Screens and Attributes
• A Screen can be defined as a window for the
monitoring of a process.
• Each application can have an unlimited number of
Screens.
• A new Screen is created by pressing the New
Screen button in the Toolbar
• We can define Screen Objects, a background
drawing (Bitmap), and other specific
characteristics.
• Each screen that is created for the application
appears below the Screens option in the
application tree in Organizer.
• When selecting a specific screen, its properties
are shown on the right side of the tree.
General Properties Of Screen
General Properties of Screen
Style Properties of Screen
Screen Objects
• When the programmer is developing application, it
needs to show some result, make an alert, or receive
information and actions from the user. This interaction
with the user happens through what we call interface.
To build up the interface of application, Elipse SCADA
offers a series of features called “Screen Objects”.

• Screen objects are graphic elements and


representations of real objects in the process. The
screen objects are organised in two categories:
visualization and interaction objects. Screen objects
can be created from the Objects toolbar There are
some scripts available for all screen objects
Visualization Objects
• Text The Text object allows the attribution of
messages at intervals of tag values, called Zones.
Several zones can be defined, each one of them
containing its own message.
• Display : The Display object is used to show tag
values in real time.
• Browser : The Browser object allows viewing your
database files. In order to browse files, they should be
of .DAT (Historic or Alarms) or .HDR (Batch)
extensions.
• Bitmap : The Bitmap object allows the insertion of
images, figures or drawings in the screens of your
application, as long as they are in BMP, GIF or JPEG
format.
• Animation :The Animation object is an easy way of
creating an animation by using images (bitmaps)
associated to frames defined by the user, which are
shown in sequence. A Tag should be associated to
the animation, so that the Tag value determines what
animation frame will be shown.
Visualization Objects
• Bar Graph : The Graph of Bars is used when
wanting to view data in the form of volume.
• Gauge : The Gauge object is very useful in order
to show variables with analog results, working as a
continuous meter. Scaling values and properties of
gauge can be defined by the user, besides their
position on screen, which can vary in 0, 90, 180 or
270 degrees in rotation.
• Trend : This object is used to view a trend graphic
with up to 16 tags. The graphic is constantly
refreshed as the process evolves and tag values
change.
Interactive Objects
• Slider : This object is used to read or write values in
a selected Tag. You can attribute values to the
selected Tag by sliding the potentiometer (sliding
button), or by using the direction arrows in the
extremities of the Slider. The value will vary
according to a Scaling that is defined in the object.
• Button : This object is used for activations or
executions of tasks specified by the user through
the mouse or keyboard, and its operation is equal to
the Windows standard buttons. The activation of
• buttons also generates events that can be treated
by Scripts. Buttons are very flexible, and can be
widely set through the pages of properties.
• Setpoint : The Setpoint object works as an editing
box of Windows; thereby, it is just enough to type a
value and press [Enter] to attribute this value to the
associated tag.
Interactive Objects
• Alarms : The Alarm object allows the verification of
active or registered alarms (“logged”) in the alarm
file. Alarms can be triggered when values of
associated tags are verified in four situations and
different priorities: LoLo (critically low), Low, High,
HiHi (critically high). Outside these ranges, tag
values are considered as normal.
ALARMS
• The Alarms option in the application tree of
the Organizer allows the definition of some
characteristics for the management of
system Alarms. You can specify a file where
to record all alarms that will occur in your
system, as well as setting up sounds and
alert messages.
ALARMS
HISTORIC
• The Historic object allows the storage of the
variation of data of a process with time, then
enabling future analysis.
• Historic can be generated in two different ways: in
a Continuous way, or in Batches. In the
continuous way, the Elipse SCADA stores data
continuously during the execution of the
application. With the form of batches, the historic
is made in lots.
• The page of general Historic properties appears
on the right side of the Organizer when we click
the Historic item in the application tree.
HISTORIC
HISTORIC ANALYSIS
• When a Historic is created, Elipse SCADA
automatically associates a Historic Analysis
(HAnalysis) object to it. This object has several
characteristics that can be adjusted in execution
time.
• When the HAnalysis is called, a Historic window is
open in your application, showing the Analysis
page with the graph for the analysis of data.
• Analysis
• The Analysis page shows the graph of HAnalysis,
and allows the setting of variables to be shown in it.
It has features of zoom, scroll, and printing, which
can be accessed by means of the toolbar located in
the inferior part of the window.
HISTORIC ANALYSIS
REPORTS
• Reports allow the printing of data of Historic or
Alarms files, or even tag values in real time. You
can define a Report in the Organizer during the
configuration of the application
• There are four types of Reports available:
Text: prints data of historic or alarms files in text
format;
Graph: prints data of historic or alarms files in
graphic form;
Formatted: used to print data in real time, as for
example the value of a Tag in a given moment;
HAnalysis : it is a report on screen that has within
it a graphic report.
REPORTS
SETTINGS FOR REPORTS
QUERY
• Allows the definition of a time interval in order to
select the data of the file to be printed.
DATABASE
• The Report Database page appears when the
Database tab is selected on top of the Text
Report pages.
SCRIPTS
• Scripts are small procedures written in
programming language – Elipse Basic allowing
more flexibility to application.
• Elipse Basic, is very similar to C languages,
• Scripts are procedures associated to events
• Scripts Needed for generating Excel File, Print
File etc.
• Scripts Used for Logging into application,
generating users etc.
SCRIPT -APPLICATION LOGIN
To Login to application User Name and Password
can be provided by associating one button with
the following script--- Event “On Button Release”
IF (Application.userName <> "ME1")
Application.Login()
ENDIF
IF (Application.userAccessLevel >= 2)
Screen2.Button1.enabled == 1 (“button screen”)
Screen1.Activate() (“Goto Screen Name”)
Else
Screen2.Activate() (“Remain in same screen”)
Screen2.Button1.enabled == 0
MessageBox("Access Denied")
ENDIF
SCRIPT -APPLICATION LOGOUT
To Logout of application a Button can be provided
with the following script--- Event “On Button
Release”
IF MessageBox('EXIT TO MAIN ?',
'Confirmation',04h)==06h
WATER_TANK.Button1.enabled == 1
Screen2.Activate() (“to Logout Screen”)
Application.Logout() (“ to ask for Password Again”)
Else
WATER_TANK.Button1.enabled == 0
WATER_TANK.Activate() (“remain in same screen”)
MessageBox("Access Denied")

• ENDIF
SCRIPT - Printing
To Print to File / Excel Sheet
To save graph as bitmap
HTrend2.Plotter.SaveBitmap("HTrdP.bmp", 800, 500, 1)
To save report as Excel file
Report.description = ""
Report.description = "BATCH NUMBER :" +
BATCH_NUMBER.description + " " +
"CYLINDER NUMBER : " + CYL_NUM.description +
Format('dd/mm/yy hh:mm:ss',GetTime())
Report.PrintToFile("Report_1.xls",1,Chr(9))
To Print to a printer
Report.Print()3
THANK YOU TO ALL
PARTICIPANTS AND KEEP ON
UPDATE THE KNOWLEDGE

THE END

You might also like