1. Trang chủ >
  2. Kỹ Thuật - Công Nghệ >
  3. Tự động hóa >

6 FNC 15 – BMOV / Block Move

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (16.5 MB, 964 trang )


FX3S/FX3G/FX3GC/FX3U/FX3UC Series



9 Move and Compare – FNC 10 to FNC 19



Programming Manual - Basic & Applied Instruction Edition



9.6 FNC 15 – BMOV / Block Move



1



By controlling the direction inverse flag M8024*1 for BMOV (FNC 15) instruction, data can be transferred in two

directions in one program.

X001



*1



M8024



FNC 15

BMOVP



D



D5



D10



M8001



Transfer

direction



S



,



D



M8024*1 : OFF



S







D



D5 → D10

D6 → D11

D7 → D12



M8024*1 : ON



S







D



D5 ← D10

D6 ← D11

D7 ← D12



K3

*1BMOV



M8024 is cleared when the PLC mode is changed from RUN to STOP.



Caution

When specifying digits of bit devices, specify the same number of digits for

S

FNC 15

BMOV



D



K 2



D



4



.



Y000

Y001

Y002



M 3



Y003



5

Specified the

Device &

Constant



Specify the same number

of digits.

(Example: K1)



M 0

M 2



K1Y000



and



n

M 1



K1M0



3



Devices

in Detail



M8000



S



2



Instruction

List



M8024 direction

inverse flag:

OFF



Normally OFF

during operation



*1.



BMOV direction inverse

flag



Overview



S

X000



BMOV

direction

inverse flag

n



Introduction



Extension function (bi-directional transfer function)



n=2

M 4



Y004



M 5



Y005



M 6



Y006



M 7



Y007



6

Before

Programming



7

Basic

Instruction



8

FNC00-FNC09

Program Flow



9

FNC10-FNC19

Move & Compare



10

FNC20-FNC29

Arith. & Logic

Operation



257



FX3S/FX3G/FX3GC/FX3U/FX3UC Series



9 Move and Compare – FNC 10 to FNC 19



Programming Manual - Basic & Applied Instruction Edition



9.6.1



9.6 FNC 15 – BMOV / Block Move



Function of transfer between file registers and data registers

BMOV (FNC 15) instruction has a special function for file registers (D1000 and later).

→ For details on file registers, refer to Section 4.9.



1. What are file registers

In the parameters, D1000 to D7999 can be set as file registers, and written to and read from the program memory

area. D1000 to D2999 in the FX3S PLC.

1)



Outline of setting

File registers (D1000 to D7999) do not exist in the initial status. They are valid only when some number of file

registers are secured by parameter setting in a programming tool.



2)



Number of file registers

In parameter setting, set 500 file registers as 1 block.

1 to 14 blocks*1 (each of which has 500 file registers) can be set.

1 block occupies 500 steps in the program memory area.

*1.



3)



1 to 4 blocks in the FX3S PLC.



Difference between BMOV (FNC 15) instruction and other instructions

The table below shows the difference between BMOV (FNC 15) instruction and other instructions with regard to

file registers (D1000 and later).

Instruction



Contents of transfer



Remarks



BMOV instruction



Can read from and write to the file register area [A]

inside the program memory.







Other applied

instructions



Can read from and write to the data register area Because the data register area [B] is provided inside the

[B] inside the program memory in the same way as system RAM in PLCs, its contents can be arbitrarily

general data registers.

changed regardless of the memory cassette format



When restoring the power, data registers set as file registers are automatically copied from the file register area

[A] to the data register area [B].

Inside built-in memory

or memory cassette

Program

memory

Program/

comment

D1000

500 points ×

File register

14 blocks

[A]

maximum

(7000 points

maximum)



Inside system

RAM



D0

Data

When power

memory

is turned ON

When PLC

Data register

mode is

changed from

D1000

STOP to

Data register

RUN

[B]

D7999



Devices D1000 and later specified as

operands in applied instructions other

than BMOV (FNC 15) , indirectly

specified values for timers or

Write counters or devices in RST

instruction are read from and written

to the area [B] in the same way as

Read

general data registers.

Data register



The remaining area can be used as general purpose

data registers.



2. Cautions on use

1)



When updating the contents of a file register with the same number (same-number register update mode), make

sure that the file register number is equivalent between



S



and



D



.



2)



When using file registers in the same-number register update mode, make sure that the number of transfer points

specified by "n" does not exceed the file register area.



3)



If the file register area is exceeded while file registers are used in the same-number register update mode, an

operation error (M8067) is caused and the instruction is not executed.



4)



In the case of indexing (in the same-number register update mode)

When S

and D

are indexing with index, the instruction is executed if the actual device number is within

the file register area and the number of transfer points does not exceed the file register area.



258



FX3S/FX3G/FX3GC/FX3U/FX3UC Series



9 Move and Compare – FNC 10 to FNC 19



Programming Manual - Basic & Applied Instruction Edition



9.6 FNC 15 – BMOV / Block Move



1



File register operation

File registers are secured inside the built-in memory or memory cassette.

Different from general data registers, file registers can be read and written only by peripheral equipment or BMOV

(FNC 15) instruction.



9)



If a file register is not specified as the destination in BMOV (FNC 15) instruction, the file register is not accessed.

a) Outline of memory operation



D0

D200



Program

memory



Inside system

RAM

Image

memory



7



D599 Data register

Read



D1000

500 points ×

14 blocks

maximum

(7000 points

maximum)



File register

[A]



D1100 Data register

[B]

D1499

Data register

D7999



8

FNC00-FNC09

Program Flow



b) Program example

When X000 is set to ON, the data register area [B] is read.

S

X000



D1100



A file register can be specified as

register update mode is selected.



D200



D



n



9



K400



. But if the same number with



S



is specified, the same-number



However, even if a file register having different number is specified for S

and D

respectively, data

cannot be transferred from the file register area to another file register area. In such a case, read the contents



259



10

FNC20-FNC29

Arith. & Logic

Operation



of a file register specified as S

in the same-number register update mode to the data register area [B]

once, and then write the data.

→ For the same-number register update mode of file registers, refer to Subsection 4.9.4.



FNC10-FNC19

Move & Compare



FNC 15

BMOVP



D



6



Basic

Instruction



Program/

comment



5



Before

Programming



Inside built-in memory

or memory cassette



4



Specified the

Device &

Constant



8)



3



Devices

in Detail



Allowable number of times of writing to the memory

Data can be written to the memory cassette up to 10,000 times, and to the memory (EEPROM) built in FX3S/

FX3G/FX3GC PLCs up to 20,000 times.

When a continuous operation type instruction is used for data writing in a program, data is written to the memory

in every operation cycle of the PLC. To prevent this, make sure to use a pulse operation type instruction

(BMOVP).



2



Instruction

List



7)



Execution time for writing data to file registers

- In FX3U/FX3UC PLCs

It takes 66 to 132 ms to write data in one continuous block (500 points) to the memory cassette (flash memory).

Execution of the program is paused during this period. Because the watchdog timer is not refreshed during this

period, it is necessary to take proper countermeasures such as inserting the WDT instruction into the sequence

program.

It takes longer time to write data to file registers stored in a memory cassette (flash memory) compared to writing

data to file registers stored in the built-in memory.

- In FX3S/FX3G/FX3GC PLCs

It takes 80 ms to write data in one continuous block (500 points) to file registers.

Note that execution of the program is paused during this period, but the watchdog timer is automatically

refreshed.

The time for writing data is same between file registers stored in the built-in memory and file registers stored in a

memory cassette (EEPROM).



Overview



6)



Handling of the memory cassette

When changing the contents of file registers secured inside the memory cassette, confirm the following

conditions:

- Set the protect switch of the memory cassette to OFF.

- Do not turn OFF the power while the contents of file registers are changed.

If the power is turned OFF during the change, the data stored in file registers may be filled with unexpected

values, or a parameter error may occur.



Introduction



5)



FX3S/FX3G/FX3GC/FX3U/FX3UC Series



9 Move and Compare – FNC 10 to FNC 19



Programming Manual - Basic & Applied Instruction Edition



9.7



9.7 FNC 16 – FMOV / Fill Move



FNC 16 – FMOV / Fill Move



Outline

This instruction transfers same data to specified number of devices.



1. Instruction format



FNC 16

FMOV



D



16-bit Instruction



P



7 steps



Mnemonic



Operation Condition



FMOV

FMOVP



32-bit Instruction Mnemonic



Operation Condition



DFMOV

DFMOVP



Continuous

Operation

Pulse (Single)

Operation



Continuous

Operation

Pulse (Single)

Operation



13 steps



2. Set data

Operand Type



Description



Data Type



S



Transfer source data or device number storing data



16- or 32-bit binary



D



Head word device number of transfer destination (Same data is transferred from the

transfer source at one time.)



16- or 32-bit binary



n



Number of transfer points [K1≤n≤K512, H1≤n≤H1FF]



16-bit binary



3. Applicable devices

Operand

Type



Bit Devices



Word Devices



System User



Digit Specification



Others

Special

Unit



System User



X Y M T C S D .b KnX KnY KnM KnS T



C D



R



U \G



S



1

1



V



Z Modify K



H



Real

CharacPointer

Number ter String

E



" "



P



2



D



Index



Constant



2



n



1: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.

2: This function is supported only in FX3U/FX3UC PLCs.



Explanation of function and operation

1. 16-bit operation (FMOV and FMOVP)

The contents of S

are transferred to "n" devices starting from D .

• The contents will be same among all of "n" devices.

• If the number of points specified by "n" exceeds the device number range, data is transferred within the possible

range.

• While the command input is OFF, the transfer destination



does not change.



D



• While the command input is ON, the data of the transfer source

• When a constant (K) is specified as the transfer source

Command

input



FNC 16

FMOV



S



D



D

D



+1



D



+2



D



+3



D



+4



does not change.



, it is automatically converted into binary.



n



S



260



S



S



n



FX3S/FX3G/FX3GC/FX3U/FX3UC Series



9 Move and Compare – FNC 10 to FNC 19



Programming Manual - Basic & Applied Instruction Edition



9.7 FNC 16 – FMOV / Fill Move



1

The contents of [ S



+1,



S



] are transferred to "n" 32-bit devices starting from [ D



+1,



D



Introduction



2. 32-bit operation (DFMOV and DFMOVP)

].



• The contents will be the same among all of "n" 32-bit devices.

• If the number of points specified by "n" exceeds the device number range, data is transferred within the possible

range.

+1,



• While the command input is ON, the data of the transfer source [ S

• When a constant (K) is specified as the transfer source [ S

X000



FNC 16

DFMOV



D



+1,



S



] does not change.



], it is automatically converted into binary.



S



3



n



+1, S



+1, D

+3, D



+2



D



+5, D



+4



D



+7, D



+6



D



+9, D



+8



4



n



Devices

in Detail



D

D



5

Specified the

Device &

Constant



Program example

1. When writing specified data to two or more devices

S

FNC 16

FMOV



D



K 0



D 0



S

K0



6



n



Before

Programming



X000



2



Instruction

List



S



S



+1,



] does not change.



D



Overview



• While the command input is OFF, the transfer destination [ D



K 5

Before

execution



D



After

execution



……



K 3







K 0



K0



D1



……



K 5







K 0



K0



D2



……



K 65







K 0



K0



D3



……



K 7







K 0



K0



D4



……



K100







K 0



7



8

FNC00-FNC09

Program Flow



D0



Basic

Instruction



K0



Values before execution are

shown as examples.



9

FNC10-FNC19

Move & Compare



10

FNC20-FNC29

Arith. & Logic

Operation



261



Xem Thêm
Tải bản đầy đủ (.pdf) (964 trang)

×