Mitsubishi Electronics QnUCPU Home Theater Server User Manual


 
CHAPTER9 DEVICES
9
2
3
4
5
6
7
8
9.2 Internal User Device
9.2.10 Timer (T)
9 - 25
(8) Precautions for using timers
(a) Use of the same timer
Do not use the OUT T instruction that describes the same timer more than once within one scan.
If this occurs, the current timer value will be updated by each OUT T instruction execution, resulting in
incorrect time measurement.
(b) When the timer is not executed in every scan
While a coil of a timer (for example. T1) is on, do not make the
OUT T1 instruction jumped to any other
part with another instruction such as CJ.
If jump of the OUT T instruction has occurred, the current timer value is not updated.
Also, if a timer exists in a subroutine program, execute a subroutine call including the OUT T1
instruction once in each scan while the coil of the timer (for example, T1) is on.
Failure to do so will not update the current timer value.
(c) Programs that cannot use timers
Timers cannot be used in interrupt programs and fixed scan execution programs.
(d) When the set value is 0
The contact turns on when the
OUT T instruction is executed.
(e) When the set value is 1
When the timer limit setting value is greater than the scan time value, the count value of the timer
becomes 1 at execution of the END instruction in a scan where the count value reaches to the timer
limit setting value.
When the coil of the timer turns on in the scan next to the one where the count value becomes 1, the current
timer value becomes 1. In this case, the timer times up in the step and the contact turns on.
If the contact of the timer (setting value = 1) turns on in a short time, change the timer with small timer limit
setting value and set a greater value to the contact.
Figure 9.27 When the same timer is used
Figure 9.28 Operation when the set value is 1
END END
OUT
T
OUT
T
OUT
T
OUT
T
OUT
T
Current value is updated.
Sequence
program
1 scan
Scan time
END
010 1
1
0
0
OFF
ON
ON
ON
OFF
OFF
X0
Coil of T0
Contact of T0
END END END END END END
X0
K1
T0
Timer limit setting value
Count at execution
of the END instruction
Current timer value
Timer counting