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

3 FNC 12 – MOV / 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.3 FNC 12 – MOV / Move



When a word device is specified

The word device transfers 1 point.

Command

input



FNC 12

MOV

S



Before

execution



D10



D50



D



:D10

K50



:D50



Command contact



ON



K0

50



S

Transfer



After

execution



K50



0



D



K50



50



2. 32-bit operation (DMOV and DMOVP)

The contents of the transfer source [ S



+1,



] are transferred to the transfer destination [ D



S



• While the command input is OFF, the transfer destination



Command

input



FNC 12

DMOV



S



D



[



S



+1, S



+1,



] →[



D



S



+1, D



]



After

execution



K8X000 K8Y000



S

:K8X000

X37 to X1 X0



D :K8Y000

Y37 to Y1 Y0



ON OFFOFF ON



ON ON ON OFF



Transfer

X37 to X1 X0

Y37 to Y1 Y0

ON OFFOFF ON



Command contact



ON



X000



ON OFFOFF ON



OFF

OFF



X037



S



ON



X001





Before

execution



FNC 12

DMOV



ON

ON



Y001 ON



OFF







Y000 OFF

D



ON



OFF



Y037



ON



When a word device is specified

The word device transfers 1 point.

Command

input



Before

execution



FNC 12

DMOV

S



D10



D50



:D11,D10



K500000



D



:D51,D50



Command contact



250



ON



K4321

S



After

execution



500000



Transfer

K500000



K500000



D



].



], it is automatically converted into binary.



When specifying digits of a bit device (K8X000 → K8Y000)

The bit device transfers a maximum of 32 points (multiple of 4).

Command

input



D



does not change.



D



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



+1,



4321



500000



FX3S/FX3G/FX3GC/FX3U/FX3UC Series



9 Move and Compare – FNC 10 to FNC 19



Programming Manual - Basic & Applied Instruction Edition



9.3 FNC 12 – MOV / Move



1

Introduction



Program examples

1. When reading the current value of a timer and counter

X001



FNC 12

MOV



T 0



D 20



(Current value of T0) → (D20)

The operation is the same as a counter.



2

Overview



2. When indirectly specifying the set value of a timer or counter

As the set value of the timer T20, two values can be specified by turning ON or OFF the switch X002.

For specifying more than two set values, more than one switch is required.

X002



K100



D 10



FNC 12

MOV



K 50



D 10



3



(K100) → (D 10)

(K50) → (D 10)



M 0

T 20



D 10



Instruction

List



X002



FNC 12

MOV



When X002 is ON, D10 = K100 (10-second timer).

When X002 is OFF, D10 = K50 (5-second timer).



4



The program written by basic instructions shown on the right can be expressed using MOV instruction as shown

below.



Devices

in Detail



3. When transferring a bit device



X000

Y000



5



Y001



M8000



X002



RUN monitor



Y002



FNC 12

MOV



Specified the

Device &

Constant



X001

K1X000 K1Y000



X003



6



Y003



Make sure to use DMOV instruction for transferring the operation result of an applied instruction (such as MUL) whose

operation result is output in 32 bits, and for transferring a 32-bit numeric value or transferring the current value of a

high-speed counter (C235 to C255) which is a 32-bit device.



Command

input



FNC 12

DMOV

FNC 12

DMOV



D0(D1) D10(D11)

C235



D20(D21)



7

Basic

Instruction



Command

input



Before

Programming



4. When transferring 32-bit data



(D 1,D 0) → (D 11,D 10)

(Current value of C235) → (D21, D20)



8

FNC00-FNC09

Program Flow



9

FNC10-FNC19

Move & Compare



10

FNC20-FNC29

Arith. & Logic

Operation



251



FX3S/FX3G/FX3GC/FX3U/FX3UC Series



9 Move and Compare – FNC 10 to FNC 19



Programming Manual - Basic & Applied Instruction Edition



9.4



9.4 FNC 13 – SMOV / Shift Move



FNC 13 – SMOV / Shift Move



Outline

This instruction distributes and composes data in units of digit (4 bits).



1. Instruction format



FNC 13

SMOV



16-bit Instruction



P



11 steps



Mnemonic



Operation Condition



SMOV

SMOVP



32-bit Instruction Mnemonic



Operation Condition









Continuous

Operation

Pulse (Single)

Operation



2. Set data

Operand Type



S



Description



Data Type



Word device number storing data whose digits will be moved



16-bit binary



m1



Head digit position to be moved



16-bit binary



m2



Number of digits to be moved



16-bit binary



D



Word device number storing data whose digits are moved



16-bit binary



Head digit position of movement destination



16-bit binary



n



3. Applicable devices

Operand

Type



S



Bit Devices

System User



Word Devices

Digit Specification



System User



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



C D



Others

Special

Unit



R



U \G



1



2



1



2



m1

m2



D

n



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

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



252



Index

V



Constant



Z Modify K



H



Real

CharacPointer

Number ter String

E



" "



P



FX3S/FX3G/FX3GC/FX3U/FX3UC Series



9 Move and Compare – FNC 10 to FNC 19



Programming Manual - Basic & Applied Instruction Edition



9.4 FNC 13 – SMOV / Shift Move



1



1. 16-bit operation (SMOV and SMOVP)

The contents of the transfer source



and transfer destination



S



are converted into 4-digit BCD (0000 to



D



9999) respectively. "m2" digits starting from the "m1"th digit are transferred to the transfer destination

from the "n"th digit, converted into binary, and then stored to the transfer destination

D



.



D



does not change.



• When the command input turns ON, only the specified digits in the transfer destination

transfer source

Command

input



and unspecified digits in the transfer destination



S



m1



S



m2



3

[1]



' (4-digit BCD data)



S



101



100



binary, and stored to



D



D



.



(16-bit binary data)



2. Extension function

When M8168 is set to ON first and then SMOV instruction is executed, conversion from binary to BCD is not executed.

Data is moved in units of 4 bits.



X010



K 2



D 2



K 3



7



M8168 is used for other instructions also.

After using M8168 for SMOV instruction, return it to OFF.



Basic

Instruction



M8168



K 4



Program example

The data on three-digit digital switches are composed, and stored as binary data to D2.



6



M8000



100



7

8



101



8



5



1



X003 to X000



8



1

8



FNC 19

BIN



K2X020



D 2



(X020 to X027) 2-digit BCD

→ D2 (binary)



FNC 19

BIN



K1X000



D 1



(X000 to X003) 1-digit BCD

→ D1 (binary)



FNC00-FNC09

Program Flow



102



1



X027 to X020



Data on three digital switches

connected to non-consecutive input

terminals are composed.



D 1



K 1



K 1



D 2



9



K 3



FNC10-FNC19

Move & Compare



PLC



FNC 13

SMOV



6

Before

Programming



M8168

X010

FNC 13 D 1

SMOV



5

Specified the

Device &

Constant



Do not change.



’.



[3] The composed data (BCD) is converted into



↓ Data is automatically

converted. [3]



4

Devices

in Detail



D



102



’ starting from the "n"th



D



The digits of 103 and 100 of D ’ are not

affected even if data is transferred from



' (4-digit BCD data)



↓ Digits are moved. [2]



103



is converted from binary into BCD.



transferred to

digit.



converted. [1]



S

102

101

100

Command contact = ON



S



[2] "m2" digits starting from the "m1"th digit are



↓ Data is automatically



103



do not change.



D



n



D



In the case of "m1 = 4,

m2 = 2, n = 3".

(16-bit binary data)

S



4th digit 3rd digit 2nd digit 1st digit



are changed. The



D



2



Instruction

List



FNC 13

SMOV



starting



Overview



• While the command input is OFF, the transfer destination



D



Introduction



Explanation of function and operation



1-digit BCD data of D1 is transferred to

the 3rd digit (BCD data) of D2, and

automatically converted into binary data.



10

FNC20-FNC29

Arith. & Logic

Operation



253



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

×