2.2 TM16 (16-bit Timer)
When specifying a constant
- TM instruction
TMX0 U100
R0
T0
Y111
TE0
U100
TS0
U100
U100 is set in the setting value area TS0 when compiling the program.
The setting value area TS0 is set in the elapsed value area TE0 when the input of R0 rises.
The setting range of a constant is U0 to U4294967295.
- TM16 instruction
TM16X
0
U100
R0
T0
Y111
TE0
U100
TS0
U100
U100 is set in the setting value area TS0 when compiling the program.
The setting value area TS0 is set in the elapsed value area TE0 when the input of R0 rises.
The setting range of a constant is U0 to U65535.
Note)
When a 32-bit value is written into the elapsed value area TE while the timer is being operated
using an instruction such as MV instruction, the timer operates with the written 32-bit value.
When a 32-bit value is written into the setting value area TS, the timer operates with the
written 32-bit value.
Precautions during programming
Both the timer setting value area TS and the timer elapsed value area TE occupy the 32-bit
area.
When specifying a 16-bit device such as DT for the operation [S] of TM16 instruction, it is
used as 16-bit data.
As subtraction is performed during an arithmetic operation, create a program to subtract
once during one scan time. Correct results cannot be acquired when subtraction operation is
performed several times during one scan due to an interrupt program or the jump/loop
instruction, or when subtraction cannot be performed.
When U0 is specified for the setting value, the timeout operation is performed when the
instruction is executed and the timer contact [T] turns ON.
Please be aware that the program is not described incorrectly when combining the timer
instruction with the and stack instruction or pop stack instruction. (For details, refer to 2.4
Precautions for Programming.)