Download MicroSmart Supplemental Manual

Transcript
9: MOVE INSTRUCTIONS
Introduction
The data type Float has been added to MOV (Move) and IMOV (Indirect Move) instructions. As a result of added data
type, MOV and IMOV instructions can handle floating-point data.
The NSET (N Data Set), NRS (N Data Repeat Set), and TCCST (Timer/Counter Current Value Store) instructions have
been added as new instructions. NSET and NRS instructions can be used to set values to a group of operands. The current
values of timer or counter can be changed with TCCST instruction.
MOV (Move)
MOV(*)
S1(R) D1(R)
***** *****
REP
**
S1 → D1
When input is on, 16- or 32-bit data from operand designated by S1 is
moved to operand designated by D1.
The float data type is available on upgraded CPU modules with system
program version 200 or higher.
Applicable CPU Modules
FC5A-C10R2/C
FC5A-C16R2/C
FC5A-C24R2/C
FC5A-D16RK1/RS1
FC5A-D32K3/S3
X
X
X
X
X
Valid Operands
Operand
Function
I
Q
M
R
T
C
D
Constant
Repeat
S1 (Source 1)
First operand number to move
X
X
X
X
X
X
X
X
1-99
D1 (Destination 1)
First operand number to move to
—
X
▲
X
X
X
X
—
1-99
For the valid operand number range, see pages 6-1 and 6-2 of the FC5A MicroSmart Pentra User’s Manual (FC9Y-B927).
▲ Special internal relays cannot be designated as D1.
When T (timer) or C (counter) is used as S1, the timer/counter current value is read out. When T (timer) or C (counter) is
used as D1, the data is written in as a preset value.
When F (float) data type is selected, only data register and constant can be designated as S1, and only data register can be
designated as D1.
When F (float) data type is selected and S1 does not comply with the normal floating-point format, a user program execution
error will result, turning on special internal relay M8004 and ERR LED on the CPU module.
Valid Data Types
W (word)
X
I (integer)
X
D (double word)
X
L (long)
X
F (float)
X
When a bit operand such as I (input), Q (output), M (internal relay), or R (shift register) is designated as the source or destination, 16 points (word or integer data type) or 32 points (doubleword or long data type) are used. When repeat is designated for a bit operand, the quantity of
operand bits increases in 16- or 32-point increments.
When a word operand such as T (timer), C (counter), or D (data register) is designated as the
source or destination, 1 point (word or integer data type) or 2 points (double-word, long, or float
data type) are used. When repeat is designated for a word operand, the quantity of operand
words increases in 1- or 2-point increments.
Example: MOV(F)
When a source data does not comply with the normal floating-point format in any repeat operation, a user program execution error occurs, and the source data is not moved to the destination.
Source (Repeat = 3)
MOV(F)
I1
S1 R
D10
D1 R
D20
REP
3
Destination (Repeat = 3)
D20·D21
1.5
D12·D13 Invalid
D22·D23
11.1
3.44
D24·D25
3.44
D10·D11
D14·D15
1.5
FC5A MICROSMART USER’S MANUAL SUPPLEMENT
9-1