Sie sind auf Seite 1von 42

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

Ethernet Kommunikationsstandard
nach IEC 60870 – 5 Teil 104

DSL Modem
Übertragungsmedium : TCP/IP
ILC 170 ETH
mGuard
ILC 170 ETH 2TX I1 I5 I9 Q1
Order-No.: 2916532 I2 I6 I10
I3 I7 I11 Q3
MRESET
I4 I8 I12

Stop

RUN/PRG

RESET

PRG

LNK ACT Internet


LNK ACT

GSM / GPRS

PSI-Modem
ILC 150 GSM/GPRS GSM/ETH ILC 170 ETH

ILC 170 ETH 2TX I1 I5 I9 Q1 ILC 170 ETH 2TX I1 I5 I9 Q1


Order-No.: 2916532 I2 I6 I10 Order-No.: 2916532 I2 I6 I10
I3 I7 I11 Q3 I3 I7 I11 Q3
MRESET MRESET
I4 I8 I12 I4 I8 I12
PSI-MODEM-GSM/ETH
Stop Ord.-No. 27 08 630 Stop

RUN/PRG
V AN RUN/PRG

RESET C T RESET
R
C
T
D
PRG
D PRG

LNK ACT A LNK ACT

A
N
L
V
AP
D
E
R A
S N
L
C
T C
ID N
T LNK ACT
LNK ACT
M K
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

Command Objects
Funktionsbaussteine in
Befehlsrichtung 45 - 64 Remote Terminal Interface Measure Objects
Funktionsbaussteine in
Meldungsrichtung 1 - 35
RTI - Leitzentrale
SCADA
45 - Single Command 1 - Single Point
46 - Double Command 3 - Double Point
47 - Step Command 5 - Step Position
48 - Set Point Norm Telegramme 7 - Bit String
49 - Set Point Scaled Objects 9 - Measured Norm
50 - Set Point Float Befehlsrichtung Meldungsrichtung 11 - Measured Scaled
51 - Set Point Bit String 13 - Measured Float
58 - Single Command CP5 15 - Integrated Totals
. 19 - Measured Norm WQ
. 30 - Single Point CP5
. .
64 - Set Point Bit String CP5 .
Remote Terminal Unit
RTU - Unterstationen
.
Substation
35 - Integrated Totals CP5

Special Objects
Spezielle
Funktionsbausteine
ILC 150 GSM/GPRS

70 - Initialisierungsende ILC 170 ETH 2TX

Order-No.: 2916532

MRESET
I1

I3
I2

I4
I5

I7
I6

I8
I9

I11
I10

I12
Q1

Q3

100 - Generalabfrage RUN/PRG


Stop

RESET

103 - Uhrzeitsynchronisation PRG

LNK ACT

LNK ACT
ReSy104 Basics
Project structure

104 topology
Gesamtstruktur
communication eines
between
Remote Terminal Interface
Projekts - Kommunikation
the function blocks via
RTI -SCADA
Leitzentrale
zwischen den Bausteinen
ConnectionPoint
ILC 370 PN 2TX

Connect Manager

Link Manager

ILC 150 GSM/GPRS Objekt Manager


ILC 170 ETH 2TX I1 I5 I9 Q1
Order-No.: 2916532 I2 I6 I10
MRES I3 I7 I11 Q3
ET I4 I8 I12

Stop

RUN/
PRG

RESE
T

P
R
G LN AC
K T

LN AC
K T

Remote Terminal Unit


RTU - Substation
Unterstationen
Daten Objekte
ReSy104 Basics
Create a new 104 project

Open Configuration
2. Open the ReSy104
Group in Edit Wizard
Rename and
Insert a new
1. Worksheet

Insert Connect,
3. Link
and Object Manager
in the correct order
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 APDU APDU ReSy104 POU Name


No timestamp with timestamp
datatype
Single Point BOOL 1 30 ReSy104_MxSPxSinglePo…
Double Point 2 x BOOL 3 31 ReSy104_MxDPxDoublePo…
Bit String DWORD 7 33 ReSy104_MxBOxBitString…
Measured REAL 9 34 ReSy104_MxMExNorm…
Normalized
Measured INT 11 35 ReSy104_MxMExScaled…
Scaled
Measured Float REAL 13 36 ReSy104_MxMExFloat…
Integrated Totals Counter 15 37 ReSy104_MxITxIntTotal…
ReSy104 Basics
Object Types – Command: RTI >> RTU

Name Connected APDU APDU ReSy104 POU Name


No timestamp with timestamp
datatype
Single BOOL 45 58 ReSy104_CxSCxSingleCo…
Command
Double 2 x BOOL 46 59 ReSy104_CxDCxDoubleCo…
Command
Step Command 2 x BOOL 47 60 ReSy104_CxRCxStepCo…
Command REAL 48 61 ReSy104_CxSExNorm…
normalized
Command INT 49 62 ReSy104_CxSExScaled…
Scaled
Command Float REAL 50 63 ReSy104_CxSExFloat…
Bit String DWORD 51 64 ReSy104_CxBOxBitStrin…
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

Das könnte Ihnen auch gefallen