Move instructions, Mov (move), Nstructions – IDEC MicroSmart User Manual

Page 219: Introduction

Advertising
background image

« FC4A M

ICRO

S

MART

U

SER

S

M

ANUAL

»

9-1

9: M

OVE

I

NSTRUCTIONS

Introduction

Data can be moved using the MOV (move), MOVN (move not), IMOV (indirect move), or IMOVN (indirect move not)
instruction. The moved data is 16-bit data, and the repeat operation can also be used to increase the quantity of data
moved. In the MOV or MOVN instruction, the source and destination operand are designated by S1 and D1 directly. In the
IMOV or IMOVN instruction, the source and destination operand are determined by the offset values designated by S2 and
D2 added to source operand S1 and destination operand D1.

The BMOV (block move) instruction is useful to move consecutive blocks of timer, counter, and data register values.

The IBMV (indirect bit move) and IBMVN (indirect bit move not) instructions move one bit of data from a source operand
to a destination operand. Both operands are determined by adding an offset to the operand. When using the repeat opera-
tion, data of consecutive bits can be moved.

Since the move instructions are executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction
should be used as required.

MOV (Move)

Applicable CPU Modules

Valid Operands

For the valid operand number range, see pages 6-1 and 6-2.

Internal relays M0 through M1277 can be designated as D1. Special internal relays cannot be designated as D1.

Source operand can be both internal relays M0 through M1277 and special internal relays M8000 through M8157.

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 which can be 0 through 65535.

Valid Data Types

FC4A-C10R2/C

FC4A-C16R2/C

FC4A-C24R2/C

FC4A-D20K3/S3

FC4A-D20RK1/RS1 & FC4A-D40K3/S3

X

X

X

X

X

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

W (word)

I (integer)

X

X

S1

→ D1

When input is on, 16- bit data from operand designated by S1 is moved to
operand designated by D1.

REP

**

S1(R)

*****

D1(R)

*****

MOV(*)

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 are used. When repeat is designated for a
bit operand, the quantity of operand bits increases in 16-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 is used. When repeat is designated for a word operand, the
quantity of operand words increases in 1-point increments.

Advertising