S5TIME

Top 

 

This data type has got a size of one word and is called so because it displays the specified duration by the same 16-bit wide bit pattern, like a constant in the STEP ®5-world that is preceded by KT. We are a little bit unhappy about the fact that this data format that runs out of the existing right after nearly 30 years of modern computer technology is saved in the STEP ®7-world, but because we have to pay attention to the compatibility to STEP ®7 we took it over.

A constant that is specified as S5TIME is translated into a three-digit BCD-number. As you need just 12 bits displaying a three-digit BCD-number four bits stay still empty. The both higher valued bits are used for internal informations in STEP ®5 so that two bits are left to save the ‘Time Base’. The ‘Time Base’ codes in which unit the three-digit BCD-number is specified.

The following specification is valid:

 

      00     :     1/100 sec

      01     :     1/10 sec

      10     :     1 sec

      11     :     10 sec

 

As a consequence of this just time intervalls from 0.01 sec till 9990 sec can be specified in this format. As long as you only use the S5TIME format to specify concrete durations at starting of timers it is quite comfortable. You can use the following letters for specification of durations:

 

      H      hour

      M      minute

      S      second

      MS     milli second

 

A typical S5TIME-constant looks like this:

 

      S5T#2H       2 hours

      S5T#20MS     20 milli seconds

      S5T#1M5S     1 minute and 5 seconds

      S5T#1H200S   1 hour and 200 seconds

 

A S5T#-constant is always coded with the highest resolution by the compiler in the time bases. You will have to take this into consideration if you load the run out time values as binary number because doing this the time base does not exist anymore and can only be reconstructed by the knowledge of the time base with which the timer was started.

 

See also:

TIME