151
CIO 0101 and CIO 0100 will be decremented by –1 every 0.1 s. If the PV reaches
0000 0000, the Completion Flag (CIO 015000) will turn ON. If CIO 000000 turns
OFF, the PV will again be set to the SV.
Address Instruction
00000 LD 000000
00001 TIML(121) 0150
0100
#00864000
(121)
TIML 0150 0100 #00864000
0000
00
Operands
The following figure illustrates the relationship between the execution condition
for a long timer with a SV of 0086400.0 s (1 day), its PV, and the Completion Flag
assigned to it.
Timer input (000000)
Completion Flag
(015000)
PV: 0086 4000
0000 0000
1 day
5-13-5 MULTI-OUTPUT TIMER: MTIM(122)
(122)
MTIM D
1
D
2
S
D
2
: PV word CIO, G, A, T, C, DM, DR, IR
S: First SV word CIO, G, A, T, C, #, DM
D
1
: Completion Flags CIO, G, A, T, C, DM
Operand Data AreasLadder Symbol
Description MTIM(122) is an accumulative timer that can have up to eight pairs of set values
and Completion Flags. Unlike most timer instructions, MTIM(122) is not defined
using a timer number and timer numbers are not needed to access the Comple-
tion Flags and PV. The timer is activated when the MTIM(122) execution condi-
tion is ON and the reset bit (bit 08 of D
1
) goes from ON to OFF.
Once activated, MTIM(122) increments the content of D
2
(the PV) from zero in
units of 0.1 second. If the PV reaches 999.9 s, it continues counting from 000.0,
and all Completion Flags are reset to zero. MTIM(122) accuracy is +0.0/–0.1 se-
cond.
Each time the instruction is executed, the PV (content of D
2
) is compared to the
eight SVs in S through S+7, and if any of the SVs is less than or equal to the PV,
the corresponding Completion Flag (D
1
bits 00 through 07) is turned ON. For
greater accuracy, the same MTIM(122) instruction can be input into the program
several times so the PV:SV comparison is made more frequently.
The timer can be reset by turning ON the reset bit (bit 08 of D
1
), which resets the
PV and all Completion Flags to zero. Counting resumes from zero when the re-
set bit is turned OFF if the instruction execution condition is ON.
The pause bit (bit 09 of D
1
) can be turned ON to stop counting while maintaining
the status of the PV and Completion Flags. The MTIM(122) instruction is treated
as a NOP(000) instruction when the pause bit is ON and the reset bit is OFF.
When the pause bit is turned OFF, counting resumes from the previous PV.
Timer and Counter Instructions Section 5-13