Examples
Programming example for "set system time"
FB 13 is programmed for the "set system time" function. The new values are
transferred in data block DB 10 (data word DW 0 to DW 3).
STEP 5 program:
FB13
NAME
:CLKWR
:C
DB 10
Open DB 10
:L
KH 1500
15 seconds (10th .. 100th sec. = 0!)
:T
DW 0
:L
KH 9555
24 hour mode, 15 hours 55 minutes
:T
DW 1
:L
KH 1010
the 10th, Tuesday
:T
DW 2
:L
KH 9308
1993, August
:T
DW 3
:MBR EEC00
Load start address of the DB list
:
in the BR
:LRW +10
Load the start address of DB 10 in memory
:
(paragraph address) in ACCU 1
:SLD 4
Absolute address of DB 10 (DW 0)
:MAB
Load content of ACCU 1 into BR register
:L
KB 1
Load function no. ’1’ in ACCU-1-L
:JU OB 121
Set system time
:L
KB 0
:><F
Scan error bits
:JC =ERRO
Jump to error handling
:BEU
:
ERRO
:
Error handling
:
:BE
Data block DB 10 contains the following information when OB 121 is called:
0: KH = 1500;
1: KH = 9555;
2: KH = 1010;
3: KH = 9308;
4:
OB 121 transfers the required time parameters from DB 10 to the system data
area RS 96 to RS 99.
OB 121: Set/Read System Time
CPU 948 Programming Guide
6 - 10
C79000-G8576-C848-04
Summary of Contents for CPU 948
Page 10: ...Contents CPU 948 Programming Guide 1 2 C79000 G8576 C848 04 ...
Page 32: ...Contents CPU 948 Programming Guide 2 2 C79000 G8576 C848 04 ...
Page 72: ...Data Blocks CPU 948 Programming Guide 2 42 C79000 G8576 C848 04 ...
Page 74: ...Contents CPU 948 Programming Guide 3 2 C79000 G8576 C848 04 ...
Page 154: ...Contents CPU 948 Programming Guide 4 2 C79000 G8576 C848 04 ...
Page 200: ...Contents CPU 948 Programming Guide 5 2 C79000 G8576 C848 04 ...
Page 308: ...Contents CPU 948 Programming Guide 7 2 C79000 G8576 C848 04 ...
Page 324: ...Examples of Parameter Assignment CPU 948 Programming Guide 7 18 C79000 G8576 C848 04 ...
Page 326: ...Contents CPU 948 Programming Guide 8 2 C79000 G8576 C848 04 ...
Page 370: ...Addressable System Data Area CPU 948 Programming Guide 8 46 C79000 G8576 C848 04 ...
Page 372: ...Contents CPU 948 Programming Guide 9 2 C79000 G8576 C848 04 ...
Page 486: ...Contents CPU 948 Programming Guide 11 2 C79000 G8576 C848 04 ...
Page 522: ...PG Functions via the S5 Bus CPU 948 Programming Guide 11 38 C79000 G8576 C848 04 ...
Page 524: ...Contents CPU 948 Programming Guide 12 2 C79000 G8576 C848 04 ...
Page 538: ...Contents CPU 948 Programming Guide 13 2 C79000 G8576 C848 04 ...
Page 546: ...List of Key Words CPU 948 Programming Guide Index 6 C79000 G8576 C848 04 ...