Welcome To All Participants: Plastics Machinery
Welcome To All Participants: Plastics Machinery
Welcome To All Participants: Plastics Machinery
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:
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
Work station
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
SCADA Protocols
1. Send information to the master station.
2. Information is stored when master station polls the PLC.
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.
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).
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
• 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
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.
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.
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.
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.
• 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
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
• 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