Timer – IL
The IEC 61131 standart offers a definition of Timers. PLC3000 integrates only TON timers that can be set by defining the time base %Ti.TB, and the preset value %Ti.PV. The timer is triggered by activating the input %Ti.IN, and the output %Ti.Q goes to 1 when the current timer value reaches the preset value.
The time bases %Ti.TB that can be declared are: 10, 100 ms; 1, 10 s; 1 min.
Generation in IL
Let’s consider three timers with different time bases and preset values
LD %S1 %T0.TB := 100ms %T1.TB := 1s %T2.TB := 1min %T0.PV := 3 %T1.PV := 2 %T2.PV := 1
Illustration with a Grafcet
Let’s consider the following Grafcet
Programming in IL – Transition/Transition with Crossing Bits
* TIMER LD %S1 %T0.TB := 100ms %T0.PV := 3 * INIT LD %S2 S %M0 R %M1 * TRANSITIONS LD %M0 AND %I0 ST %M10 * LD %M1 AND %T0.Q ST %M11 * CROSSING LD %M10 S %M1 R %M0 * LD %M11 S %M0 R %M1 * ACTIONS LD %M1 ST %T0.IN