Manual BG41/BG42/BG43 Software
Rev. 99/49 4-9
The allocation of the data words from DW2 up to DW5 is only of significance for the sub-command
01h (= transfer time and date in BCD format to PLC) and 02h (= set clock).
The data words are irrelevant for the sub-commands 03h (= set clock one hour forward) and 04h
(= set clock one hour back).
For the sub-command 05h (= transfer time and date in ASCII format to the PLC) the string to be
transferred is filed in the data words DW2…DW11.
The following character string is, for example, transmitted: Fr 02.06.89 22:55:58
Allocation of the Data Blocks
Example FB102 (UHR)
Function "set clock": the clock is to be set to:
Tuesday 06.06.89 14:53:00
DB 99 is to be allocated the following values:
DL DR
DW0 40h 00h Acknow. byte Error byte
DW1 40h 02h Address clock Set clock
DW2 00h 53h Seconds Minutes
DW3 14h 06h Hours Day
DW4 06h 89h Month Year
DW5 02h 00h Weekday
Tab. 4-4: Example FB102 (UHR)
OB Cycle
BAUSTEIN#OB1
BIB #14026
00002 :
00004 :UN M 0.0
00006 :S M 0.0 Time in every cycle
0000C :
0000E :SPA FB 102
NAME #UHR
ADR =KH F080 Building block’s base address:
F080h
DB =DB 99 Clock DB-Nr:99
FRG =M 0.0 Enable bit
NEUS =M 0.1 Restart flag, which is to be
0001A : placed in OB22
0001E :U M 0.1 Erase restart flag
00020 :R M 0.1
00022 :BE