Technical data
Appendix
27.3 Data Types and Parameter Types
Programming with STEP 7
596 Manual, 05/2010, A5E02789666-01
27.3.2.5 Format of the Data Type S5TIME (Time Duration)
When you enter time duration using the S5TIME data type, your entries are stored in binary coded
decimal format. The following figure shows the content of the time address with a time value of 127
and a time base of 1 s.
When working with S5TIME, you enter a time value in the range of 0 to 999 and you indicate a time
base (see the following table). The time base indicates the interval at which a timer decrements the
time value by one unit until it reaches 0.
Time base for S5TIME
Time Base Binary Code for 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:
• L
1)
W#16#wxyz
- Where w = time base (that is, the time interval or resolution)
- Where xyz = the time value in binary coded decimal format
• L
1)
S5T#aH_bbM_ccS_dddMS
- 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.
1)
= L only to be specified in STL programming