STEP 5 Operations S5-115F Manual
Loading a time as input, output, flag, or data word
Load statement: L DW 2
The time 638 sec. is stored in data word DW 2 in BCD code.
Bits 14 and 15 are insignificant for the time value.
11
015
1 0 1 0 0
Bit
Time base
Three-digit time value
(in BCD code)
DW 2
011100010
Key for time base:
Base 0 0 0 1 1 0 1 1
BINARY
Factor 0.01 sec. 0.1 sec. 1 sec. 10 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
1
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.
Binary time value
ACCUM 1
Time
base
Current time in T1
L T1 LC T1
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Three-digit time value
in BCD code
indicates bit positions occupied by ”0”.
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Figure 3-4. Output of the Current Time (Example)
1 The current time is the time value in the addressed timer.
3-18
EWA 4NEB 811 6149-02