Mitsubishi Electronics FX3UC Garage Door Opener User Manual


 
105
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
4 Devices in Detail
4.6 Counter [C]
1
Introduction
2
Overview
3
Instruction
List
4
Devices
in Detail
5
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
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
scan 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 scan time.
For high-speed counters, refer to Section 4.7 or 4.8.
4.6.7 Handling counters as numeric devices
Counters use output contacts operating in accordance with the set value or use the counter value (current value) as
numeric data for control.
The figure below shows the structure of the current value register of a counter. When a counter number is specified in
an operand of an applied instruction in execution, the counter is handled as a device storing 16-bit or 32-bit data in the
same way as data register.
A 32-bit counter is handled as 32-bit data.
1. Structure of register storing current value of counter
1) 16-bit
2) 32-bit
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.
1010101010101010
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
b15
Sign
0: Positive
number
1: Negative
number
*1
b0
High
order
Low
order
16 bits Available numeric value range
16-bit counter: 0 to 32767
32-bit counter:
2,147,483,648 to
+2,147,483,647
*1. The sign is valid only when a counter is handled as a substitute for data register.
0000111100001111
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
b31
Sign
0: Positive
number
1: Negative
number
b0
High
order
Low
order
32 bits
1010101010101010
32768
65536
131,072
262,144
524,288
1,048,576
2,097,152
4,194,304
8,388,608
16,777,216
33,554,432
67,108,864
134,217,728
268,435,456
536,870,912
1,073,741,824