ReSy104 - Training [PDF]

  • 0 0 0
  • Gefällt Ihnen dieses papier und der download? Sie können Ihre eigene PDF-Datei in wenigen Minuten kostenlos online veröffentlichen! Anmelden
Datei wird geladen, bitte warten...
Zitiervorschau

ReSy104 Training

Sebastian Prus

Phoenix Contact Starter Training Agenda

PC Worx Basics IEC 60870-5-104 Basics PSI-MODEM-GSM/ETH ILC 151 GSM

PC Worx 6.30.767 Programming of Controller with IEC 61131-3

▪ IEC 61131 is a norm for the field of automation systems ▪ IEC 61131 standardizes: ▪ the programming languages ▪ the interfaces between PLC and programming system ▪ the sets of instructions and the handling and structuring of projects ▪ No firewall allowed in PC Worx ▪ Virtual machine suggested ▪ Bridge the network card ▪ Work in a safe environment

Create a new Project Open Project Wizard

Project Wizard Project name and path

Project Wizard Name and language of POU

▪ Select language up to IEC 61131-3

Project Wizard Name and type of hardware configuration ▪ Type: CPU Type of Controller ▪ ILC 1xx = eCLR ▪ ILC 3xx = ARM_L_40 ▪ ILC 4xx = IPC_40

Project Wizard Name and type of Ressource

▪ Type: PLC-Type

Indicator for firmware

Project Wizard Type of Task ▪ Default: Demanded for ReSy Systems

Project Timing

PC Worx Basics Primary Work Spaces

Bus configuration Choose the hardware: PLC / BK and the IOs

Bus configuration Establish IP address in correct ip area to your computer

IP Assign Establish IP address in correct ip area to your computer ▪ ▪ ▪ ▪

Start the BootP protocoll on your controller via hardreset Choose the PLC / BK Set correct IP parameters Your pc have to be in the same IP area

Insert a library Change path ▪ Insert the zwt file of a library to your direction just by copy and paste the file ▪ In PC Worx Press Extras >> Options >> Directories ▪ Update the Project Directory and Library Directory to the correct path ▪ Accept the changes with “Übernehmen”

Insert a library Unzip library

Insert a library ReSy104 Sample

Insert a library Compile the included Libraries of ReSy104_Sample

▪ Open the included libraries with file >> open project ▪ Start with ReSyBasic ▪ ReSy104 is settled on the ReSyBasic ▪ ReSyBasic has to be on first place of project tree (Slide before) ▪ Compile the library via STRG + F9 or “Compile Worksheet” Button (Press only F9 will not compile bus structure) ▪ Open the ReSy104 library and compile as well

Insert a library

Now we can finally insert the libraries into OUR project ☺

IEC 60870–5–104 Basics The communication SCADA

Kommunikationsstandard nach IEC 60870 – 5 Teil 104

Ethernet

DSL Modem

ILC 170 ETH ILC 170 ETH 2TX

I1

I5 I2

Order-No.: 2916532 I3 MRESET

mGuard

I9 I6

I7 I4

Q1 I10

I11 I8

Übertragungsmedium : TCP/IP

Q3 I12

Stop

RUN/PRG

RESET

Internet

PRG LNK

ACT

LNK

ACT

GSM / GPRS

ILC 150 GSM/GPRS ILC 170 ETH 2TX

I1

I5 I2

Order-No.: 2916532 I3 MRESET

RESET

PRG LNK

ACT

LNK

ACT

I9 I6

I7 I4

Stop

RUN/PRG

I1

I5 I2

Order-No.: 2916532 I3

Q3 I12

ILC 170 ETH ILC 170 ETH 2TX

Q1 I10

I11 I8

PSI-Modem GSM/ETH

MRESET

PSI-MODEM-GSM/ETH Ord.-No. 27 08 630

V C R C T D D A N L D E R S C T ID M

AN T

RESET

PRG

A V AP A N L C N T K

LNK

ACT

LNK

ACT

I9 I6

I7 I4

Stop

RUN/PRG

Q1 I10

I11 I8

Q3 I12

IEC 60870–5–104 Basics Why remote control standards?

▪ You are absolutely shure, that the datas will be transmitted and received ▪ If the connection is not established, the datas will be stored in Buffers, till the connection is valid again or the Buffer is full ▪ Efficient data traffic ▪ Event orientated ▪ Standardized objects

IEC 60870–5–104 Basics Commands – Objects

SCADA

ILC 370 PN 2TX

Funktionsbaussteine in Command Objects Befehlsrichtung 45 - 64 45 - Single Command 46 - Double Command 47 - Step Command 48 - Set Point Norm 49 - Set Point Scaled 50 - Set Point Float 51 - Set Point Bit String 58 - Single Command CP5

Telegramme

Objects

Befehlsrichtung

Meldungsrichtung

. . . 64 - Set Point Bit String CP5

Spezielle Special Objects Funktionsbausteine 70 - Initialisierungsende 100 - Generalabfrage 103 - Uhrzeitsynchronisation

Funktionsbaussteine in Measure Objects Meldungsrichtung 1 - 35

Remote Terminal Interface RTI - Leitzentrale SCADA

Remote Terminal Unit RTU - Unterstationen Substation

ILC 150 GSM/GPRS ILC 170 ETH 2TX

I1

I5 I2

Order-No.: 2916532 I3 MRESET

RESET

PRG LNK

ACT

LNK

ACT

I9 I6

I7 I4

Stop

RUN/PRG

Q1 I10

I11 I8

Q3 I12

1 - Single Point 3 - Double Point 5 - Step Position 7 - Bit String 9 - Measured Norm 11 - Measured Scaled 13 - Measured Float 15 - Integrated Totals 19 - Measured Norm WQ 30 - Single Point CP5

. . . 35 - Integrated Totals CP5

ReSy104 Basics Project structure 104 topology

Remote Terminal Interface RTI -SCADA Leitzentrale ILC 370 PN 2TX

Gesamtstruktur eines communication between Projekts - Kommunikation the function blocks via zwischen den Bausteinen ConnectionPoint

Connect Manager

Link Manager

ILC 150 GSM/GPRS ILC 170 ETH 2TX

I1

I5 I2

Order-No.: 2916532 I3

MRES ET

I9 I6

I7 I4

I10 I11

I8

Objekt Manager

Q1 Q3 I12

Stop RUN/ PRG RESE T

P R G LN K

AC T

LN K

AC T

Remote Terminal Unit RTU - Substation Unterstationen

Daten Objekte

ReSy104 Basics Create a new 104 project

1.

2.

Open Configuration Open the ReSy104 Group in Edit Wizard

3.

Insert Connect, Link and Object Manager in the correct order

Rename and Insert a new Worksheet

ReSy104 Basics Parameters for the 104 Connection Manager ▪ All INOUT-Variables have to be connected in PC Worx ▪ State is just to look for Processes ▪ You can take the name of the Functionblock without INOUT_ L is for Local, SR for the Data Type: Structure Link- and Object Manager has State, too>> LSR_StateConnMg ▪ The variable: LSR_ConnectionPoint has to be connected to Connect- Link- and Object-Manager and to all the used Objects RTU: Substation

If only 1 RTI: SCADA should have access >> FILTER

ReSy104 Basics ReSy104 Link Manager ▪ Same variable to INOUT_LSR_ConnectionPoint ▪ Any variable to INOUT_LSR_State ▪ Pre-settings for GPRS-Network: T0=T#60s, T1=T#30s, T2=T#90, T3=T#200s

ReSy104 Basics Object Manager

▪ Create a global variable

ReSy104 Basics Handle Global Variables

▪ Global variables can be transferred from one to another task ▪ The variable is now instanced in the ReSy104 program and underneath the global variables of the ressource

ReSy104 Basics Insert a Software Clock on your PLC

▪ Include the master clock out of the ReSyBasic library as a program instance into your default task ▪ The clock instance always have to be on the first place of instances

ReSy104 Basics Time

▪ Now we got a global time on the PLC ▪ All programs could be connected to and work with one time ▪ The ClockMaster provides the advantages of a soft- and hardware-clock ▪ Softclock is more exact than the quartz ▪ Hardclock provides the last stored time after power cut ▪ Other features like slow motion of time if time sync jumps into past or fast motion if time sync jumps into future: for process automation etc.

ReSy104 Basics Create a SinglePoint

▪ Insert new Code Worksheet in the program ReSy104 ▪ Name: SinglePoint ▪ Open the Worksheet

▪ Include a 104 SinglePoint Object ▪ Choose the Group ReSy104 in Edit Wizard ▪ Include the functionblock: ReSy104_MxSpxSinglePo into the worksheet by drag and drop ▪ All measured 104 objects will start with: ReSy104_Mx ▪ Datas will be transferred from RTU to RTI ▪ Substation to SCADA

▪ Connect the SinglePoint POU to ConnectionPoint of Connect-, Link- and ObjectMg

ReSy104 Basics Create a SinglePoint

▪ Connect INOUT_LSR_ParameterState to any local variable ▪ Over this variable you will be able to check the state parameters in the watchwindow ▪ IN_LUSI_ObjectType: ▪ Connect to a static value ▪ Static value >> Name: UDINT#1 >> SinglePoint without timestamp ▪ Static value >> Name: UDINT#30 >> SinglePoint with timestamp ▪ IN_LUDI_Adress… will be given by SCADA system ▪ INOUT_LX_SpiValue ▪ Connect to a boolean variable

ReSy104 Basics Create a SinglePoint

ReSy104 Basics

Object Types – Monitoring: RTU >> RTI Name

Connected datatype

APDU

APDU

No timestamp

with timestamp

ReSy104 POU Name

Single Point

BOOL

1

30

ReSy104_MxSPxSinglePo…

Double Point

2 x BOOL

3

31

ReSy104_MxDPxDoublePo…

Bit String

DWORD

7

33

ReSy104_MxBOxBitString…

REAL

9

34

ReSy104_MxMExNorm…

INT

11

35

ReSy104_MxMExScaled…

Measured Float

REAL

13

36

ReSy104_MxMExFloat…

Integrated Totals

Counter

15

37

ReSy104_MxITxIntTotal…

Measured Normalized Measured Scaled

ReSy104 Basics

Object Types – Command: RTI >> RTU Name

Connected datatype

APDU

APDU

No timestamp

with timestamp

ReSy104 POU Name

Single Command

BOOL

45

58

ReSy104_CxSCxSingleCo…

Double Command

2 x BOOL

46

59

ReSy104_CxDCxDoubleCo…

Step Command

2 x BOOL

47

60

ReSy104_CxRCxStepCo…

Command normalized

REAL

48

61

ReSy104_CxSExNorm…

Command Scaled

INT

49

62

ReSy104_CxSExScaled…

REAL

50

63

ReSy104_CxSExFloat…

DWORD

51

64

ReSy104_CxBOxBitStrin…

Command Float Bit String

Change 104 Storage Object Manager

▪ 24 byte per value ▪ Without changes in ReSy104 library: ▪ Max = 100

Change 104 Storage Object Manager

▪ IF you only use objects with timestamp ▪ RingBuffer for objects without timestamp can be changed to its minimum of 1 ▪ Connect variables or static values with a value of 1 to the not needed storage-types of 104 Object Manager ▪ Open the included 104 library of your project and open the Datatype: ReSy104_UserRegisterpara ▪ Change the storage values in Datatype due to the Object Manager

▪ Compile and open your Project again ▪ Compile the project

Save your project Object Manager

▪ File >> Save Project As / Zip Project As ▪ Datatype: Zipped Project Files (*.zwt) ▪ If you want to transfer the Project to another Computer ▪ Only include Zip User-Libraries ▪ Create a Backup ▪ Zip without libraries ▪ Delete and include the once used libraries to the unzipped file ▪ Save storage ▪ You do not have to compile each library again ▪ One central library path!

Download project to controller ▪ Enter Project Control Dialog ▪ Stop the running project ▪ Reset the controller ▪ Cold-start ▪ Close Project Control Dialog!!!

Debug mode ▪ Enter Debug mode while press the Debug button ▪ Open Watch Window while press Watchwindow button ▪ Insert Variables with right click on variable: ▪ Add to Watch Window

▪ Overwrite boolean variable with opposite ▪ Double click on variable in watch window>> press „Overwrite“

▪ Check if Single Point with timestamp was created ▪ Add ParaState1 to Watch Window

Open the ReSy104_...sample.mwt ▪ Change the Controller…. ▪ Right click on the Controller ▪ Replace ▪ Select the correct Controller ▪ Bus configuration and IEC programming will be changed