EasyManua.ls Logo

Hitachi SJ700-2 Series - TC (0) to TC (7)

Hitachi SJ700-2 Series
134 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 5 Instruction Words
5 - 35
Variable name Range of values Default Unit Data size Attribute
TC (0) to
TC (7)
Timer counters 0 to 2
31
-1 0 10 ms
Unsigned
2-word data
Readable
and writable
- Explanation
These variables can be used to monitor the counts of the timer counters. The timer counters "TC (0)" to
"TC (7)" usually operate as 31-bit free-running timer counters that start simultaneously with user
program startup and are incremented in a 10-ms cycle.
When a timer-start instruction (timer set) or delay operation instruction (delay on or delay off) is
executed, the timer counter corresponding to the instruction operates as the counter for output to a
specified timer contact. In this case, the counter is cleared to zero when the instruction is executed,
starts counting, and then stops counting upon reaching the specified count.
When a timer-stop instruction (timer off) is executed, the timer counter corresponding to the instruction
is cleared to zero and operates as a 31-bit free-running timer counter that is incremented in a 10-ms
cycle.
- Sample program: Program to accelerate the motor step-by-step by using a free-running timer
(Code area [Code Window])
:
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.
if TC(5) < U(00) then LBL1 : When TC (5) indicates less than 10 seconds
if TC(5) < U(01) then LBL2 : When TC (5) indicates less than 20 seconds
if TC(5) < U(02) then LBL3 : When TC (5) indicates less than 30 seconds
if TC(5) >= U(03) then LBL4 : When TC (5) indicates 40 seconds or more
LBL1 SET-Freq= 1000 : When TC (5) is less than 10 seconds,
increase the output frequency to 10 Hz.
goto LBL5
LBL2 SET-Freq= 3000 : When TC (5) is less than 20 seconds,
increase the output frequency to 30 Hz.
goto LBL5
LBL3 SET-Freq= 6000 : When TC (5) is less than 30 seconds,
increase the output frequency to 60 Hz.
goto LBL5
LBL4 FW= 0 : When TC (5) is 40 seconds or more,
decelerate and stop the motor.
wait RUN = 0 : Wait until the motor stops.
SET-Freq= 0 : Set the output frequency to 0 Hz.
TC(5)= 0 : Clear TC (5) to zero.
LBL5 goto LOOP
:
(Data area [Data Window])
U(00) = 1000 : Set 10 seconds in variable "U (00)".
U(01) = 2000 : Set 20 seconds in variable "U (01)".
U(02) = 3000 : Set 30 seconds in variable "U (02)".
U(03) = 4000 : Set 40 seconds in variable "U (03)".

Table of Contents

Related product manuals