EasyManua.ls Logo

Siemens CPU 948 - Page 248

Siemens CPU 948
548 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Table of Contents

Related product manuals