
C-9
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
When you enter time duration using the S5TIME data type, your entries are
stored in binary coded decimal format (BCD, see Figure C-7 and Table C-8).
When working with S5TIME, you enter a time value in the range of 0 to 999
and you indicate a time base (see Table C-8). The time base indicates the
interval at which a timer decrements the time value by one unit until it
reaches 0.
Time base
1 second
Irrelevant: These bits are ignored when the timer is started.
Time value in BCD (0 to 999)
15... ...8 7... ...0
127
x x10000100100111
Figure C-7 Contents of Timer Address: Timer Value 127, Time Base 1 Second
Table C-8 Time Base for S5TIME
Time Base
Binary Code for the Time Base
10 ms 00
100 ms 01
1 s 10
10 s 11
You can pre-load a time value using either of the following syntax formats:
S W#16#wxyz
– Where w = the time base (that is, the time interval or resolution)
– Where xyz = the time value in binary coded decimal format
S S5T# aH_bbM_ccS_ddMS
– Where a = hours, bb = minutes, cc = seconds, and dd = milliseconds
– The time base is selected automatically and the value is rounded to the
next lower number with that time base.
The maximum time value that you can enter is 9,990 seconds, or
2H_46M_30S.
When you enter date and time using the DATE_AND_TIME data type, your
entries are stored in binary coded decimal format (see Table C-9). The
DATE_AND_TIME data type has the following range:
DT#1990-1-1-0:0:0.0 to DT#2089-12-31-23:59:59.999
Entering Duration
of Time
Entering Date and
Time
Number Notation
Comentarios a estos manuales