Tag Archives: plc timer example

Time control programming example implemented by Mitsubishi PLC with timer and counter

Time control programming example

The timer of the Mitsubishi plc FX series is a power-on delay timer. Its working principle is that after the timer coil is energized, the delay starts, the time is up, the contact action; when the timer coil is powered off, the timer The contact is instantly reset.

However, in practical applications, we often encounter control requirements such as power-off delay, time-limited control, and long delay, which can be achieved through programming.

1, power-on delay control

The delay on control program is shown in Figure 3-27. The control function it realizes is that after X1 is turned on 5, Y0 has output.

The working principle is analyzed as follows:

When X1 is in the 0N state, the coil of the auxiliary relay M0 is turned on, and its normally open contact is closed and self-locking, so that the coil of the timer T0 can be kept in the power state.

After the coil of T0 is turned on for 5 s, the current value of T0 is equal to the set value, the normally open contact of T0 is closed, and the coil of output relay Y0 is turned on.

When X2 is in the ON state, the coil of the auxiliary relay M0 is turned off, the timer T0 is reset, and the normally open contact of T0 is turned off, so that the coil of the output relay Y0 is turned off.

2, power failure delay control

The delay off control program is shown in Figure 3-28. The control function it implements is that the output stops working after the input signal is disconnected for 10s.

The working principle is analyzed as follows:

When X0 is in the ON state, the coil of the auxiliary relay M0 is turned on, its normally open contact is closed, and the coil of the output relay Y3 is turned on. However, the coil of timer T0 will not be energized (because its front () is off).

When X0 changes from ON to OFF, () is in the on state, and timer T0 starts counting. After l0s, the normally closed contact of T0 is opened, the coil of M0 is de-energized, and the output relay Y0 is disconnected.

3, limited time control

In actual engineering, it is often encountered to limit the working time of the load to a specified time. This can be achieved by the program shown in the figure, which implements the control function of controlling the maximum working time of the load as l0s.

The program can achieve the minimum working time to control the load. The control function implemented by this program is that the minimum working time of the output signal Y2 is 10s.

4, long delay control program

In the PLC, the timer’s timing is limited, the maximum is 3276.7s, less than lh. To achieve longer timing, you can use two or more timer cascades, or use a timer with a counter, or use a counter with a clock pulse.

(1) Timer cascade use

When the timer is used in cascade, its total timing is the sum of the time set by each timer.

Figure Use two timers to complete the 1.5h timing. When the timing is up, Y0 is powered.

(2) Combination of timer and counter

The timing of 1h is completed with a timer and a counter.

When X0 is turned on, M0 is powered and self-locked, and timer T0 generates a pulse sequence with a period of 100s by itself resetting as a count pulse of counter C0. When the counter has 36 pulses, its normally open contact closes, causing output Y0 to turn on. From X0 to Y0, the delay time is 100s x 36 = 3600s, which is 1h.

(3) Combination of two counters

Figure 3-33 shows the timing of 1h with two counters.

M8013 (1s clock pulse) is used as the count pulse of counter C0. When X0 is turned on, counter C0 starts counting.

After 60 pulses (60 s) have been counted, its normally open contact C0 sends a count pulse to counter C1 and resets counter c0.

The counter C1 counts the c0 pulse. When 60 pulses are counted, the normally open contact of C1 is closed, and the output Y0 is turned on. From X0 to Y0, the timing is 60s x 60 = 3600s, which is 1h.

5, boot cumulative time control program

The PLC running cumulative time control circuit can be used in combination with M8000, M8013 and counter to compile the display circuit of seconds, minutes, hours, days and years. Here, you need to use the power-off type counter (C100~C199), so that the accumulated time of each power-on can be timed, as shown in the figure.

How to program MITSUBISHI PLC timer?

Timer: T0-T199 (200 points) is a 100 ms timer (set value: 0.1-3276.7 S); T200-T245 (46 points) is a 10 ms timer (set value: 0.01-327.67 S); T246-T149 (4 points) is a 1 mS cumulative timer (set value: 0.001-32.767 S, power loss retention, i.e. interruption); T250-T255 (6 points) is a 100 ms timer (set value: 0.01-327.67 S); Cumulative timer (set value: 0.1~3276.7 S, power loss maintenance, that is, interrupt action).

If T192-T199 and T246-T249 are used in subroutines or interrupt programs, the current value of the timer is modified when the END instruction is executed. When the current value of the timer is equal to the set value, its output contacts act when executing the timer coil instruction or the END instruction. If the timer is not used, the work of the timer may not be normal under special circumstances.

If a 1ms timer is used to interrupt programs and subroutines, its contacts act when executing the first coil instruction of the timer after its current value reaches a set value.

Use the T command format (Tn KX), is an example:

LD X0
OUT T0 K100

It means that when x0 is connected, time is 10 seconds and T0 is connected. Subsequent use of T0 to punish the required output points can achieve the purpose of controlling the time delay.

T is a timer symbol, 0 is a number, K is a constant, is decimal, that is, set to K10 is a second.

mitsubishi plc timers

The manual says, using a special timer in T192 ~ subroutine and interrupt subroutine in T199, I now subroutine timer is not enough, can I use the general timer in the subroutine, in addition, for the 192~199 general and special Godson program timer in the end what is the difference?
Timer: T0~T199 (200 point) is the timer of 100ms (set value: 0.1~3276.7 S); T200~T245 (46 point) is the timer of 10ms (set value: 0.01~327.67 S); T246~T149 (4 points) is a 1mS cumulative timer (set value: 0.001~32.767 S, power loss retention, that is, interrupt action); 6 Cumulative timer (set value: 0.1~3276.7 S, power loss maintenance, that is, interrupt action).
If T192 to T199 and T246 to T249 are used in subroutines or interrupt programs, the current value of the timer is modified when END instructions are executed. When the current value of the timer is equal to the set value, its output contacts act when executing the timer coil instruction or the END instruction. If the timer is not used, the work of the timer may not be normal under special circumstances.
If the 1ms timer is used to interrupt the program and the subroutine, after its current value has reached the set value, its contacts act when the first coil instruction of the timer is executed.