SCADA2013_ChauTruong

50
An object An object An object An object- - -oriented design oriented design oriented design oriented design approach for SCADA kernel approach for SCADA kernel approach for SCADA kernel approach for SCADA kernel approach for SCADA kernel approach for SCADA kernel approach for SCADA kernel approach for SCADA kernel

Transcript of SCADA2013_ChauTruong

Page 1: SCADA2013_ChauTruong

An objectAn objectAn objectAn object----oriented design oriented design oriented design oriented design approach for SCADA kernelapproach for SCADA kernelapproach for SCADA kernelapproach for SCADA kernelapproach for SCADA kernelapproach for SCADA kernelapproach for SCADA kernelapproach for SCADA kernel

Page 2: SCADA2013_ChauTruong

AuthorAuthor

Truong Truong Truong Truong DinhDinhDinhDinh ChauChauChauChau, , , , Ph.DPh.DPh.DPh.D

Ho Chi Ho Chi Ho Chi Ho Chi MinhMinhMinhMinh City Univ. of Tech.City Univ. of Tech.City Univ. of Tech.City Univ. of Tech.

[email protected]@[email protected]@hcmut.edu.vn

[email protected]@[email protected]@me.com

(+(+(+(+84848484) () () () (0000))))91919191. . . . 543543543543----74747474----40404040

linkedin.com/in/truongdinhchau

Page 3: SCADA2013_ChauTruong

TopicsTopics

� Overview of SCADA software in industrial market

� Design principle of SCADA kernel

� A hierarchical object model of SCADA kernel

� Description of objects in the kernel� Description of objects in the kernel

� Approaches for connection with control devices

� Hierarchical technique

� Serialization

� “Soft” link between components in the kernel

� Simple demos on several Protocols

Page 4: SCADA2013_ChauTruong

Objectives

� Have a glance inside structure of SCADA software

� Understand working mechanisms of components in

SCADA software

� Understand connection mechanisms of SCADA

software with control devices

� Be able to assess a SCADA software

� Be able to choose a SCADA software for your

project

Page 5: SCADA2013_ChauTruong

Demo

Page 6: SCADA2013_ChauTruong

SCADA Overview: Functions

� Information data acquisition from controllers located in the low level

� Saving the obtained data in storages

� Processing of obtained information

� Graphical interpretation

� Receiving command from operator and transfer them � Receiving command from operator and transfer them to controllers

� Event registration regarding to control process and personal actions

� Prevention or notification about events and alarms

� Reporting

� Data exchange with enterprise automated control systems

� Direct automatic control of processes

Page 7: SCADA2013_ChauTruong

SCADA Overview: Keywords

� Graphics displays, tools >>� Tag >>� Alarms, Events� Trends: Real-time, historical >>� Report >>� I/O driver, I/O server >>� I/O driver, I/O server >>� Protocol supports: Process centric & Remote centric >>� Real-time, Multitasking >>� Openness, Scalability, Data access, Database >>� Networking, Client/server distributed processing >>� Fault tolerance, Redundancy, Communication recovery

>>

Page 8: SCADA2013_ChauTruong

Functions of the Kernel

The developed Kernel of the system solves and consists of some key tasks, techniques and properties:

� Configuration a project and serialization into XML format

� Serialization the project configuration from XML format and running the project

� Techniques for connection of SCADA with control devices

� Real-time and multitasking

� Data access

Page 9: SCADA2013_ChauTruong

Design principle

Illustration: XML file

Page 10: SCADA2013_ChauTruong

Component of the Kernel

Illustration: AnalogInput.cs

Page 11: SCADA2013_ChauTruong

Hierarchical Architecture of Kernel

Illustration: Project file structure

Page 12: SCADA2013_ChauTruong

Approaches for connection with control devices

Illustration: Devices

Page 13: SCADA2013_ChauTruong

Hig

her

level

obje

ct

space

I/O Device ADevice A

Direct driversDirect drivers

Hig

her

level

obje

ct

space

SCADA

Device B

Device C

I/O Device B

I/O Device C

Illustration: Modbus Device

Page 14: SCADA2013_ChauTruong

I/O Device ADriver A - DLL

Genera

l part

Direct driversDirect drivers

UserC/C++/C#

code

SCADA

Specific part

Driver B - DLL

Driver C - DLLGenera

l part

(EX

E) I/O Device B

I/O Device C

Page 15: SCADA2013_ChauTruong

bool Config(){

. . .}

bool Reconfig(){

. . .

Tag

Tag

EXEDLL

DLL approach

. . .}

float ReadAnalogInput(int Channel){

. . .}

bool WriteAnalogInput(int Channel, float Data){

. . .}

Tag

Tag

Tag

DAQ Tasks

Page 16: SCADA2013_ChauTruong

bool Config( ){

. . .}

bool Config( )

Tag

Tag

EXE DLL

Tag

Tag

DLL approach

bool Config( ){

. . .}

Run( ){

. . .}

Tag

Tag

Tag

DAQ TasksTag

Tag

Tag

Page 17: SCADA2013_ChauTruong

bool Config(){

. . .}

bool Reconfig(){

Tag

Tag

EXEDLL

Tag

Tag

DLL approach

{. . .

}

float Read( DWORD Channel){

. . .}

bool Write(DWORD Channel, float Data){

. . .}

Tag

Tag

Tag

DAQ Tasks Tag

Tag

Tag

DAQ Tasks

Page 18: SCADA2013_ChauTruong

Connect with DDE Servers

Illustration: Connect with Excel cells

Page 19: SCADA2013_ChauTruong

Connect with OPC Servers

Group 2

SCADA

Server 2

Group 1Group 2

SCADA

Server 1

Group 1

PC

Access,

Co

mm

un

ica

tio

n r

ec

ov

er

y

Item 2

Item 1Item 1

Device 1

Tag 1 Tag 2 Tag 3

Device 2

Tag 1 Tag 2

Item 3

Item 2

Item 1Item 1

OPC

Serv

er

Illu

str

ation: C

onnect

OFS, S7-200 P

CA

ccess

Page 20: SCADA2013_ChauTruong

Component Task

Illustration: Task.cs

Page 21: SCADA2013_ChauTruong

Component Display

Illustration: AnimationSymbol.cs, Display.cs

Page 22: SCADA2013_ChauTruong

Hierarchical technique

Illustration: MySCADA.Liquidate(), …

Page 23: SCADA2013_ChauTruong

Serialization

Illustration: SCADA.Serialize(), …

Page 24: SCADA2013_ChauTruong

“Soft” link technique

Page 25: SCADA2013_ChauTruong

“Soft” link technique

Illustration: Runtime Tag remove

Page 26: SCADA2013_ChauTruong

Network supports

Illustration: C# Modbus TCP/IP Client>>

Page 27: SCADA2013_ChauTruong

Appendix: I/O Tag quantity and Price

DescriptionDescriptionDescriptionDescription EuropEuropEuropEurop. Ref. Price. Ref. Price. Ref. Price. Ref. Price USD Ref. PriceUSD Ref. PriceUSD Ref. PriceUSD Ref. Price

Vijeo Citect, Full, 75 Points Removed Removed

Vijeo Citect, Full, 150 Points Removed Removed

Vijeo Citect, Full, 500 Points Removed Removed

Vijeo Citect, Full, 1500 Points Removed Removed

Vijeo Citect, Full, 5000 Points Removed Removed

Vijeo Citect, Full, 15000 Points Removed Removed

Vijeo Citect, Full, Unlimited

PointsRemoved Removed

<<

Page 28: SCADA2013_ChauTruong

Appendix: Graphics interfaces, tools

Run applications:

� GeniDAQ as a simple SCADA software

� Intouch: easily to develop an application

� Citect uses Symbols, Genie and SuperGenie

� PowerLogic SCADA for electrical distribution

ClearSCADA: Vector graphic� ClearSCADA: Vector graphic

<<

Page 29: SCADA2013_ChauTruong

Appendix: Realtime and HistorycalTrends

Run applications:

� Realtime and Historical Trends with GeniDAQ,

� Realtime and Historical Trends with Intouch,

� Realtime Trend and Process Analyst with Citect

<<

Page 30: SCADA2013_ChauTruong

Appendix: Reports

� ASCII report in Citect >>

� HTML report in Citect >>

� Excel report in Citect >>

<<

Page 31: SCADA2013_ChauTruong

Appendix: I/O Drivers and I/O Servers

� DLL files in GeniDAQ >>

� DLL files in Citect >>

� Intouch: DDE-oriented

� RSView32: DDE, OPC -oriented

� ClearSCADA: Telemetry-oriented

<<

Page 32: SCADA2013_ChauTruong

Appendix: Process centric & Remote centric

Page 33: SCADA2013_ChauTruong

Appendix: Process centric & Remote centric

Page 34: SCADA2013_ChauTruong

Appendix: Modbus vs. DNP3

•Traditionally, protocols are based on Master and Slave relationship;

•The Master sends a request, the slave response;

•For large IO networks, data payload is huge and response time could be

slow.

RTU Poll

iSCS Software

The Polling ProcessThe Polling ProcessThe Polling ProcessThe Polling ProcessMaster and Slave RelationshipMaster and Slave RelationshipMaster and Slave RelationshipMaster and Slave Relationship

RTU

1 32 4 5 6 7 8

Status Points

1 32 4 5 6 7 8

Poll

1 32 4 5 6 7 8

Poll

1 32 4 5 6 7 8

Poll

Page 35: SCADA2013_ChauTruong

Appendix: Modbus vs. DNP3

•When a network is large, if the communication medium is serial, the time

before each controller is polled may be long.

Slow Cycle TimeSlow Cycle TimeSlow Cycle TimeSlow Cycle TimeThe larger the network, The SlowerThe larger the network, The SlowerThe larger the network, The SlowerThe larger the network, The Slower

request

response

response

response

request

request

Page 36: SCADA2013_ChauTruong

Appendix: Modbus vs. DNP3

Slow Cycle Time could result in Missed EventsSlow Cycle Time could result in Missed EventsSlow Cycle Time could result in Missed EventsSlow Cycle Time could result in Missed Events

•Suppose the Master is not polling only one slave but many, there is a high

chance that high speed events will be missed.

Missed EventsMissed EventsMissed EventsMissed EventsBlind to Fast Changing EventsBlind to Fast Changing EventsBlind to Fast Changing EventsBlind to Fast Changing Events

PollRTU

iSCSSoftware

3

Status of 3 Changed

1 32 4 5 6 7 8

1 32 4 5 6 7 8

Poll

During this period, master is polling other slaves on same media.

33

NOT Detected!!

PACs

Page 37: SCADA2013_ChauTruong

Appendix: Modbus vs. DNP3

•With process protocols, because of cycle polling, all status or measured

changes are detected by SCADA at the same time;

•The time in which the alarm occurs on screen is not the true time of the

event change on location.

Event TimeEvent TimeEvent TimeEvent TimeInaccurate Sequence of EventsInaccurate Sequence of EventsInaccurate Sequence of EventsInaccurate Sequence of Events

Fuel Pressure Low Alarm

Pump Overheat Alarm

Coolant Pressure Low

Fire Alarm

All hell broke loose at 14:44:33.

Polling request at 14:47:00

Polling response at 14:47:01

Which occurred First??

Page 38: SCADA2013_ChauTruong

Appendix: Modbus vs. DNP3

•Process protocols relies heavily on network high availability;

•Suitable for closed industrial environment;

Reliance on NetworkReliance on NetworkReliance on NetworkReliance on NetworkSuitable for Process and small Locale OnlySuitable for Process and small Locale OnlySuitable for Process and small Locale OnlySuitable for Process and small Locale Only

Page 39: SCADA2013_ChauTruong

Appendix: Modbus vs. DNP3

•Process protocols not recommend to be used with network that offers

limited bandwidth and intermittent connections;

•High disconnection rate of network will result in data loss;

•Limited bandwidth will caused device communication timeout.

Reliance on Network Reliance on Network Reliance on Network Reliance on Network Not suitable for Unstable NetworkNot suitable for Unstable NetworkNot suitable for Unstable NetworkNot suitable for Unstable Network

GPRS/EDGE/3G

Page 40: SCADA2013_ChauTruong

Appendix: Modbus vs. DNP3

Not automatic backNot automatic backNot automatic backNot automatic back----fillingfillingfillingfilling

Data

Data logged in RTU during transmission loss is not back-filled in SCADA

when communication resumes

Time

Page 41: SCADA2013_ChauTruong

Appendix: Modbus vs. DNP3

Telemetry Protocol BehaviourTelemetry Protocol BehaviourTelemetry Protocol BehaviourTelemetry Protocol Behaviour

•With such protocols, Slaves interrupts the master immediately when there is

change;

•This is known as unsolicited messages in DNP or balanced mode in IEC.

Event UpdatesEvent UpdatesEvent UpdatesEvent UpdatesSlaves interrupt MastersSlaves interrupt MastersSlaves interrupt MastersSlaves interrupt Masters

SCADARTU 1

RTU 2

3

Status of 3 Changed

3

33

3

5

Status of 5 Changed

5

5

Page 42: SCADA2013_ChauTruong

Appendix: Modbus vs. DNP3

Event PollingEvent PollingEvent PollingEvent Polling

•Where unsolicited or balanced mode is not suitable, we can set the

communication to behave like in a traditional master-poll-slave mode;

•The uniqueness of telemetry protocol is, we can poll for changes. We do not

need to poll all points, this reduces bandwidth consumption greatly.

Event Poll Response. Event Poll Response. Event Poll Response. Event Poll Response. Bandwidth SavingsBandwidth SavingsBandwidth SavingsBandwidth Savings

1 32 4 5 6 7 8

Poll

Poll

Poll

1 32 4 5 6 7 8

1 32 4 5 6 7 87 Res

Res

Res

5

Tim

e

Page 43: SCADA2013_ChauTruong

Appendix: Modbus vs. DNP3

Telemetry Protocol with Time StampsTelemetry Protocol with Time StampsTelemetry Protocol with Time StampsTelemetry Protocol with Time Stamps

•DNP, IEC-101 and IEC-104 protocol supports timestamps to help build an

accurate sequence of events.

Sequence of Events. Sequence of Events. Sequence of Events. Sequence of Events. Time StampingTime StampingTime StampingTime Stamping

Fuel Pressure Low Alarm

14:43:03 658 msec

Pump Overheat Alarm14:43:03 225 msec

Coolant Pressure Low14:42:45 238 msec

Fire Alarm14:40:17 445 msec

All hell broke loose at 14:44:33.

Page 44: SCADA2013_ChauTruong

Appendix: Modbus vs. DNP3

Automatic backAutomatic backAutomatic backAutomatic back----fillingfillingfillingfilling

Data

• Data logged in RTU during transmission loss is back-filled in SCADA when

communication resumes

• Illustration on ClearSCADA and M340 RTU

Data

Time

<<

Page 45: SCADA2013_ChauTruong

Appendix: Realtime. Multitasking

� Reatime and Multitasking in GeniDAQ

<<

Page 46: SCADA2013_ChauTruong

Appendix: Data access

� Excel connects with Citect

� Excel connects with Intouch

� Intouch connects with Citect

<<

Page 47: SCADA2013_ChauTruong

Appendix: Distributed Architecture

<<

Page 48: SCADA2013_ChauTruong

Appendix: Distributed Architecture

Alarm Server

Trend Server

Clie

nt

Report Server

Individual tasks may be enabled on a single

server or distributed using a Client/Server

architecture

<<

I/O ServerTrend Server ClientAlarm ServerReport Server

Trend Server

Clie

nt

I/O Server

Page 49: SCADA2013_ChauTruong

Appendix: Fault tolerance.Communication recovery

●Divide on zero in GeniDAQ

●Divide on zero in Intouch

●Divide on zero in Citect

●Citect communicates with S7-200 via direct driver●Citect communicates with S7-200 via direct driver

● Intouch communicates with S7-200 via OPC Server

●Citect communicates with S7-200 via OPC Server

<<

Page 50: SCADA2013_ChauTruong

Click to edit Master title style<<

Thank you for your attention••