Moving Blocks Of Data With The Bmov Instruction - Mitsubishi Electric FX2N Beginners Manual

Hide thumbs Also See for FX2N:
Table of Contents

Advertisement

More Advanced Programming
5.2.3

Moving blocks of data with the BMOV instruction

The MOV instruction described in section 5.2.1 can only write single 16 or 32 bit values to a
destination. If you want, you can program multiple sequences of MOV instructions to move
contiguous blocks of data. However, it is more efficient to use the BMOV (Block MOVe) instruc-
tion, which is provided specifically for this purpose.
Ladder Diagram
0
³ Data source (16-bit device, first device in source range)
· Data destination (16-bit device, first device in destination range)
» Number of elements to be moved (max. 512)
The example above works as follows:
BMOV also has a pulse-triggered version, BMOVP (see section 5.1.2 for details on pulse-trig-
gered execution).
Blocks of bit devices: When you move blocks of bit devices with BMOV the K factors of the data
source and the data destination must always be identical.
Example
BMOV K1M0 K1Y0 K2
M0
M1
M2
M3
M4
M5
M6
M7
FX Beginners Manual
BMOV D10 D200 K5
BMOV D10 D200 K5
D 10
1234
D 11
5678
D 12
-156
D 13
8765
4321
D 14
0
0
Y000
Y001
1
1
1
1
Y002
0
0
Y003
1
1
Y004
Y005
0
0
1
1
Y006
0
0
Y007
Instructions for Moving Data
Instruction List
0 BMOV
1234
D 200
5678
D 201
-156
5 data registers
D 202
D 203
8765
D 204
4321
7 data words
This copies 2 blocks with 4 bit
devices each.
D10
D200
K5
5 – 11

Advertisement

Table of Contents
loading

Table of Contents