Chapter 2 Syntax
2-25
timer off (timer-stop instruction)
Instruction to stop the timer
- Format
Format
Description
timer off TD (k)
This instruction clears the k'th timer and operates it as a free-running timer.
- Explanation
This instruction clears the k'th timer counter (up counter) “TC (k)” to zero, and starts the timer counter in free-running timer
mode. Then, the value of timer contact variable “TD (k)” is not changed. The timer counter “TC (k)” is switched from timer
contact output mode to free-running timer mode.
- Sample program
Label
Mnemonic
parameter1
parameter2
parameter3
parameter4
parameter5
㩷
㩷
㩷 䋺
㩷
㩷
㩷
㩷
㩷
㩷
㩷
wait X(00)
= 1
㩷
㩷
: Wait until terminal X (00) is turned on.
㩷
Y(00)= 1
㩷
㩷
㩷
: Turn terminal Y (00) on.
㩷
delay on
Y(01)
TD(1)
1000
㩷
㩷
: Turn terminal Y (01) on with a delay.
㩷
timer set
TD(0)
15.00
㩷
㩷
㩷
: Start the 15-second timer counter.
㩷
if
X(01)
=
0
then
LBL1
: Wait when terminal X (01) is off.
㩷
timer off
TD(1)
㩷
㩷
㩷
㩷
: Clear timer counter TC (1).
LBL1 wait
TD(0) =
1
㩷
㩷
: Wait until the 15-second timer counter
ends counting.
㩷
Y(02)= 1
㩷
㩷
㩷
: Turn terminal Y (02) on when the process
ends.
㩷
㩷 䋺
㩷
㩷
㩷
㩷
㩷
㩷
delay on or delay off (delay operation
instruction)
Instruction to turn a variable on or off with a delay
- Format
Format
Description
delay on
<variable 1>
TD (k)
<variable 2>
or
<constant>
This instruction sets the count of the k'th timer in
<variable 2>
or
<constant>
and starts the timer
counter.
When timer output “TD (k)” is turned on,
<variable 1>
is turned on.
delay off
<variable 1>
TD (k)
<variable 2>
or
<constant>
This instruction sets the count of the k'th timer in
<variable 2>
or
<constant>
and starts the timer
counter.
When timer output “TD (k)” is turned on,
<variable 1>
is turned off.
- Explanation
(1) The delay on (or delay off) instruction sets
<variable 2>
or
<constant>
in the k'th timer buffer, clears the timer counter (up
counter) “TC (k)” to zero, and then initiates counting by the timer counter. Then, the value of timer output variable “TD (k)” is
“0” (off).
(2) Subsequently, the instructions described after the delay on (or delay off) instruction is executed.
(3) When the count of timer counter “TC (k)” matches the count preset in the timer buffer, the value of timer output variable “TD
(k)” changes to “1” (on) (only once), and <variable 1> is turned on (or off). Then, the timer counter “TC (k)” stops counting.
Summary of Contents for NT2021XA
Page 4: ... Safety Instructions ...
Page 8: ... Contents ...
Page 10: ...Chapter 1 Outline of EzSQ ...
Page 14: ...1 4 Chapter 1 Outline of EzSQ ...
Page 16: ...Chapter 2 Syntax ...
Page 68: ...2 52 Chapter 2 Syntax ...
Page 70: ...Chapter 3 Interface with the Inverter ...
Page 80: ...3 10 Chapter 3 Interface with the Inverter ...