Mitsubishi Electronics FX3GC Garage Door Opener User Manual


 
103
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
4.6.3 Related devices (to specify counting direction) [32-bit counter]
When an auxiliary relay for switching the counting direction is set to ON, the counter executes down-counting, and
when set to OFF, the counter executes up-counting.
4.6.4 Functions and operation examples
1. General type and latched (battery backed) type 16-bit up counters
The valid set range of 16-bit binary up counter is from K1 to K32767 (decimal constant).
K0 provides the same operation as K1, and the output contact turns on at the first counting.
In general type counters, the counter value is cleared when the PLC turns off. In latch type counters, however, the
counter value just before power failure is stored (backed up by the battery); The counter value in the subsequent
operations can be added to the last counter value.
Every time the coil C0 is driven by the counting input X011, the current value of the counter increases. When a coil
instruction is executed 10 times, the output contact turns on.
After that, the current value of the counter does not change even if the counting input X011 turns on after that.
When the RST input X010 turns ON and then RST instruction is executed, the current value of the counter is reset
to "0" and the output contact returns.
The counter set value can be set by a constant (K) as shown above, or indirectly specified by a data register
number. For example, when D10 is specified and the contents of D10 are "123", it is equivalent to "K123".
If data beyond the set value is written to the current value register by MOV instruction, etc., the OUT coil turns ON
and the current value register becomes the set value when the next counting input is received.
For latched (battery backed) type counters, the current value, output contact operation and reset status are backed
up against power failure.
In FX
3U/FX3UC PLCs, latched type counters are backed up by the battery built into the PLC.
In FX
3S/FX3G/FX3GC PLCs, latched type counters are backed up by the EEPROM built into the PLC.
For details on backup methods against power failure, refer to Section 2.6.
Counter No.
Counting
direction
switching
relay
Counter No.
Counting
direction
switching
relay
Counter No.
Counting
direction
switching
relay
Counter No.
Counting
direction
switching
relay
C200 M8200 C209 M8209 C218 M8218 C227 M8227
C201 M8201 C210 M8210 C219 M8219 C228 M8228
C202 M8202 C211 M8211 C220 M8220 C229 M8229
C203 M8203 C212 M8212 C221 M8221 C230 M8230
C204 M8204 C213 M8213 C222 M8222 C231 M8231
C205 M8205 C214 M8214 C223 M8223 C232 M8232
C206 M8206 C215 M8215 C224 M8224 C233 M8233
C207 M8207 C216 M8216 C225 M8225 C234 M8234
C208 M8208 C217 M8217 C226 M8226
X010
RST C 0
X011
C 0
C 0
Y000
K10
Set value (constant)
It can be specified
indirectly also.
0
1
2
3
4
5
6
7
8
9
10
X010
X011
Current
value
Y000