Mitsubishi Electronics FX3UC Garage Door Opener User Manual


 
133
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
4 Devices in Detail
4.9 Data Register and File Register [D]
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
3. Operation examples
Data registers can be used in various control with numeric data.
This section explains the operations of representative basic instructions and applied instructions among various
applications.
For the full use of data registers, refer to the explanation of applied instructions later.
1) Data registers in basic instructions
Specifying the set value of a timer or counter
2) Data registers using applied instructions
Operation examples using MOV (FNC 12) instruction
a) Changing the current value of a counter
b) Reading the current value of a timer or counter to a data register
c) Storing a numeric value to data registers
d) Transferring the contents of a data register to another data register
3) Using unoccupied timers and counters as data registers
Operation examples using MOV (FNC 12) instruction
Timers and counters not in a program can be used as devices for storing 16-bit or 32-bit numeric values (data
registers).
As in the case of data registers, when 16-bit timers or counters are used as 32-bit devices, two timers or two
counters (example: C1 and C0) store 32-bit numeric data.
One 32-bit counter (example: C200) can store 32-bit numeric data.
T 2
D 0
C 10
D 20
A counter or timer operates while regarding the
contents of a specified data register as its set value.
FNC 12
MOV
D 5 C 2
The current value of the counter C2 is changed to
the contents stored in D5.
FNC 12
MOV
C 10 D 4
The current value of the counter C10 is transferred
to D4.
FNC 12
MOV
K200 D 10
16-bit
FNC 12
DMOV
K80000
D10(D11)
"200 (decimal value)" is transferred to D10.
"80000 (decimal value)" is transferred to D10 and D11.
Because a numeric value larger than 32767 is 32-bit
data, a 32-bit operation is required. When a data
register on the low-order side (D10) is specified, a
data register on the high-order side (D11) is
automatically occupied.
32-bit
FNC 12
MOV
D 10 D 20
The contents of D10 are transferred to D20.
FNC 12
MOV
K300 T 10
FNC 12
MOV
T 10 C 20
K300
C 20
"300 (decimal value)" is transferred to T10.
The contents of T10 are transferred to the current
value register of C20.
In this case, T10 is not working as a timer, but is
working as a data register.