S5-100U
Prompt Time Sequence
•
Bit 13 in the status word is set after the prompt time has elapsed.
•
Bit 13 remains set until you reset it in the control program.
•
The prompt time can be read at any time.
Caution
!
If the prompt time is reached in the STOP mode or during Power OFF, the prompt time
cannot be evaluated. It is always deleted on restart.
Example:
Setting and evaluating the prompt time
In the example program, the status of input I 0.6 determines whether the settings for the prompt time
are transferred. Before setting input I 0.6, you must transfer the settings to flag bytes FY130 and
FY135. Enter values that you do not wish to be evaluated as FF
You set the clock mode with input I 1.0. Use input I 0.1 to specify the the AM/PM bit for 12-hour
mode.
If the preset prompt time has been reached, set flag F 13.2. If errors are made while entering the
prompt time, the error bit, flag F 12.2, is set.
The clock data is stored in DB2 beginning with data word DW0, and the status word is flag word
FW10.
OB1 STL
:
:
:
:
:
:A
I
0.6
:S
F
20.1
:JU
FB
11
NAME :SET PROMPT TIME
WDAY :
FY 130
DAY
:
FY 131
MON
:
FY 132
HOUR :
FY 133
AMPM :
I
0.1
MIN
:
FY 134
SEC
:
FY 135
ERR
:
F
12.2
ALRM :
F
13.2
MODE :
I
1.0
:BE
EWA 4NEB 812 6120-02
.
H
Explanation
=========================================
SETTING AND EVALUATING THE PROMPT TIME
=========================================
LOAD VALUES INTO FY130 TO FY135
FIRST.
TRIGGER SETTING OF PROMPT TIME
BY SETTING F 20.1 (RESET IN FB11)
(SET AND EVALUATING PROMPT TIME)
WEEKDAY
DAY
MONTH
HOUR
AMPM-BIT (ONLY IMPORTANT IN 12-HOUR MODE)
MINUTES
SECONDS
ERROR BIT
DISPLAYS THAT PROMPT TIME IS REACHED.
12-HOUR MODE: I 33.0 = 1
The Integral Real-Time Clock
12-27