26.10.2012 Views

Statement List (STL) - DCE FEL ČVUT v Praze

Statement List (STL) - DCE FEL ČVUT v Praze

Statement List (STL) - DCE FEL ČVUT v Praze

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Time Base<br />

Timer Instructions<br />

Bits 12 and 13 of the timer word contain the time base in binary code. The time base<br />

defines the interval at which the time value is decremented by one unit. The smallest<br />

time base is 10 ms; the largest is 10 s.<br />

Time Base Binary Code for the Time Base<br />

10 ms 00<br />

100 ms 01<br />

1 s 10<br />

10 s 11<br />

Values that exceed 2h46m30s are not accepted. A value whose resolution is too<br />

high for the range limits (for example, 2h10ms) is truncated down to a valid<br />

resolution. The general format for S5TIME has limits to range and resolution as<br />

shown below:<br />

Resolution Range<br />

0.01 second 10MS to 9S_990MS<br />

0.1 second 100MS to 1M_39S_900MS<br />

1 second 1S to 16M_39S<br />

10 seconds 10S to 2H_46M_30S<br />

Bit Configuration in ACCU 1<br />

When a timer is started, the contents of ACCU1 are used as the time value. Bits 0<br />

through 11 of the ACCU1-L hold the time value in binary coded decimal format (BCD<br />

format: each set of four bits contains the binary code for one decimal value). Bits 12<br />

and 13 hold the time base in binary code.<br />

The following figure shows the contents of ACCU1-L loaded with timer value 127 and<br />

a time base of 1 second:<br />

15... ...8 7... ...0<br />

x x 1 0 0 0 0 1 0 0 1 0 0 1 1 1<br />

Time base<br />

1 second<br />

1 2 7<br />

Time value in BCD (0 to 999)<br />

Irrelevant: These bits are ignored when the timer is started.<br />

<strong>Statement</strong> <strong>List</strong> (<strong>STL</strong>) for S7-300 and S7-400 Programming<br />

A5E00706960-01 12-3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!