Siemens SIMATIC S5 Manual page 114

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

STEP 5 Operations
Loading a time as input, output, flag, or data word
Load statement:
The time 638 sec. is stored in data word DW 2 in BCD code.
Bits 14 and 15 are insignificant for the time value.
15
Time base
Key for time base:
Base
0 0
BINARY
Factor
0.01 sec.
You can also use the control program to write to data word DW 2.
Example: Store the value 270 x 100 msec. in data word DW 2 of data block DB 3.
C
DB 3
L
KT 270.1
T
DW 2
Output of the current time
You can use a load operation to put the current time into ACCUM 1 and process it further from
there (
Figure 3-4). The value is not updated every 10 msec. Last update at processing of
FB 254 SYNC synchronization block.
Use the "Load in BCD" operation for digital display output.
L T1
Binary time value
indicates bit positions occupied by "0".
1 The current time is the time value in the addressed timer.
3-18
L DW 2
11
1 0
0
1
1
0
Three-digit time value
0 1
1 0
0.1 sec.
1 sec.
1
Current time in T1
Figure 3-4. Output of the Current Time (Example)
0
0
1
1
1
0
(in BCD code)
1 1
10 sec.
ACCUM 1
Time
base
S5-115F Manual
0
Bit
0 0
DW 2
LC T1
Three-digit time value
in BCD code
EWA 4NEB 811 6149-02

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents