Description
• The
CT
instruction is a down type preset counter.
• If there are not enough
CT
instruction numbers, you can increase the number by changing the
setting of system register 5. Refer to page 230, “8-5. System Registers”, for details on how to
change the number of contact numbers.
• When programming the
CT
instruction, be sure to program the count and reset triggers.
Count trigger: subtract one count from elapsed value area EV each time its leading edge is
detected.
(trigger X0 in the example)
Reset trigger: reset the counter when this is ON.
(trigger X1 in the example)
■
Counter operation
• When the decimal constant “K” is specified as a set value:
Procedure:
1
When the mode of the programmable controller is set to
RUN, K10 (decimal) is transferred to the set value area
SV100.
2
When reset trigger X1 turns ON, elapsed value area
EV100 is reset. The value in the SV100 is transferred to
the EV100 when the trailing edge of X1 is detected
(ON
→
OFF).
3
Each time the leading edge of count trigger X0 is
detected, one count is subtracted from the value in the
elapsed value area EV100.
4
When the elapsed value area EV100 becomes 0,
counter contact C100 turns ON and then Y0 goes ON.
• When the “SVn” is specified as a preset value:
Procedure:
1
When reset trigger X1 turns ON, elapsed value area
EV100 is reset. The value in SV100 is transferred to the
EV100 when the trailing edge of X1 is detected (ON
→
OFF).
2
Each time the leading edge of count trigger X0 is
detected, one count is subtracted from the value in the
elapsed value area EV100.
3
When the elapsed value area EV100 becomes 0, counter
contact C100 turns ON and then Y0 goes ON.
Notes:
• Even if the mode of the programmable controller is changed from PROG. to RUN, the set value is not set
to the elapsed value area. If you need to preset the counter elapsed value area, be sure to turn the reset
trigger ON and then OFF once before use.
• Counter set value area SV is a memory area for the counter setting.
• The counter contact goes ON when the value in the counter elapsed value area (EV) becomes 0.
However, the value in the elapsed value area for the counter will also become 0 in a reset condition.
Continued
120
5-3. Description of Basic Instructions
X0
X1
C100
Y0
CT 10
Elapsed
value
Set value
SV100
10
EV100
10
9
8
7
EV100
0
•
•
•
•
•
•
4
3
100 0
1
2
X0
X1
C100
Y0
CT SV100
Elapsed
value
Set value
EV100
10
9
8
7
EV100
0
•
•
•
•
•
•
3
2
100
1
R9010
F0 MV, DT9040, SV100
0
Summary of Contents for FP1
Page 1: ...PROGRAMMABLE CONTROLLER FP1 is a global brand name of Matsushita Electric Works Hardware ...
Page 28: ...20 ...
Page 98: ...90 ...
Page 150: ...142 ...
Page 208: ...200 ...
Page 226: ...218 ...
Page 280: ...272 ...