Uploaded by Dan M

SIPLUS DCF77 Radio Clock Module Operating Instructions

advertisement
SIPLUS extreme
Radio clock module
SIPLUS DCF77
Compact Operating Instructions
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage to property. The
notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring only to property damage
have no safety alert symbol. These notices shown below are graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
indicates that minor personal injury can result if proper precautions are not taken.
NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will be used. A notice warning of
injury to persons with a safety alert symbol may also include a warning relating to property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific task in accordance with
the relevant documentation, in particular its warning notices and safety instructions. Qualified personnel are those who, based on their
training and experience, are capable of identifying risks and avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products
and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage,
installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any
problems. The permissible ambient conditions must be complied with. The information in the relevant documentation must be observed.
© Siemens AG 2012. All rights reserved
A5E01070346F/003, 08/2013
1
Table of contents
1
Introduction ............................................................................................................................................................ 3
2
Safety notes ........................................................................................................................................................... 3
3
Description............................................................................................................................................................. 4
3.1
The SIPLUS DCF77 radio clock module....................................................................................................... 4
3.2
Scope of delivery .......................................................................................................................................... 5
4
Application Planning ............................................................................................................................................... 5
5
Assembly ............................................................................................................................................................... 6
5.1
Function test at the intended location of use ................................................................................................ 6
5.2
Installation .................................................................................................................................................... 7
6
Connection ............................................................................................................................................................ 8
7
Commissioning (hardware) ..................................................................................................................................... 9
8
Technical data.......................................................................................................................................................10
9
Accessories ..........................................................................................................................................................10
10
Examples/applications ...........................................................................................................................................11
10.1
Sample software on the Internet ................................................................................................................. 11
10.2
10.2.1
10.2.2
S7 program for S7-200 ............................................................................................................................... 11
Calling the S7-200 SIPLUS_DCF77 block .................................................................................................. 12
Internal structure of S7-200 SIPLUS_DCF77 ............................................................................................. 13
10.3
10.3.1
10.3.2
10.3.3
10.3.4
S7 program for S7-300/400 ........................................................................................................................ 15
Overview..................................................................................................................................................... 15
Install S7 program....................................................................................................................................... 16
Calling the S7-300/400 SIPLUS_DCF77 block ........................................................................................... 16
Diagnostics ................................................................................................................................................. 17
10.4
10.4.1
10.4.2
10.4.3
10.4.4
S7 program for S7-1200/S7-1500 ............................................................................................................... 19
Overview..................................................................................................................................................... 19
Install S7 program....................................................................................................................................... 19
Block call .................................................................................................................................................... 20
Diagnostics ................................................................................................................................................. 21
A
Appendix ..............................................................................................................................................................22
B
List of abbreviations ..............................................................................................................................................22
2
SIPLUS DCF77
A5E01070346F/003, 08/2013
1
Introduction
Purpose of this documentation
These Operating Instructions contain information required for the installation, start up, and operation of the SIPLUS DCF77
radio clock module.
Target group
The documentation is intended for qualified personnel in the following specialist fields:
● Operators, project engineers, programmers
● Electrically skilled personnel who assemble, connect and start up the device.
Basic knowledge required
A general knowledge of automation technology and knowledge of the programming of an S7 controller are prerequisites for
understanding the operating instructions.
History
Edition
Comment
10/2012
First edition
Edition 10/2012 of the operating instructions supports software release 4.0 of the
Simatic function block FB77 for S7-300/400.
08/2013
Additional program examples for using the SIPLUS DCF77 radio clock module with
S7-1200 / S7-1500.
Trademarks
SIPLUS® is a registered trademark of Siemens AG.
2
Safety notes
Note
The SIPLUS DCF77 radio clock module must only be assembled and started up by qualified personnel.
Note
The general safety information for the S7-200, S7-300 and the S7-400 must be observed. Please refer to the S7-200 System
Manual and the S7-300 and S7-400 Installation Manuals in this regard.
Note
An unsuitable mounting site can result in inadequate reception and lead to malfunctioning.
Good reception is ensured if the module is set up with unhindered alignment to Frankfurt am Main and in a radiation-free
environment.
SIPLUS DCF77
A5E01070346F/003, 08/2013
3
3
Description
3.1
The SIPLUS DCF77 radio clock module
Principle of operation
Using the SIPLUS DCF77 radio clock module, the real-time clock of the S7-200, S7-300 and S7-400 programmable
controllers (PLCs) can be synchronized with the official time of day of the DCF77 time signal transmitter at Germany's
national physics laboratory (Physikalisch-technischen Bundesanstalt (PTB)) Brunswick/Berlin.
The SIPLUS DCF77 radio clock module converts the signals received from the DCF77 transmitter to level signals. The level
signals can be analyzed by a PLC and used for time synchronization.
Design
View
Description
①
Cover with four screws
②
Enclosure with electronics
③
LEDs for indicating function
④
Terminal block
⑤
Cable gland for connecting cable
Under the cover screws, the enclosure
has drill holes for wall mounting.
Transmit data
The DCF77 time signal transmitter is located in Mainflingen near Frankfurt am Main, Germany.
The transmit data includes:
● The official German time including date calculated by the PTB
● Information on Daylight Saving Time/Standard Time
● Information on the inserted leap seconds
Range
The range of the transmitter is approximately 2,000 km. However, the range is dependent on the following:
● The receive orientation of the SIPLUS DCF77 radio clock module
● The receive position of the SIPLUS DCF77 radio clock module
● The time of day and weather conditions
Reception
The radio clock module receives the time-of-day signal via a DCF receiver.
The DCF receiver comprises an antenna and electronics components. The DCF receiver is connected to the SIMATIC PLC
and to SIPLUS via two digital inputs.
Software driver
Sample applications for the software driver are available for downloading from the Internet. Please refer to the section
"Sample software on the Internet (Page 11)".
4
SIPLUS DCF77
A5E01070346F/003, 08/2013
3.2
Scope of delivery
Order No.: 6AG1057-1AA03-0AA0
● SIPLUS DCF77 radio clock module for wall mounting.
The device is provided with drill holes for wall mounting.
4
Application Planning
Choice of installation site
When selecting an installation site and position for the SIPLUS DCF77 radio clock module, ensure that good reception is
guaranteed.
Reception is best
● In an environment with low electromagnetic radiation
● In the open air with the radio clock module pointing in the direction of Frankfurt am Main
Note
Unfavorable electromagnetic conditions at the location of use, especially in the industrial area, can interfere with
reception.
SIPLUS DCF77
A5E01070346F/003, 08/2013
5
5
Assembly
5.1
Function test at the intended location of use
Before assembly, check the reception conditions for the SIPLUS DCF77 radio clock module at the location of use.
Procedure
1. Loosen the four screws on the cover of the SIPLUS DCF77 radio clock module and remove the cover.
2. Switch off the 24 V DC supply to the radio clock module.
3. Connect the 24 V DC supply to the radio clock module.
– You can find the pin assignments for connection to the S7-200 or S7-300/400 in the chapter "Connection (Page 8)".
– If you are using an external power supply: Connect the supply voltage on the terminal block to the connections "GND"
and "24VDC".
4. Switch the supply voltage on.
– If reception is good, the red LED "sec" flashes at one-second intervals and the LED "Data" flashes dependent on
messages.
– If reception is poor, the LEDs either do not flash as indicated above or they do not flash at all. If this is the case,
select another location of use.
5. Switch the supply voltage off before dismantling the test configuration.
6
SIPLUS DCF77
A5E01070346F/003, 08/2013
5.2
Installation
Note
When assembling for outdoor use (degree of protection IP65), the SIPLUS DCF77 radio clock module must be secured in
such a way that the cable gland points vertically downwards (see the figure below).
The radio clock module is assembled with two or four screws:
● Thread diameter < 4.5 mm, e.g. M4
● Diameter of the screw head: < 8 mm
You will require different assembly materials, depending on the surface on which the radio clock module is mounted. The
assembly materials are therefore not included in the scope of supply.
Procedure
1. Loosen the four screws on the cover of the SIPLUS DCF77 radio clock module and remove the cover.
2. Drill the holes for mounting the radio clock module.
3. Secure the radio clock module with two or four screws.
4. Close the cover of the SIPLUS DCF77 radio clock module:
– Make sure the cover provides a good seal
– Screw the cover tight with the four screws provided.
SIPLUS DCF77
A5E01070346F/003, 08/2013
7
6
Connection
Connect the SIPLUS DCF77 radio clock to the PLC with a double-shielded 4-core cable.
Procedure
1. Expose the cable shielding and strip the cable ends.
2. Loosen the four screws on the cover of the SIPLUS DCF77 radio clock module and remove the cover.
3. Loosen the cable gland
4. Insert the connecting cable into the interior of the SIPLUS DCF77 radio clock module through the cable gland
5. Connect the cores to the terminal block of the SIPLUS DCF77
6. Tighten the cable gland
7. Close the cover of the SIPLUS DCF77 radio clock module:
– Make sure the cover provides a good seal
– Screw the cover tight with the four screws.
8. Switch off the supply voltage of the PLC.
9. Connect the cable on the PLC.
Figure 6-1
8
Connect the SIPLUS DCF77 radio clock module to the SIMATIC S7-200
SIPLUS DCF77
A5E01070346F/003, 08/2013
Figure 6-2
Connect the SIPLUS DCF77 radio clock module to the SIMATIC S7-300/400
– When connecting to the SIMATIC S7-300/400, use the power supply of the encoders and any digital inputs
10. Attach the cable shield to the PLC. Proceed as follows:
– For S7-200: in accordance with the S7-200 manual
– For S7-300: connect the shielding to the shield connection element
– For S7-400: connect the shielding to the shielding bus
– Other systems: in accordance with the regulations for the relevant PLC
7
Commissioning (hardware)
When you switch on the supply voltage for the PLC, the SIPLUS DCF77 radio clock module is ready for operation on the
hardware side.
The three LEDs on the radio clock module indicate the operating status and the function:
LEDs
Meaning
Name
Function and color of the LED
24VDC
Shows a green light
24 V DC power is on
DCF data
Flashes red
DCF data being received
sec
Flashes red at one-second intervals
One-second interval of the DCF signal
Additionally, the relevant PLC requires another driver for this function. For more information, refer to Chapter
Examples/applications (Page 11).
SIPLUS DCF77
A5E01070346F/003, 08/2013
9
8
Technical data
Dimensions and weight
Dimensions W x H x D in mm
75 x 125 x 75
Required assembly height
Module height
+ 25 mm for cable gland
+ bending radius of connecting cable
Weight
approx. 0.25 kg
Voltage and currents
Supply voltage:
● Rated value
● Permissible range
24 V DC
20.4 to 28.8 V
Current consumption
typ. 50 mA
Module-specific data
Shielded cable length
Max. 500 m
Radio frequency
77.5 kHz
Degree of protection
IP65
Temperature range
- 25 to + 60 °C
9
Accessories
Various CPUs of the SIPLUS S7-200 have no integral clock chip. To have the time of day available when using these CPUs,
you must retrofit the relevant combined clock and battery module.
Accessories
Restriction:
MLFB (order no.)
Combined clock and battery module
Only for
CPU 221/222 to ..22-0XA0
6ES7297-1AA20-0XA0
Combined clock and battery module
Only for
CPU 221/22 to ..23-0XA0
6ES7297-1AA23-0XA0
10
SIPLUS DCF77
A5E01070346F/003, 08/2013
10
10.1
Examples/applications
Sample software on the Internet
You require the relevant drivers for analyzing the time signals received from the SIPLUS DCF77 radio clock module.
Note
The sample drivers and sample programs are freeware. Every user can use, copy and distribute these programs FREE OF
CHARGE The authors and copyright holders of the programs accept no liability for the functional viability or compatibility of
this software. It is used at the user's own risk. Since this software is free of charge, there is no warranty, claim to error
correction or hotline support.
Note
When using the sample software, the time of day is set every minute with proper reception (on the S7-200 only if input
Set_C = "true").
Note
The time base in the S7 system can be shifted by setting the time of day. Applications based on the time base can adopt
undefined statuses as a result of "time jumps". Take measures in the user program to ensure that no undefined statuses
occur.
You can find implemented S7 programs (including source code) for S7-200, S7-300/400, and S7-1200/1500 PLCs on the
Internet (http://www.siemens.com/siplus-extreme/).
1. Select the following on this Internet page
"Add-ons → SIPLUS DCF77"
2. You have to link the libraries into the configuring tools.
Recommended call cycle for the software drivers: approx. 200 ms or less.
10.2
S7 program for S7-200
Installing the sample software
1. The library is contained in a zip archive.
Unzip the archive to the local hard disk.
2. The zip archive contains the folder "SIPLUS".
This folder contains
– the library "siplus_dcf77.mwl".
– the folder "Quelle" with the basic project of the library.
Link the library into Step-7-Micro/WIN.
To do so, select the menu "File" → "Add/Remove Library"
SIPLUS DCF77
A5E01070346F/003, 08/2013
11
10.2.1
Calling the S7-200 SIPLUS_DCF77 block
The block uses the timer T50. If this timer is already used in the project, you must select one of the following options:
● Program a free timer in the sample project. The source code of the sample project is located in the library folder.
● Remove the use of T50 from the programs of the project.
Table 10-1
Parameter
Externally viewable parameters of the S7-200 SIPLUS_DCF77 block
Data type Meaning
Input:
DCF_SekTakt
Bool
One-second interval of the SIPLUS DCF77 radio clock module
DCF_Data
Bool
Data signal of the SIPLUS DCF77 radio clock module
Set_d
Bool
The time of day is set when the day is changed
Set_h
Bool
The time of day is set when the hour is changed
Set_C
Bool
The time of day is set continuously
VD
Data area for intermediate storage of information
In / Out:
DCF_Data1
DCF_Data2
VD
Data area for intermediate storage of information
DCF_Data3
VD
Data area for intermediate storage of information
DCF_Data4
VD
Data area for intermediate storage of information
DCF_Data5
VD
Data area for intermediate storage of information
Fehler
Bool
1 = "true": no valid message frame received for at least 3 minutes
Fehler_early
Bool
1 = "true": logic error detected within current message frame
Gestellt
Bool
1 = "true": at least 3 successive message frames received and recognized as valid
Out:
The sample block sets the real-time clock of the CPU dependent on the parameters "Set_d", "Set_h" and "Set_C" after it has
received at least three successive message frames and recognized them as valid.
12
SIPLUS DCF77
A5E01070346F/003, 08/2013
10.2.2
Internal structure of S7-200 SIPLUS_DCF77
Table 10-2
Internal structure of the S7-200 SIPLUS_DCF77 block
Parameter
Data type Meaning
In:
DCF_SekTakt
Bool
One-second interval of the SIPLUS DCF77 radio clock module
DCF_Data
Bool
Data signal of the SIPLUS DCF77 radio clock module
Set_d
Bool
The time of day is set when the day is changed
Set_h
Bool
The time of day is set when the hour is changed
Set_C
Bool
The time of day is set continuously
Fehler
Bool
1 = "true": no valid message frame received for at least 3 minutes
Fehler_early
Bool
1 = "true": logic error detected within current message frame
Gestellt
Bool
1 = "true": at least 3 successive message frames received and recognized as valid
DCF_Data1
DWORD
Data area for intermediate storage of information
DCF_Data2
DWORD
Data area for intermediate storage of information
DCF_Data3
DWORD
Data area for intermediate storage of information
DCF_Data4
DWORD
Data area for intermediate storage of information
DCF_Data5
DWORD
Data area for intermediate storage of information
Out:
In_Out:
Table 10-3
SIPLUS_DCF77 subroutine local data
Address of
internal data
Parameter
Data type Meaning
L 0.0
DCF_SekTakt
Bool
One-second interval of the SIPLUS DCF77 radio clock module
L 0.1
DCF_Data
Bool
Data signal of the SIPLUS DCF77 radio clock module
L 0.2
Set_d
Bool
The time of day is set when the day is changed
L 0.3
Set_h
Bool
The time of day is set when the hour is changed
L 0.4
Set_C
Bool
The time of day is set continuously
LB 1
W1_Zaehler
Byte
Counts the seconds in the current message frame
L 2.0
Bool
Complete message frame
L 2.1
Bool
Changed day
L 2.2
Bool
Changed hour
L 2.3
Bool
Set continuously
L 2.4
Bool
Clock setting requested
L 2.5
Bool
59. sec. bit
L 2.6
Bool
Request bit on expiration
L 2.7
Bool
Complete message frame, auxiliary bit
L 3.1
Bool
Parity minute
L 3.2
Bool
Parity hour
L 3.3
Bool
Parity date
SIPLUS DCF77
A5E01070346F/003, 08/2013
13
Address of
internal data
Parameter
Data type Meaning
LB 4
Byte
DCF_Jahr (.0 = 1; .1 = 2; ... .7 = 80)
LB 5
Byte
DCF_Monat (.0 = 1; .1 = 2; ... .4 = 10)
LB 6
Byte
DCF_Kalendertag (.0 = 1; .1 = 2; ... .5 = 20)
LB 7
Byte
DCF_Stunde (.0 = 1; .1 = 2; ... .5 = 20)
LB 8
Byte
DCF_Minute (.0 = 1; .1 = 2; ... .6 = 40)
LB 9
Byte
DCF_Wochentag (.0 = 1; .1 = 2; .2 = 4)
LB 10
Byte
Copy of the last DCF year converted to int
LB 11
Byte
Copy of the last DCF month converted to int
LB 12
Byte
Copy of the last DCF calendar day converted to int
LB 13
Byte
Copy of the last DCF hour converted to int
LB 14
Byte
Copy of the last DCF minute converted to int
LB 15
Byte
Copy of the last DCF weekday converted to int
L 16.0
Bool
Call bit 1: Transmitter reports error
L 16.1
Bool
Annunciator bit 1: at the next full hour
L 16.2
Bool
Time zone bit 1
L 16.3
Bool
Time zone bit 2
L 16.4
Bool
Notice bit 2: A leap second is inserted at the end of the hour.
LB 17
Byte
Copy of DCF_Tag after the last change
LB 18
Byte
Copy of DCF_Stunde after the last change
LB 19
Byte
Time since last valid message frame (generated via CPU clock)
LB 20
Byte
k_NrFolgetelegr: number of successive correct message frames
Temp!
The data that follows is temporary. It is not externally viewable.
L 21.3
FN_Takt
Bool
Negative edge one-second interval
L 21.4
FP_Takt
Bool
Positive edge one-second interval
L 21.5
Start
Bool
Time of day set
L 21.6
FP_Sek_Takt
Bool
Positive edge of CPU one-second interval
LW 22
BCD_
WORD
Variable for calculations
14
SIPLUS DCF77
A5E01070346F/003, 08/2013
10.3
10.3.1
S7 program for S7-300/400
Overview
CALL FB 77, DB77
DCF_Takt
:=E0.0
DCF_Daten
:=E0.1
Nicht_stellen
:=
Z1_Zeitzonenbit_1 :=
Z2_Zeitzonenbit_2 :=
Umsch_Zeitzone
:=
Neue_Zeit
:=
Fehler
:=
S7_Datum_Zeit
:=
FB_Return_Value
:=
OK_Fehler_Zaehler :=
Presentation in FBD with minimal parameter assignments
The main features of the current function block version V4.0 are:
● Reduced interconnection outlay (it is only necessary to connect DCF_Takt and DCF_Daten to provide the basic function).
● A Simatic timer and external second clock pulse are not required (unlike with previous versions).
● The most recently received time of day and additional time information are available directly at the function block outputs.
A new time for a cycle is signaled at the output "Neue_Zeit".
● The parameter "Nicht_stellen" can be used to deactivate automatic setting or tracking of the CPU clock. This supports
manual further processing of the most recently received clock time ("S7_Datum_Zeit"), e.g. for switching to/from daylight
saving time.
● In addition to the error output "Fehler" (set after 3 minutes without a received signal), the output "OK_Fehler_Zaehler" is
also available. In the positive range, it indicates the number of minutes during which correct DCF frames have been
received. If the range is negative, it indicates the number of minutes that have passed during which DCF frames were no
longer received. This supports synchronization monitoring over longer periods (e.g. monitoring for downtime in excess of
10 hours).
● Diagnostics options ("Return_Value") on the function block as well as by means of a variable table.
SIPLUS DCF77
A5E01070346F/003, 08/2013
15
10.3.2
Install S7 program
The library is supplied in a zip archive.
1. Unzip the archive into the "S7LIBS" directory.
Default: "Program Files\Siemens\Step7\S7LIBS" or "Siemens/Step7/S7Libs"
The zip archive contains the folder "SIPLUS".
2. Open the library using the Simatic Manager
-> File/Open/Libraries/Browse/Path (…S7LIBS)/SIPLUS
The library contains the following blocks:
FB77 ("DCF77")
Main function block
DB77 ("I_DB_DCF77")
Instance DB for FB77
FC34 ("SB_DT_DT")
Standard function from S7-stdlibs used by FB77
VAT_DCF77_Diag
Variable table for diagnostics
3. Copy these blocks into your user program
10.3.3
Calling the S7-300/400 SIPLUS_DCF77 block
General notes on using the function block
● You should integrate FB77 into an execution level that is called up every 100 ms.
This will normally be OB1, but if required it can be a cyclic interrupt, such as OB35.
● When it is called it must be assigned to an instance DB, as this concerns a function block.
It is recommended that you use the DB77 that has already been loaded into your project. The overview section above
contains examples in FBD and STL.
Note
FB77 has no multi-instance-capability, so it must not be declared in the static area of another FB.
● For a correct block call, you must initialize the block with the input parameters specified under Input.
● The output values given under Output are then available to you.
The table below shows the parameters of the software block.
Table 10-4
Parameters of the S7-300/400 SIPLUS_DCF77 block
Parameter
Data type Meaning
Input:
DCF_Takt
Bool
One-second interval of the SIPLUS DCF77 radio clock module
DCF_Daten
Bool
Data signal of the SIPLUS DCF77 radio clock module
Nicht_stellen
Bool
The parameter "Nicht_stellen" can be used to deactivate automatic setting or tracking of
the CPU clock. This supports manual further processing of the most recently received
clock time ("S7_Datum_Zeit"), e.g. for switching to/from daylight saving time.
0: (Default): CPU clock is set by the block
1: CPU clock is NOT set by the block
Out:
Z1_Zeitzonenbit_1
Bool
1 = "true": CEST;
0 = CET,
Z1_Zeitzonenbit_2
Bool
1 = "true": CET
0 = CEST
Umsch_Zeitzone
Bool
1: At the next hour change, the system changes between CET and CEST (CET ↔ CEST)
Neue_Zeit
Bool
Signals that a new time has been received for a cycle and has been accepted or not in
accordance with the parameter "Nicht_stellen", but which is available on the output
"S7_Datum_Zeit" whatever the case.
At least 2 consecutive time-of-day frames must have been correctly received.
16
SIPLUS DCF77
A5E01070346F/003, 08/2013
Parameter
Data type Meaning
Fehler
Bool
S7_Datum_Zeit
Date_and Most recently received time in "S7-Date_and_Time-Format"
_Time
1 = "true": When valid frames have not been received for 3 minutes or longer
0 = "false" when the time has been reliably received (at least 2 consecutive frames)
FB_Return_Value
Positive values: Currently received second in BCD
Negative values: Most recent error / cause of interruption during receiving
OK_Fehler_Zaehler
In the positive range, the value indicates the number of minutes during which correct DCF
frames have been received consecutively. When negative, it indicates the number of
minutes during which NO more DCF frames were received.
Can be used, for example, for user-generated error messages.
10.3.4
Diagnostics
Various information on receiving status is already available on the outputs of FB77 ("DCF77"; see previous section).
Some of this can also be found in the variable table "Vat_DCF77_Diag".
You can use this, during commissioning in particular, to monitor the most important information without having to connect the
block outputs.
Table 10-5
Variable table "Vat_DCF77_Diag"
// Return values
DB77.DBW 12
"I_DB_DFC77".FB_Return_Value
Error code, when negative (w#16#8xxx),
otherwise current second pulse
HEX
DB77.DBW 14
"I_DB_DFC77".OK_Fehler_Zaehler
Positive: No. of min. with correct receiving
Negative: No. of min. with receiving errors
DEC
DB77.DBX 2.4
"I_DB_DFC77".Fehler
1: No valid frame received for more than 3 min.
0: With next pulse 'Neue Zeit'
DEC
DB77.DBD 4
First DWord of S7_Datum_Zeit
HEX
DB77.DBD 8
Second DWord of S7_Datum_Zeit
HEX
// S7 time on block output
// Counters and measured values
DB77.DBW 18
"I_DB_DFC77".Sec_Pos_Count
Counts the message frame bits (second counter)
DEC
DB77.DBW 20
"I_DB_DFC77".Sec_Err_Count
Second counter for error counter
DEC
DB77.DBW 68
"I_DB_DFC77".Diag_ms_Takt_Takt
Time interval [ms] between last and preceding
positive clock edge
DEC
DB77.DBW 70
"I_DB_DFC77".Diag_ms_Takt_len
Pulse duration of most recent clock cycle
DEC
DB77.DBW 72
"I_DB_DFC77".Diag_ms_last_cycle
Time interval [ms] between two calls of the FB
(cycle time)
DEC
SIPLUS DCF77
A5E01070346F/003, 08/2013
17
The following two values are particularly important for antenna alignment:
● "I_DB_DFC77".Diag_ms_Takt_Takt (DB77.DBW 68):
should vary evenly about the value 1000 (ms).
Exceptions include the 59th second (the second pulse is missing here, so the value increases to 2000) and, in the case
of some versions of the receiver, the initial seconds at the start of a minute.
● "I_DB_DFC77".Diag_ms_Takt_len
Should vary evenly across the range 500 to 600 (ms).
The accuracy of these values depends on the cycle time between FB77 calls, whereby this time interval is also available as
a diagnostic value.
Finally, a list of the negative return values of FB77, that is errors on receiving, is given below.
Under poor receiving conditions it can be expected that errors will be detected quickly; this is demonstrated by the lower
error numbers.
Constantly changing errors can indicate a fault.
Table 10-6
Return values of the S7-300/400 SIPLUS_DCF77 block
// Return values
Meaning / Error
(Possible) cause
W#16#8101
Call bit in frame is set
Error message from DCF77 sender
W#16#8102
The two time zone bits are not plausible
Poor reception or sporadic fault
W#16#8103
Bit 20 (start bit) not set in message frame
Poor reception or sporadic fault
/W#16#8104
Received minute byte is not plausible
Poor reception or sporadic fault
W#16#8105
Bit 28 (parity P1) error
Poor reception or sporadic fault
W#16#8106
Received hour byte is not plausible
Poor reception or sporadic fault
W#16#8107
Bit 35 (parity P2) error
Poor reception or sporadic fault
W#16#8108
Received calendar day is not plausible
Poor reception or sporadic fault
W#16#8109
Received calendar month is not plausible
Poor reception or sporadic fault
W#16#810A
Received calendar year is not plausible
Poor reception or sporadic fault
W#16#810B
Bit 58 (parity P3) error
Poor reception or sporadic fault
W#16#8201
No pause detected between message
frames (59th min.)
Poor reception or sporadic fault
W#16#8202
Invalid time difference between last frame
received.
Poor reception or sporadic fault
18
SIPLUS DCF77
A5E01070346F/003, 08/2013
10.4
10.4.1
Figure 10-1
S7 program for S7-1200/S7-1500
Overview
SIPLUS DCF77 DB: representation in FBD with minimal parameter assignments
Features of the function block for S7-1200 / S7-1500
● Function block supports S7-1200 (V2.2 and higher) and S7-1500 CPUs
● Reduced interconnection outlay (it is only necessary to connect DCF_Takt and DCF_Daten to provide the basic function)
● The most recently received time of day and additional time information are available directly at the function block outputs.
A new time for a cycle is signaled at the output "Neue_Zeit".
● The parameter "Nicht_stellen" can be used to deactivate automatic setting or tracking of the CPU clock. This supports
manual further processing of the most recently received clock time ("S7_DTL"), e.g. for switching to/from own daylight
saving time.
● In addition to the error output "Fehler" (set after 3 minutes without a received signal), the output "OK_Fehler_Zaehler" is
also available. In the positive range, it indicates the number of minutes during which correct DCF frames have been
received. If the range is negative, it indicates the number of minutes that have passed during which DCF frames were no
longer received. This supports synchronization monitoring over longer periods (e.g. monitoring for downtime in excess of
10 hours).
● Diagnostics options ("Return_Value") on the function block as well as of the values in the instance DB by means of
diagnostics.
10.4.2
Install S7 program
3 libraries as ZIP archives are available for the current TIA portal V12 and the previous version V11:
● SIPLUS_DCF77onS1200_V1_0_TIA_V11.ZIP
● SIPLUS_DCF77onS1200_V1_0_TIA_V12.ZIP
● SIPLUS_DCF77onS1500_V1_0_TIA_V12.ZIP
Use appropriate library for your TIA version. The library V12 should be usable for future TIA versions. It may then be
necessary to carry out an update after opening it. In addition, the libraries are different in the target system (S7-1200 / S71500).
Installing
Unpack the library (libraries) into any directory, and open the required library in TIA as a global library. A function block
"SIPLUS_DCF77" is then available in the "Templates" folder. You can then copy this into your project.
SIPLUS DCF77
A5E01070346F/003, 08/2013
19
10.4.3
Block call
Information on using the function block
● You should integrate FB77 into an execution level that is called up at least every 100 ms.
This can usually be OB1, or a cyclic interrupt if required.
The instance DB is generated automatically during a block call. It is permissible as a single-instance or multi-instance.
● For a correct block call, you must at least supply the block with the clock cycle and data of the DCF receiver. Refer to the
following table for the other input parameters as well as output values.
Input parameters and output values
Table 10-7
Parameters of the SIPLUS_DCF77 block
Parameter
Data type
Meaning
Bool
One-second interval of the SIPLUS DCF77 radio clock module
Bool
Data signal of the SIPLUS DCF77 radio clock module
Bool
The parameter "Nicht_stellen" can be used to deactivate automatic setting or
tracking of the CPU clock. This supports manual further processing of the
most recently received clock time ("S7_DTL"), e.g. for switching to/from
daylight saving time.
Input:
DCF_Takt
0: (default): CPU clock is set by the block
1: CPU clock is NOT set by the block
Out:
CEST
Bool
1 = "true": CEST
0 = CET
CET
Bool
1 = "true":CET
0 = CEST
SZ_Umschaltung
Bool
1: At the next hour change, the system changes between CET and CEST
(CET ↔ CEST)
Neue_Zeit
Bool
Signals that a new time has been received for a cycle and has been accepted
or not in accordance with the parameter "Nicht_stellen", but which is available
on the output "S7_Datum_Zeit" whatever the case.
At least 2 consecutive time-of-day frames must have been correctly received.
Fehler
Bool
1 = "true": When valid frames have not been received for 3 minutes or longer
0 = "false" when the time has been reliably received (at least 2 consecutive
frames)
S7_Datum_Zeit
DTL
Most recently received time in S7 format DTL
FB_Return_Value
WORD
Positive values: Currently received second in BCD
Negative values: Most recent error / cause of interruption during receiving
OK_Fehler_Zaehler
INT
In the positive range, the value indicates the number of minutes during which
correct DCF frames have been received consecutively. When negative, it
indicates the number of minutes during which NO more DCF frames were
received.
Can be used, for example, for user-generated error messages.
0 is indicated if a DCF frame has been correctly received and while waiting for
the second frame for verification. In addition, 0 can be briefly indicated
following a restart.
20
SIPLUS DCF77
A5E01070346F/003, 08/2013
10.4.4
Diagnostics
Various information on the receiving status is already available at the outputs of the FB "SIPLUS_DCF77" (see Chapter
Block call (Page 20)).
The status of the outputs can also be monitored in the instance DB without interconnection. Here you can also find further
variables which could be relevant for diagnostics.
Alignment of the antenna
The following two values are particularly important for antenna alignment:
● "Diag_ms_Takt_Takt":
Value should vary evenly about the value 1000 (ms).
Exceptions include the 59th second (the second pulse is missing here, the value increases to 2000) and, in the case of
some versions of the receiver, the initial seconds at the start of a minute.
● "Diag_ms_Takt_len“:
Value should vary evenly in the range 500 to 600 (ms).
The accuracy of these values largely depends on the cycle time between the FB77 calls, for which reason this interval
should also be monitored if appropriate (TIA function: Online & diagnostics).
Return values from FB77 upon receive errors
A list of the negative return values of FB77, in other words errors when receiving, is provided below.
With generally poor receiving conditions it can be expected that error 16#8301 will be detected. The other codes result from
implausible received data.
Table 10-8
Return values of the S7-300/400 SIPLUS_DCF77 block
// Return values
Meaning / error
(Possible) cause
W#16#8101
Call bit in frame is set
Error message from DCF77 sender
W#16#8102
The two time zone bits are not plausible
Poor reception or sporadic fault
W#16#8103
Bit 20 (start bit) not set in message frame
Poor reception or sporadic fault
W#16#8104
Received minute byte is not plausible
Poor reception or sporadic fault
W#16#8105
Bit 28 (parity P1) error
Poor reception or sporadic fault
W#16#8106
Received hour byte is not plausible
Poor reception or sporadic fault
W#16#8107
Bit 35 (parity P2) error
Poor reception or sporadic fault
W#16#8108
Received calendar day is not plausible
Poor reception or sporadic fault
W#16#8109
Received calendar month is not plausible
Poor reception or sporadic fault
W#16#810A
Received calendar year is not plausible
Poor reception or sporadic fault
W#16#810B
Bit 58 (parity P3) error
Poor reception or sporadic fault
W#16#8201
No pause detected between message frames
(59th min.)
Poor reception or sporadic fault
W#16#8202
Invalid time difference between last frame
received.
Poor reception or sporadic fault
W#16#8301
High deviation in one-second interval (> 500 ms)
Poor reception or sporadic fault
SIPLUS DCF77
A5E01070346F/003, 08/2013
21
A
Appendix
Technical Support
You can contact Technical Support for SIPLUS systems as follows:
● Phone: + 49 (0) 911 895 5900
● E-mail (mailto:technical-assistance@siemens.com)
● Internet: Web form for Support Request ()
S7 programs
You can find implemented S7 programs (including source code) for S7-200, S7-300/400, and S7-1200/1500 PLCs on the
Internet (http://www.siemens.com/siplus-extreme/).
Select the following on this Internet page "Add-ons → SIPLUS DCF77".
Information on SIMATIC
You can find additional information on SIMATIC
● On the Internet at:
Simatic (www.siemens.com/simatic)
● In the STEP 7 software installation:
Select the STEP 7 installation in the Windows start menu
START → SIMATIC → Documentation
B
List of abbreviations
Abbreviation
Explanation
BCD
Binary Coded Decimal
FN
Negative edge
FP
Positive edge
CET
Central European Time
CEST
Central European Summer Time
PTB
Physikalisch-Technische Bundesanstalt Braunschweig / Berlin (national physics laboratory
Brunswick/Berlin)
22
SIPLUS DCF77
A5E01070346F/003, 08/2013
Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication may be trademarks whose
use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot
be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any
necessary corrections are included in subsequent editions.
Siemens AG
Industry Sector
Postfach 48 48
90026 NÜRNBERG
SIPLUS DCF77
A5E01070346F/003, 08/2013
Download