scada*system* - telemark university...

29
HansPe(er Halvorsen, M.Sc. SCADA System myRIO Air Heater Or Web Service?

Upload: lydien

Post on 27-Mar-2018

242 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Hans-­‐Pe(er  Halvorsen,  M.Sc.  

SCADA  System  myRIO  

Air  Heater  

Or  Web  Service?  

Page 2: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Lab  Topics  

•  Supervisory  Control  and  Data  AcquisiFon  (SCADA)  

•  Control  Theory,  PID  Control  •  OPC  •  Database  Systems  (SQL  Server),  SQL  •  LabVIEW  •  Industrial  IT  and  Network  Infrastructure  

2  

Page 3: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Hardware  

3  

Air  Heater  

myRIO  

The  following  Hardware  will  be  used:  

Page 4: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

SoSware  

4  

LabVIEW  SQL  Toolkit  

Matrikon  OPC  Server  for  SimulaFon  

The  following  SoSware  will  be  used:  

LabVIEW  Real-­‐Time  Module  

LabVIEW  myRIO  Toolkit  

Used  for  Programming  &  CommunicaFon  with  the  myRIO  device  

Page 5: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Assignment  Overview  

5  

Create  the  following  SCADA  System:  

See  next  slides  for  more  details...  

Or  Web  Service?  

Page 6: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Assignment  •  The  SCADA  system  should  contain  4  different  parts:  

1.  A  Database  that  stores  all  the  necessary  data  2.  Control  System  3.  Datalogging  System  4.  Alarm  System  

•  Note!  They  should  be  implemented  as  separate  applicaFons  because  they  should  be  able  to  run  on  different  computers  in  a  network.  

•  By  default  we  will  use  LabVIEW  to  create  our  SCADA  system,  but  if  you  like  you  can  use,  e.g.,  C#  to  implement  one  or  more  of  these  applicaFons,  e.g.,  ASP.NET  is  appropriate  for  the  the  Alarm  system.  

See  next  slides  for  more  details...  6  

Page 7: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

SCADA  

7  

PLC  DCS  

SCADA  

SCADA  (Supervisory  Control  And  Data  AcquisiFon)  is  a  type  of  industrial  control  system  (ICS)  

Industrial  control  systems  are  computer  controlled  systems  that  monitor  and  control  industrial  processes  that  exist  in  the  physical  world.  

Industrial  control  systems,  like  PLC  (Programmable  Logic  Controller),  DCS  (Distributed  Control  System)  and  SCADA  (Supervisory  Control  And  Data  AcquisiFon)  share  many  of  the  same  features  

e.g.,  DeltaV  

e.g.,  Siemens  Step  7  

e.g.,  LabVIEW  DSC  

Theory  

Page 8: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Database  System  

Hans-­‐Pe(er  Halvorsen,  M.Sc.  

Part  1  

Design  &  Implement  a  Database  for  your  SCADA  system  

Page 9: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Database  RecommendaFons  

9  

Tag  Configura7on:  The  TAG  table(s)  could  e.g.  have  the  following  columns:  •  TagId  (int,  Primary  Key,  IdenFty)  •  TagName  (varchar)  •  ItemId  (varchar)  •  ItemUrl  (varchar)  •  DescripFon  (varchar)  •  Etc.  

Tag  Data:  Create  one  or  more  tables  used  for  logging  the  Tag  Values  into  the  Database.  The  following  fields  are  important  for  an  OPC  Item:  •  ItemId  •  Value  •  Timestamp  •  Status  (e.g.,  “AcFve”,  “Not  AcFve”)  •  Quality  (e.g.,  “Good”,  “Bad”)  •  etc.  

Alarm  Configura7on  &  Alarm  Data:  Important  fields  in  an  alarm  handling  system  could  be:  •  Alarm  id  •  AcFvaFon  Fme  •  Acknowledge  Fme  •  Type  of  alarm  •  Tag  •  Alarm  limit  •  Text  descripFon  •  etc.  

Here  are  some  examples  of  funcFonality  of  the  SCADA  system  and  informaFon  that  could  be  stored  in  the  Database.  

Page 10: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Database  RecommendaFons  

10  

The  alarm  system  will  be  responsible  for  the  warnings  and  the  alarms  in  a  monitoring  and  control  system.  An  alarm  system  contains  different  Alarms  and  Warnings  like:  •  Timeout;  no  input  from  a  sensor  or  

another  computer  system  within  a  specific  amount  of  Fme,  

•  High  High  (HH)  or  Low  Low  (LL)  alarm;  a  criFcal  alarm  condiFon,  

•  High  (H)  or  Low  alarm  (L)  •  I/O  device  errors  •  System  device  errors  •  etc.  Make  sure  your  alarm  tables  and  system  can  handle  these  kinds  of  alarms  and  warnings.  

An  Alarm  System  use  different  Alarm  devices,  such  as  •  Screen;  display  the  alarms  •  Keyboard;  alarm  operaFons  •  Horn;  indicate  an  acFve  alarm,  or  

security  alarm  •  Lamp;  indicate  an  acFve  alarm,  or  

an  acFve  alarm  by  blinking  and  an  acknowledge  alarm  by  a  steady  light  

•  Printer;  logging  of  the  alarm  states  •  SMS  •  E-­‐mail  •  Etc.  Make  use  of  one  or  more  of  these  alarm  devices  in  your  Alarm  Handling  and  Management  System.    

Page 11: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Control  System  

Hans-­‐Pe(er  Halvorsen,  M.Sc.  

Part  2  

Air  Heater  myRIO  

Page 12: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

App1:  Control  System  

•  Create  an  ApplicaFon  in  LabVIEW  that  controls  the  Air  Heater  Temperature.  Use  standard  PI(D)  control.    

•  You  need  to  create  a  HMI  (Human  Machine  Interface)  for  your  applicaFon.  

•  The  process  data  should  be  sent  to  an  OPC  Server.  You  should  write  the  Control  Signal  (u)  and  the  Process  Value  (y)  to  the  OPC  Server  

12  

Page 13: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

LabVIEW  

13  

PID  Control  

HMI  

OPC  

•  Your  HMI  should  consist  of  different  symbols,  like,  e.g.,  pumps,  pipes,  etc.  

•  You  may  want  to  use  the  LabVIEW  DSC  (Datalogging  and  Supervisory  Control)  pale(e  in  LabVIEW  in  order  to  create  your  own  HMI.  

•  Alarm  funcFonality  should  be  included  in  the  HMI  

 

This  is  just  an  example  to  illustrate  a  typical  HMI  

Page 14: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Write  to  OPC  Server  using  LabVIEW  

Or  specify  URL  directly:  

1 2 3 4

14  

While  Loop  

While  Loop  

Page 15: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Datalogging  System  

Hans-­‐Pe(er  Halvorsen,  M.Sc.  

Part  3  

Page 16: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

App  2:  Datalogging  System  

•  Create  an  applicaFon  in  LabVIEW  that  reads  the  values  from  the  OPC  Server  and  store  them  in  the  SQL  Server.  

•  Use,  e.g.,  the  LabVIEW  SQL  Toolkit  

16  

Page 17: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Read  from  OPC  Server  using  LabVIEW  

Or  specify  URL  directly:  

1 2 3 4

17  

While  Loop  

While  Loop  

Page 18: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Alarm  System  

Hans-­‐Pe(er  Halvorsen,  M.Sc.  

Part  4  

Page 19: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

App  3:  Alarm  System  

•  The  Alarm  System  should  check  for  Alarms  and  saves  the  Alarm  informaFon  in  your  Database.    

•  In  addiFon  you  should  have  a  User  Interface  that  shows  the  Alarms.  

•  You  could  implement  Alarm  Logging  in  your  SCADA  system  by  using  a  Database  Trigger  on  the  table  that  stores  the  Tag  Data.  

19  

Page 20: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Alarm  System  

•  Create  an  Alarm  ApplicaFon  that  shows  all  the  alarms  in  the  system.    

•  The  operator  should  be  able  to  see  the  alarms  and  make  some  acFons  to  these  alarms,  i.e.  the  operator  should  have  the  possibility  to  Acknowledge  Aarms,  Show  Alarms  with  different  PrioriFes,  etc.  

20  

Page 21: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Alarm  System  

21  

Simple  Alarm  System  Example:  

Note!  This  is  just  a  simple  example  in  order  to  illustrate  the  basic  funcFonality  in  such  a  system.  You  should  design  your  own  Alarm  System  with  HMI.  

Page 22: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Network  

Hans-­‐Pe(er  Halvorsen,  M.Sc.  

Typically,  the  different  parts  in  a  SCADA  system  are  distributed  in  a  network  

Page 23: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

23  

Network  

If  you  want  to  connect  all  of  your  computers  together,  you  will  need  to  use  a  networking  device.  While  routers  are  the  most  common  networking  opFon,  a  network  switch  is  a  less  expensive  choice  that  can  work  just  as  well.  Although  a  network  switch  lacks  the  built-­‐in  firewall  of  a  router,  it  is  a  more  than  adequate  choice  for  most  small-­‐scale  networks  in  a  home  or  office  sejng.    

Page 24: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

OPC  Server  

Visual Studio

App #1

App #3

24  

OPC  Network  Example  

App #2

Network  with  Switch/Router  

Database  

SQL  Server  

Page 25: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

What  is  VirtualizaFon?  •  VirtualizaFon,  in  compuFng,  refers  the  act  of  creaFng  a  virtual  (rather  than  actual)  version  of  something,  including  but  not  limited  to  a  virtual  computer  hardware  plalorm,  operaFng  system  (OS),  storage  device,  or  computer  network  resources.    

•  Hardware  virtualizaFon  or  plalorm  virtualizaFon  refers  to  the  creaFon  of  a  virtual  machine  that  acts  like  a  real  computer  with  an  operaFng  system.    

•  In  hardware  virtualizaFon,  the  host  machine  is  the  actual  machine  on  which  the  virtualizaFon  takes  place,  and  the  guest  machine  is  the  virtual  machine.  

[Wikipedia]    25  

Page 26: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

VirtualizaFon  SoSware  

A  lot  of  VirtualizaFon  SoSware  exists.  Here  are  some  examples:  •  VMware  Player  •  VMware  WorkstaFon  •  VMware  vSphere  •  VMware  Fusion  (Mac)  •  Parallells  Desktop  (Mac)  •  MicrosoS  Hyper-­‐V  •  VirtualBox  •  etc.    

26  

Page 27: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

VMware  Player  VMware  Player  is  for  personal  use  on  your  own  PC.  VMware  Player  is  free  of  charge  for  personal  non  commercial  use.      

27  

VMware  is  a  company  that  has  been  specializing  within  virtualizaFon  soSware.  h(p://www.vmware.com    

Page 28: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

OPC  in  Network  •  OPC  uses  COM/DCOM  -­‐>  Complicated  to  make  it  work  in  a  modern  Network!!  

•  SoluFon:  Use  an  OPC  Tunneller  SoLware  – OPC  Tunneller  from  MatrikonOPC  (30  days  free  trial)  – Cogent  DataHub  Tunnelling  SoSware  (Trial  soSware  works  only  1  hour,  then  needs  to  be  restarted)  

28  

Page 29: SCADA*System* - Telemark University Collegehome.hit.no/~hansha/documents/subjects/SCE4206/lab/scada/SCADA... · AssignmentOverview* 5 Create*the*following*SCADA*System:* See*nextslides*for*more*details...*

Hans-­‐PePer  Halvorsen,  M.Sc.  Telemark  University  College  Faculty  of  Technology  Department  of  Electrical  Engineering,  Informa7on  Technology  and  Cyberne7cs  

   E-­‐mail:  [email protected]  Blog:  hPp://home.hit.no/~hansha/    

29