Chapter 5 Instruction Words
5 - 36
Variable name Range of values Default Unit Data size Attribute
TD (0) to
TD (7)
Timer contact output
(bit access)
0: Off
1: On
0 -
Unsigned
1-word
data
Readable
TDw
Timer contact output
(word access)
0 to 255 0 -
Unsigned
1-word
data
Readable
- Explanation
The data in timer contact output variables "TD (0)" to "TD (7)" is changed only when these variables are
specified in the timer-start instruction (timer set) or delay operation instruction (delay on or delay off). A
timer contact output variable is set to "0" (off) when the counter corresponding to the contact output is
cleared to zero; the variable is set to "1" (on) when the counter stops counting.
While a timer counter variable "TC (k)" is being used for a free-running timer counter, timer contact
output variable "TD (k)" corresponding to the timer counter variable retains its status.
- Sample program: Program to accelerate the motor step-by-step by using a timer contact
:
TDw= 0
ACCEL= 1000 : Set the acceleration time to 10 seconds.
DECEL= 1000 : Set the deceleration time to 10 seconds.
SET-Freq= 0 : Set the output frequency to 0 Hz.
LOOP FW= 1 : Start forward rotation of the motor.
timer set TD(5) 10.00 : Start the 10-second timer counter.
SET-Freq= 1000 : Keep the output frequency at 10 Hz for 10 seconds.
wait TD(5) = 1 : Wait until the timer contact is turned on.
timer set TD(5) 10.00 : Start the 10-second timer counter.
SET-Freq= 3000 : Keep the output frequency at 30 Hz for 10 seconds.
wait TD(5) = 1 : Wait until the timer contact is turned on.
timer set TD(5) 10.00 : Start the 10-second timer counter.
SET-Freq= 6000 : Keep the output frequency at 60 Hz for 10 seconds.
wait TD(5) = 1 : Wait until the timer contact is turned on.
FW= 0
wait RUN = 0 : Wait until the motor stops.
SET-Freq= 0 : Set the output frequency to 0 Hz.
goto LOOP
: