Vous êtes sur la page 1sur 27

Clock synchronization in PLCs

TECHNICAL PROPOSAL
for
PLC 1ms time stamping

J. Brahy AB/CO-IS
Clock synchronization in PLCs

• SIMATIC METHOD (Siemens only)


• NTP
• NTP with pulse synchronization
• Dedicated time distribution with pulse
synchronization
• External time stamping (spare solution)

J. Brahy AB/CO-IS
Clock synchronization in PLCs
SIMATIC method NTP method NTP and pulse
synchronization Dedicated clock
Distribution and
pulse synchronization

Master Server Server

Send-Receive
Time message

Slave Client Client

Siemens
PLC only

J. Brahy AB/CO-IS
Clock synchronization in PLCs

Solution 1

SIMATIC METHOD

J. Brahy AB/CO-IS
Clock synchronization in PLCs
SIMATIC method for Siemens PLCs

Entering date time in SICLOCK

Proprietary GPS
SICLOCK time distribution system
<1 ms accuracy
DCF77

IRIG-B
TrueTime

J. Brahy AB/CO-IS
Clock synchronization in PLCs
SIMATIC method for Siemens PLCs

Sending date time from SICLOCK

Unlimited number
- Collision detection of slaves with
- VLAN-Tagging for
Multicast or Broadcast
high priority through
bridges/switches
Ethernet

Up to 20 slaves

J. Brahy AB/CO-IS
Clock synchronization in PLCs
Clock synchronization in Siemens PLCs family
SICLOCK

Ethernet

Ethernet
synchronization
1 mS not (yet?) available

S7 300
S7 400 S7 400

MPI :10 mS

PROFIBUS

1 mS 1 mS

Decentralized I/O
S7 400 ET 200M
J. Brahy AB/CO-IS
Clock synchronization in PLCs
SIMATIC method for Siemens PLCs

Time synchronization Ethernet message structure : SNAP protocol

Name Size Comment


(bytes)
Destination address 6 Mac address
Source address 6 Mac address
Length 2 Length telegram
DLSAP 1 “SNAP” SAP (AA)
SLSAP 1 “SNAP” SAP (AA)
Control 1 03
OUI 3 Organization Unique Identifier (08 00 06)
type 2 Manufacturer defined (01 00)
Time 4 Time (mSec resolution)
Date 2 Date
Status 1 1 Status 1
Status 2 1 Status 2

J. Brahy AB/CO-IS
Clock synchronization in PLCs
SIMATIC method for Siemens PLCs

Advantages
- Accuracy
- Easy to implement
- Nothing to program in the PLCs

Disadvantage
- Protocol not supported in CERN networks
- To be install on the PLC segment
- Price

J. Brahy AB/CO-IS
Clock synchronization in PLCs

Solution 2

NTP METHOD

J. Brahy AB/CO-IS
Clock synchronization in PLCs
NTP method

NTP
Server

Ethernet

Siemens : Available Schneider : Available


Spring 2003

NTP Clients

J. Brahy AB/CO-IS
Clock synchronization in PLCs
NTP method
Comparaison IP-TIME-1 & Siclock Comparaison IP-TIME-2 & Siclock

14,00
35,00

12,00
30,00

10,00 25,00

8,00 20,00

6,00 15,00

4,00 10,00

2,00 5,00

0,00 0,00
1
5
9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89

1
5
9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
Comparaison TRUETIME & Siclock Comparaison Siclock NTP & Siclock

3,50 1,50

3,00 1,00

2,50 0,50

2,00 0,00

13

17

21

25

29

33

37

41

45

49

53

57

61

65

69

73

77
1,50 -0,50

1,00 -1,00

0,50 -1,50

0,00 -2,00
1

11

16

21

26

31

36

41

46

51

56

61

66

71

76

81

86

-0,50 -2,50

-1,00 -3,00

-1,50 -3,50

J. Brahy AB/CO-IS
Clock synchronization in PLCs
NTP method

Comparison Siclock SNAP protocol / Siclock NTP protocol

Siclock SNAP protocol Siclock NTP protocol


Comparaison Siclock & Siclock Comparaison Siclock NTP & Siclock

2,50 1,50

1,00
2,00
0,50
1,50
0,00

13

17

21

25

29

33

37

41

45

49

53

57

61

65

69

73

77
1,00
-0,50

0,50 -1,00

0,00 -1,50
1
5

9
13
17
21

25

29
33
37
41
45
49

53
57
61

65
69

73
77
81
85

-2,00
-0,50
-2,50
-1,00
-3,00
-1,50
-3,50

J. Brahy AB/CO-IS
Clock synchronization in PLCs
NTP method

Advantages
- Easy to implement
- Free
- Nothing to program in the PLCs (to be checked
for Schneider)

Disadvantage
- Lower accuracy (up to now)

J. Brahy AB/CO-IS
Clock synchronization in PLCs

Solution 3

NTP METHOD
and pulse synchronization

J. Brahy AB/CO-IS
Clock synchronization in PLCs
NTP method and pulse synchronization

NTP
TrueTime Server Reference time

Ethernet PLC time

NTP time
NTP Clients

TrueTime pulses

Disadvantage : error between NTP clock


Level adapter & isolation
Setting and next sync. pulse

Hardware pulse distribution

J. Brahy AB/CO-IS
Clock synchronization in PLCs
NTP method and pulse synchronization
< 1ms
SIEMENS Event input
CPU module
Time synchronization
Unique Interrupt Process event 1
routine
1st instruction
Process event 2

Process event 3

Events separation difficulty

ms

Process event Time synchronization

J. Brahy AB/CO-IS
Clock synchronization in PLCs
NTP method and pulse synchronization

SCHNEIDER
Event input
CPU module
Interrupt
Time synchronization
Routine 1
Process event 1

Interrupt
Routine 2 Process event 2

Process event 3
Interrupt
Routine 3

J. Brahy AB/CO-IS
Clock synchronization in PLCs
NTP method and pulse synchronization

Advantages
- Accuracy (exept at each NTP time refresh)

Disadvantage
- Hardware line and signal adaptator necessary
- Mismatch possible between process and time
events (Siemens only)
- Time synchronization program mixed with user
event treatment program (Siemens only)

J. Brahy AB/CO-IS
Clock synchronization in PLCs

Solution 4

Time telegram
and pulse synchronization

J. Brahy AB/CO-IS
Clock synchronization in PLCs
Time telegram and pulse synchronization

Date time
source
Synchronization Sending time to CP

TrueTime
CPU memory
Receiving time
RS 232 in CPU
Ethernet
WorldFIP

Refresh CPU clock


at trigger time

Level adapter & isolation

Hardware pulse distribution

J. Brahy AB/CO-IS
Clock synchronization in PLCs
Time telegram and pulse synchronization
Realistic implementation for Schneider

GPS antenna

MTG

GMT
Level adapter Level adapter
& isolation & isolation
RS232 RS232

VME 1 pps 1 pps


Timing info Timing info
module module

IRIG-B

J. Brahy AB/CO-IS
Clock synchronization in PLCs
Time telegram and pulse synchronization

Advantages
- Accuracy

Disadvantage
- Module for time message and pulse necessary
- Hardware line and signal adaptator necessary
- Additionnal CP (Siemens only)
- Mismatch possible between process and
time events (Siemens only)
- Time synchronization program mixed with
user event treatment program (Siemens only)
- Additionnal program must be included
J. Brahy AB/CO-IS
Clock synchronization in PLCs

Solution 5

External time stamping

J. Brahy AB/CO-IS
Clock synchronization in PLCs
External time stamping

Dedicated hardware
Freezed
time
value

IRIG-B

Freeze
command

Process Event

J. Brahy AB/CO-IS
Clock synchronization in PLCs
External time stamping

Advantages
- Accuracy
- Independant programming

Disadvantage
- Additionnal specific external hardware
- Need a communication module or a digital
input module in the PLC
- New development
- PLC clock not synchronized

J. Brahy AB/CO-IS
Clock synchronization in PLCs
Selected solutions
SIEMENS SCHNEIDER

GPS Time telegram and


NTP antenna pulse synchronization
NTP
Server MTG

Ethernet
GMT

RS232
NTP Clients
VME 1 pps
Timing info
module

IRIG-B

J. Brahy AB/CO-IS

Vous aimerez peut-être aussi