106
FX
3G
/FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
4 Devices in Detail
4.6 Counter [C]
4.6.5
Set value specification method
1. 16-bit counter
1) Specification by constant (K)
2) Indirect specification (D)
2. 32-bit counter
1) Specification by constant (K)
2) Indirect specification (D)
4.6.6
Response speed of counters
Counters execute counting by cyclic operating for contact operations of internal signals X, Y, M, S, C, etc.
inside the PLC.
For example, when X011 is specified as counting input, its ON duration and OFF duration should be longer
than the cycle time of the PLC (which is tens of Hz or less usually).
On the other hand, high speed counters described later execute counting as an interrupt processing for
specific input, and can execute counting at 5 k to 6 kHz regardless of the cycle time.
→
For high speed counters, refer to Section 4.7.
X003
C 0
K100
Constant (decimal constant): 1 to 32767
100 counts
X001
FNC 12
MOV
K100
D 5
X003
C 0
D 5
D5 = 100
100 counts
Counts to the indirectly specified value of the defined data
register, previously set by a digital switch.
Note that the set value of a latched (battery backed) type
register is not held correctly sometimes when the battery
voltage becomes low.
X003
C200
K43,210
Constant (decimal constant):
−
2,147,483,648 to +2,147,483,647
43210 counts
X001
FNC 12
DMOV
K43210 D5(D6)
X003
C200
D5(D6)
Pairs of data registers are used for indirect specification.
Use a 32-bit instruction for writing the set value, and make
sure that the latter of paired registers (D6 in this example)
does not overlap with other programs because it is not
shown in ladder format.