Bits 12 and 13 of the timer word contain the time base in binary code. The timebase defines the interval at which the time value is decremented by one unit. The smallest time base is 10 ms; the largest is 10 s.
Time BaseBinary Code for the Time Base
10 ms00100 ms011 s1010 s11Values that exceed 2hours 46minutes & 30seconds are not accepted. A value whose resolution is too high for the range limits (for example, 2h10ms) istruncated down to a valid resolution. The general format for S5TIME has limitsto range and resolution as shown below:
ResolutionRange
0.01 second10MS to 9S_990MS0.1 second100MS to 1M_39S_900MS1 second1S to 16M_39S10 seconds10S to 2H_46M_30S-
Bit Configuration in the Time Cell
When a timer is started, the contents of the timer cell are used as the timevalue. Bits 0 through 11 of the timer cell hold the time value in binary codeddecimal format (BCD format: each set of four bits contains the binary code forone decimal value). Bits 12 and 13 hold the time base in binary code. The following figure shows the contents of the timer cell loaded with timer value127 and a time base of 1 second:
15 8 7 0
XX10000100100111
Time value in BCD (0 to 999) Time Base 1 Second Irrelevant: These bits are ignored when the timer is started.
Reading the Time and the Time Base
Each timer box provides two outputs, BI and BCD, for which you can indicate a word location. The BI output provides the time value in binary format. The BCDoutput provides the time base and the time value in binary coded decimal (BCD)format.
Choosing the right Timer
This overview is intended to help you choose the right timer for your timing job.
Leave a Comment