Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

E6870 Programming Manual 0400

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Technical Description

Programming Manual
6870

version 04.00 07.03.2000


Company Info KRSI Elektronik

KRSI
KRSIBBElektronik

Nottebohmstr. 41 58511 Lüdenscheid


Postfach 1847 58468 Lüdenscheid

Tel.: ++49 (0)2351 / 938686


Fax: ++49 (0)2351 / 459590

Internet: http://www.hopf-time.com
e-mail: info@hopf-time.com

version 04.00 page 2


Table of Contents KRSI Elektronik

INHALT Seite

1 Service Functions of the Serial Interface 5

2 Time Functions 6
2.1 The Statusbyte and Structure of the Data String in the TIM Command 6
2.2 Setting the Time 7
2.3 Requesting the Time 8
2.4 Setting the Point of Changeover 8
2.5 Requesting the Points of Changeover 9
2.6 Difference Time UTC - Local 9

3 Initialising Functions of the Receiver 10


3.1 Setting the Position Data 10
3.2 Setting Decoding Mode Position Fixed 3D and GPS-Reception Quality 10
3.3 Starting Reset of the Clock System 11

4 Configuration of the Serial Interface 12


4.1 Parameterbyte of the serial Interface 12
4.2 Modebyte 1 of the serial interface 13
4.3 Modebyte 2 of the Serial Interfaces 15

5 Optical Coupler Configuration 16


5.1 Structure of the Statusbyte 16
5.2 Pulses 17
5.2.1 Cyclic Output Mode 4 17
5.2.2 Single Pulse Mode 5 17

6 DCF77 Simulation and Sync-Bit Settings 17

7 Remote Software for a Personal Computer 18

8 Pin Assignment of the Serial Interfaces 18

version 04.00 page 3


Table of contents - continued KRSI Elektronik

version 04.00 page 4


GPS-satellite clock 6870 - programming manual KRSI Elektronik

1 Service Functions of the Serial Interface


Remote functions are required for the installation of the clock from a remote computer. To do so
various data strings for the setting of time, date, points of changeover (daylight saving / standard
time) position data, difference time local-UTC and decoding of the GPS reception quality are
transmitted. It is also possible to parameter the serial interface. The program GPS_6870
(included in the delivery of the clock) uses the functions described below.
The remote functions are implemented in interface 1 only.
When the remote function is activated the standard data traffic on the interface is interrupted for
about 15 seconds.
The control characters STX and ETX cannot be excluded from the transmitted remote string,
they are always part of the remote data strings.
The start of a communication between clock and computer is always activated by the computer.
The respective data string is structured as follows:

STX (command) [status] [data] CR LF ETX

The STX (Hex 02) and the CR (Hex 0D), LF (Hex 0A) and ETX (Hex 03) at the end of the string
form the core of the transmission.
The command field contains four ASCII-characters which indicate the function.
The following commands are possible:

TIM: for time and date


COS: for setting points of changeover
DIF: for difference time local-UTC
POS: for position data
SAT: for reception quality
RES: for reset of the clock system
IMP: for the configuration of the optical coupler outputs
DCF: for the DCF77 simulation and the sync.-bit
PAR: for parameterbyte of interface 1
PA1: for parameterbyte of interface 2
MOD: for modebyte 1 of interface 1
MO1: for modebyte 2 of interface 1
MO2: for modebyte 1 of interface 2
MO3: for modebyte 2 of interface 2
SYB: for the systembyte
VER: for version information

The fields status and data are optional and depend on the command or on the requested func-
tion.
The TIM command is always transmitted with a status. The status indicates whether a time in-
formation or a point of changeover is part of the data string. The other commands are transmit-
ted without status.

version 04.00 page 5


GPS-satellite clock 6870 - programming manual KRSI Elektronik

2 Time Functions

2.1 The Statusbyte and Structure of the Data String in the TIM Command
The statusbyte consists of two ASCII nibbles. The value range of each nibble can be Hex 30-39
or Hex 41-46 (00-FF). Once the two characters are received they are converted into binary val-
ues.
example :
The two ASCII characters "4" and "2" (Hex 34 and 32) are received and the ASCII conversion
results in the following byte:

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


0 1 0 0 0 0 1 0

Depending on whether the clock receives or transmits a TIM command the statusbyte has the
following meaning:
Bits in the transmitted statusbyte (from the clock system):

Bit 7 = 1, Bit 6 = 1 clock is radio synchronous with crystal control


Bit 7 = 1, Bit 6 = 0 clock is radio synchronous without crystal control
Bit 7 = 0, Bit 6 = 1 clock is in crystal operation (valid time)it)
Bit 7 = 0, Bit 6 = 0 clock has no valid time

Bit 5 = 1 announcement of a leap second on the next hour change


Bit 4 = 1 standard time/local time
Bit 3 = 1 daylight saving time (only when operating with changeover)
Bit 4 = 0, Bit 3 = 0 UTC-time (Universal Time Co-ordinated)

Bit 2 = 1 daylight saving / standard time - standard time / daylight saving -


changeover on the next hour change
Bit 0 = 1 only in case of changeover: changeover is done
Bit 0 = 0 points of changeover still active

Meaning of the bits in the received statusbyte:

Bit 7 no meaning
Bit 6 = 1 must always be set
Bit 5 = 1 clock is to insert a leap second on the next hour change (please
note: for diagnostic purposes only)
Bit 4 = 0/1 UTC / Local Time
Bit 3 = 0 no meaning

Bit 2 no meaning
Bit 1 no meaning
Bit 0 no meaning

version 04.00 page 6


GPS-satellite clock 6870 - programming manual KRSI Elektronik

During transmission the data field in the TIM data string contains the current settings of the
clock. During reception the latest times are entered. If the data field is missing during reception
the received status is scanned for requested clock data and the transmission of respective data
are released by the clock at the next possible point of time.
The data are transformed and received as ASCII values in BCD. Received data are checked for
plausibility by the clock. The clock recognises invalid data like e.g. day=32 in the data string and
ignores the whole string. The day of the week nibble must always be stated 1 = Monday ... 7 =
Sunday.

Structure of the data field in the string:

character no.: meaning value ( value range)


1 comma $2C
2 hour tens $30-32
3 hour unit $30-39
4 comma $2C
5 minute tens $30-35
6 minute unit $30-39
7 comma $2C
8 second tens $30-35
9 second unit $30-39
10 comma $2C
11 day tens $30-33
12 day unit $30-39
13 comma $2C
14 month tens $30-31
15 month unit $30-39
16 comma $2C
17 year tens $30-39
18 year unit $30-39
19 comma $2C
20 day of the week $31-37

2.2 Setting the Time

Statusbyte (Hex) meaning


48 setting local time

Example data string setting local time 12:34:56 clock, Sunday 07.08.99
STX TIM: 48,12,34,56,07,08,99,7 CR LF ETX

After the data are taken over the clock answers with the new time data string:
STX TIM: 48,12,34,56,07,08,99,7 CR LF ETX

version 04.00 page 7


GPS-satellite clock 6870 - programming manual KRSI Elektronik

2.3 Requesting the Time

Statusbyte (Hex) meaning


40 requesting UTC (world time)
48 requesting local time

Example data string for requesting the time:


STX TIM: 40 CR LF ETX

At the next possible point of time the clock answers with the current world time:
example: STX TIM: 40,10,34,56,07,08,99,7 CR LF ETX
It is 10:34:56 h, Sunday 07.08.99 world time

2.4 Setting the Point of Changeover


Here the points of changeover are entered when the time is changed during the course of the
year to daylight saving or standard time The transmission contains hour and month separately
for daylight saving and standard time. The changeover always takes place on the first or the
last Sunday of the stated month and on the stated hour. If bit 0 in the status is set the changeo-
ver is done on the first Sunday of the month (status 4B and 53). If bit 0 =0 the changeover is
done on the last Sunday of the month (status 4A and 52).

Hinweis : Naughts are entered for all the digits for countries which do not have or
want a changeover.

Structure of Data String:

character no. value ( value range) meaning


1 4A or 4B status summer point of changeover
2 00-23 hour when time is changed to daylight sav-
ing time
3 01-12 month when time is changed to daylight
saving time

4 52or 53 status point of changeover


5 00-23 hour when time is changed to standard time
6 01-12 month when time is changed to standard
time

example setting points of changeover:


STX COS: 4A,02,03,52,03,10 CR LF ETX

As soon as the clock has received the data string it answers with the new points of changeover:
STX COS: 4A,02,03,52,03,10 CR LF ETX

The changeover to daylight saving time always takes place at 02:00h on the last Sunday in
March.The changeover to standard time is at 03:00 on the last Sunday in October.

version 04.00 page 8


GPS-satellite clock 6870 - programming manual KRSI Elektronik

2.5 Requesting the Points of Changeover

Requesting the example data string for the winter points of changeover
STX COS: CR LF ETX

As soon as possible the clock answers with the current points of changeover
example: STX COS:4A,02,03,52,03,10 CR LF ETX

The changeover to daylight saving time is at 02:00 on the last Sunday in March. The changeover
to standard time is at 03:00 on the last Sunday in October.

2.6 Difference Time UTC - Local


Use the DIF command to set or request the difference between local time and UTC. The data
field for this command looks as follows:

meaning value range (Hex)


direction +/- 2B, 2D
hour tens 30-32
hour unit 30-39
comma 2C
minute tens 30-35
minute unit 30-39

The difference time must not exceed ± 12 hours.

Example data string setting the difference between local time and UTC to - 1 hour
STX DIF: -01,00 CR LF ETX

The current difference is requested by the following data string:


STX DIF: CR LF ETX

Once it has received the data string it answers with the new difference time:
STX DIF: +02,00 CR LF ETX

version 04.00 page 9


GPS-satellite clock 6870 - programming manual KRSI Elektronik

3 Initialising Functions of the Receiver

3.1 Setting the Position Data


The position data for the respective location of the clock system are set or requested by this
data string.

Structure of the data string:

character no. meaning ASCII value ( value range)


1 longitude West/East W, E $57, 45
2 colon : $3A
3 degree hundreds 0,1 $30, 31
4 degree tens 0-8 $30-37
5 degree unit 0-9 $30-39
6 comma , $2C
7 minute tens 0-5 $30-35
8 minute unit 0-9 $30-39
9 comma , $2C
10 minute a hundredth 0-9 $30-39
11 minute a thousandth 0-9 $30-39
12 comma , $2C
13 latitude North/South N, S $4E,53
14 colon : $3A
15 degree tens 0-8 $30-38
16 degree unit 0-9 $30-39
17 comma , $2C
18 minute tens 0-5 $30-35
19 minute unit 0-9 $30-39
20 comma , $2C
21 minute hundredth 0-9 $30-39
22 minute thousandth 0-9 $30-39

Example data string for setting the position data:


STX POS: E:007,33,34,N:53,12,21 CR LF ETX

3.2 Setting Decoding Mode Position Fixed 3D and GPS-Reception Quality


The following data string is used to set the decoding mode position fixed or 3D decoding:
STX SAT: 0 CR LF ETX setting decoding to Position Fixed
STX SAT: 1 CR LF ETX setting decoding to 3D

The clock answers with the data strings described below.

version 04.00 page 10


GPS-satellite clock 6870 - programming manual KRSI Elektronik

The data string


STX SAT: CR LF ETX

asks for the current satellite data without change of the decoding mode.
The clock answers with the number of traced satellites and a relative value for the signal/noise
ratio. This value may range between 0..255, values larger than 50 representing a good recep-
tion.

The data field is structured as follows:

character no. meaning ASCII value ( value range)


1 ident.of satellite track T 53
2 colon : 3A
3 number of traced sat . 0-9 30-39
4 comma , 2C
5 Ident. of sat. S 53
6 colon : 3A
7 tens sat.-no. 0-9 30-39
8 unit sat.-no. 0-9 30-39
9 slash / 2F
10 hundreds SN-ratio 0-9 30-32
11 tens SN-ratio 0-9 30-39
12 unit SN-ratio 0-9 30-39
13 comma , 2C
:
:
55 identifier mode M
56 colon :
57 mode 0, 1 30, 31

Position 5 to 13 is repeated for 6 satellites!


Position 57 indicates the decoding mode.

0 = decoding with Position Fixed


1 = decoding with 3D

Example of a transmitted answer with satellite data:


STX SAT: 08,S:07/143,S:12/145,S:23/034,S:14/145,S:03/123,S:19/047, M:1 CR LF ETX

3.3 Starting Reset of the Clock System


The following data string is used to start a reset (masterreset):
STX RES: CR LF ETX

The clock uses with the following data string,


STX RES: CR LF ETX

to indicate that the command is carried out.

version 04.00 page 11


GPS-satellite clock 6870 - programming manual KRSI Elektronik

4 Configuration of the Serial Interface

4.1 Parameterbyte of the serial Interface


For setting the baud rate etc. please refer to pt.1.2 of this manual. The serial interfaces are
parametered by the following string:

character no. meaning ASCII value ( value range)


1 baudrate tenthousands 0-1 30-31
2 baudrate thousands 0-9 30-39
3 baudrate hundreds 0-9 30-39
4 baudrate tens 0 30
5 baudrate unit 0 30
6 comma , 2c
7 paritybit N,E,O 4e,45,4f
8 comma , 2c
9 data bit 7,8 37,38
10 comma , 2c
11 stop bit 1,2 30,31

Possible baudrates including leading naughts are:

• 19200
• 09600
• 04800
• 02400
• 01200
• 00600
• 00300
• 00150

Example data string of setting the parameter :


STX PAR:09600,N,8,1 CR LF ETX

This string sets the serial interface 1 to the following setting:


9600 baud, no parity, 8 data bits, 1 stop bit

STX PA1:09600,N,8,1 CR LF ETX

this string sets the serial interface 2 to the following setting:


9600 baud, no parity, 8 data bits, 1 stop bit

version 04.00 page 12


GPS-satellite clock 6870 - programming manual KRSI Elektronik

4.2 Modebyte 1 of the serial interface


Modebyte 1 sets operating modes. Every bit represents a switch which is either on = 1 or off = 0.
The meaning of the bit position is as follows:

Bit 8 output of time information


off UTC time
on local time

Bit 7 second advance


off with second advance
on without second advance

Bit 6 transmission with


control characters
off with control characters
on without control characters

Bit 5 ETX on the second change


only if 'with control characters' was selected

off with ETX on the second change


on without ETX on the second change

Bit 4 control characters CR/LF


off LF/CR
on CR/LF

Bit 3 free
off
on

Bit 2 Bit 1 point of transmission


off off transmission every second
off on transmission on the minute change
on off transmission on the hour change
on on transmission on request only

version 04.00 page 13


GPS-satellite clock 6870 - programming manual KRSI Elektronik

character no. meaning ASCII value ( value range)


1 Bit 8 0-1 30-31
2 comma , 2c
3 Bit 7 0-1 30-31
4 comma , 2c
5 Bit 6 0-1 30-31
6 comma , 2c
7 Bit 5 0-1 30-31
8 comma , 2c
9 Bit 4 0-1 30-31
10 comma , 2c
11 Bit 3 0-1 30-31
12 comma , 2c
13 Bit 2 0-1 30-31
14 comma , 2c
15 Bit 1 0-1 30-31

Example data string modebyte 1 for setting serial interface 1:


STX MOD:1,1,0,1,1,0,0,0,CR LF ETX

Example data string modebyte 1 for setting serial interface 2:


STX MO2:1,1,0,1,1,0,0,0,CR LF ETX

This string sets the following transmission mode:

• transmission every second


• transmission without control characters
• transmission without ETX as on-time marker
• transmission sequence of control characters CR/LF
• transmission without second advance
• output local time

version 04.00 page 14


GPS-satellite clock 6870 - programming manual KRSI Elektronik

4.3 Modebyte 2 of the Serial Interfaces


Modebyte 2 sets the transmission string; every bit represents a switch, which knows either the
status on=1 or off=0. Meaning of the individual bit positions:

Bit 3 Bit 2 Bit 1 Bit 0 String


off off off off standard 6021 compatible date and time
off off off on standard 6021 compatible time only
off off on off DCF77 slave
off off on on Siemens Sinec H1
off on off off Siemens MADAM S
off on off on IBM Sysplex Timer
off on on off standard 6021 compatible with year 2000
off on on on T-string
on off off off ABB_T_string
on off off on NGTS-string
on off on off master/slave-string
on off on on SPT-string
on on off off at present standard 6021 compatible date and time
on on off on at present standard 6021 compatible date and time
on on on off at present standard 6021 compatible date and time
on on on on at present standard 6021 compatible date and time

character no. meaning ASCII value ( value range)


1 Bit 7 0-1 30-31
2 comma , 2c
3 Bit 6 0-1 30-31
4 comma , 2c
5 Bit 5 0-1 30-31
6 comma , 2c
7 Bit 4 0-1 30-31
8 comma , 2c
9 Bit 3 0-1 30-31
10 comma , 2c
11 Bit 2 0-1 30-31
12 comma , 2c
13 Bit 1 0-1 30-31
14 Bit 0 0-1 30-31

version 04.00 page 15


GPS-satellite clock 6870 - programming manual KRSI Elektronik

example string for setting modebyte 2 for serial interface 1:


STX MO1:0,0,0,0,0,0,0,0,CR LF ETX

example string for setting modebyte 2 for serial interface 2:


STX MO3:0,0,0,0,0,0,0,0,CR LF ETX

This string sets the following transmission mode:


Transmission standard string 6021 compatible

5 Optical Coupler Configuration


The IMP-command is used to configure the optical couplers. The data string which is to be
transmitted consists of the identifier nibble of the optical coupler, the statusbyte and 3 further
bytes to set the pulse.
Structure of data string: IMP:o,st,ho,mi,se,im

command description value range


IMP: pulse command 4 ASCII Bytes
o corresponding optical coupler 1 Byte hex 31-33
st statusbyte 2 Bytes (see status)
ho value for the hour 2 Bytes ASCII 00-23
mi value for the minute 2 Bytes ASCII 00-59
se value for the second 2 Byte ASCII 00-59
im value for the pulse length 2 Byte ASCII 00-FF

5.1 Structure of the Statusbyte


The statusbyte sets the output mode of the optical couplers. At present the statusbyte uses the
lower 4 bits (0-3) only. The higher bits must always be set to 0.

Bit 7-4 Bit 3 Bit 2 Bit 1 Bit 0 meaning


0 x x 0 0 mode 1: output DCF77-simulation
0 x x 0 1 mode 2: output status radio/crystal operation
0 x x 1 0 mode 3: output system o.k.
0 x 0 1 1 mode 4: cyclic output
0 x 1 1 1 mode 5: single pulse
0 0 x x x not inverted output
0 1 x x x inverted output (only mode 1, 4 and 5)

version 04.00 page 16


GPS-satellite clock 6870 - programming manual KRSI Elektronik

5.2 Pulses
Depending on the set mode in the statusbyte the 3 bytes for the pulse times and the 3 bytes for
the date are decoded.

5.2.1 Cyclic Output Mode 4


In this setting only one value in one of the 3 time bytes (ho, mi, se) can be set with one of the
following values. The bytes dy, mo, and yr must be set to 00:
ho = 0, 1, 2, 3, 4, 6, 8, 12, 24
mi = 0, 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30
se = 0, 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30

Also the pulse length in the last byte must be set in steps of 10msec.
The example data string: IMP:2,0B,00,15,00,64,00,00,00

sets at the optical coupler 2 an inverted pulse of 1 second and a cycle of 15 minutes.

5.2.2 Single Pulse Mode 5


This operating mode requires a logical value in the three time bytes and a the length must be set
in steps of 10 msec in the pulse byte. If the bytes dy, mo, yr are set to naught the pulse is sent
once every day.
The example data string: IMP:1,07,23,59,59,64,00,00,00

sets at the optical coupler 1 a daily pulse of 1 second at 23:59:59 .


If the bytes dy, mo, yr are filled with a date the pulse is sent on those days only. The date is
checked for plausibility first.
The example data string: IMP:1,07,23,59,59,64,29,02,00

sets at the optical coupler 1 a pulse of 1 second on 29. Feb. 2000 at 23:59:59 .

6 DCF77 Simulation and Sync-Bit Settings


This data string configures the DCF77-simulation and the radio bit.
structure of string: CF:mi,hi,lo,sy

command description value range


DCF: DCF77 Sim and radio bit 4 ASCII Bytes
mi entered minutes of DCF77 switch off 2 Byte ASCII 00-FF
hi pulse length DCF77 Highbit 2 Bytes ASCII
lo pulse length DCF77 Lowbit 2 Bytes ASCII
sy delay in minutes of sync.bit switch off 2 Bytes ASCII 00-FF

The length of the DCF77 pulse entered must not exceed the following span:
DCF77 Highpulse: 140-230
DCF77 Lowpulse: 50-130

version 04.00 page 17


GPS-satellite clock 6870 - programming manual KRSI Elektronik

The example data string:


DCF:3C,C8,64,3F

sets the switch off of the DCF77-simulation (optical coupler and antenna output) in case of a
disturbed reception to 60 minutes, the pulse length highbit to 200msec and lowbit to 100msec.
The syc.bit is also switched off after 60 minutes.

7 Remote Software for a Personal Computer


There is a software available under MS Windows 3.x or higher for the remote control of the clock
system.
This programme is used to carry out all the above described functions from a PC or laptop.To be
able to do so the computer must be connected to the clock system via a free serial interface.

The software includes the following functions:

• entry of clock data (time, date)


• entry of position data
• checking for plausibility of the entered data
• creating and transmission of the above data string to the clock system
• monitoring the process by decoding and display of the answer data string
• setting of the optical couplers
• storing of all settings in a set-up file
• print-out of all settings
• monitoring of the previously set output data strings

8 Pin Assignment of the Serial Interfaces


Interface Signal at the 9-pole SUB-D connector

Pin no.: name of signal


1
2 RxD Receive Data
3 TxD Transmit Data
4
5 GND Ground
6
7
8
9

The KRSI
KRSIBBcompany withholds the right to alterations of hard- and software at any
time. The names used in this documentation like MSDos, IBM, Siemens, Windows
etc. are registered trademarks of the respective companies.

version 04.00 page 18

You might also like