Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

6.

Explanation of Instructions
6.2 Instruction Tables

6.2.12 Special Instructions for Old Machine Type Compatible


No. of
Process unit

Description
Instruction steps

Execution
Condition

Ext. inst.

See for
Class

sign

Execution
Symbol Process details

Storage
Bit test (A contact operation start
LDBIT <= S1 n 3 2 177
handling) (Note 1)
Bit test (A contact series connection
ANDBIT <= S1 n 3 2 177
handling) (Note 1)
Bit test (A contact parallel connection
ORBIT <= S1 n 3 2 177
handling) (Note 1)
1-bit
BIT

Bit test (B contact operation start


LDBII <> S1 n 3 2 179
handling) (Note 1)
Bit test (B contact series connection
ANDBII <> S1 n 3 2 179
handling) (Note 1)
Bit test (B contact parallel connection
ORBII <> S1 n 3 2 179
handling) (Note 1)
(Note) These instructions can be used with the compatible instruction mode as they are compatible with old
machine types but will not be available in the future.

6.2.13 Exclusive Instructions


No. of
Process unit

Description
steps
Instruction

Execution
Condition

Ext. inst.

See for
Class

sign

Execution
Symbol Process details

Storage
K1: Tool No. search 191
K2: Tool No. AND operation search 192
K3: Tool change 193
K4: Arbitrary position tool change 194
K5: Forward run of pointer 195
ATC

― S.ATC S.ATC Kn Rn Rm Mn K6: Reverse run of pointer 8 5 195


K7: Forward run of tool table 196
K8: Reverse run of tool table 196
K9: Tool table read 197
K10: Tool table write 198
K11: Automatic write of tool table 199
K1: Rotary body index 204
ROT

― S.ROT S.ROT Kn Rn Rm Mn 8 5
K3: Ring counter 207

II - 51
6. Explanation of Instructions
6.3 Data Designation Method

6.3 Data Designation Method


The following three types of data can be used in each instruction.
(1) Bit data
(2) Word (16-bit) data
(3) Double-word (32-bit) data

6.3.1 Bit Data


Bit data is data which handles contacts and coils, etc., in 1-bit units.
"Bit devices" and "bit-designated word devices" can be used as bit data.

(1) When using bit devices


The bit device is designated with a 1-point unit.

One M0 point is target.


M0
SET Y10

One Y10 point is target.

(2) When using word devices


With the word device, when the bit No. is designated, the bit for the designated bit No. can be used as bit
data.

b15 ~ b0
Word device 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0

Each bit can be used with 1 as ON and 0 as OFF

The word device bit is designated as "word device","bit number".


(The bit No. is designated with a hexadecimal.)
For example, D0 bit 5 (b5) is designated as D0.5, and D0 bit 10 (b10) is designated as D0.A.
Note that the bit designated cannot be used for the timer (T), integrated timer (ST) or counter (C).

Word device bit designation


X0
(Turn D0 bit 5(b5) ON(1).)
SET D0.5
Word device bit designation
D0.5 (Turn ON/OFF by setting D0 bit 5(b5) to 1/0.)
SET Y10

II - 52
6. Explanation of Instructions
6.3 Data Designation Method

6.3.2 Word (16-bit) Data


Word data is a 16-bit numerical value data used with the basic instructions and applied instructions.
Word devices and digit-designated bit devices can be used with the word data.

(1) When using bit devices


Bit devices can be used as word devices by designating digits.
The bit data digit is designated as "number of digits""bit device head No.".
The digits can be designated between K1 and K4 with a 4-point (4-bit) unit.
The target numbers of points when X0 is designated as the digit are shown below.
• K1X0 --- 4 points X0 to X3 are the target
• K2X0 --- 8 points X0 to X7 are the target
• K3X0 --- 12 points X0 to XB are the target
• K4X0 --- 16 points X0 to XF are the target

XF to XC XB to X8 X7 to X4 X3 to X0

K1 designation
range
(4 points)
K2 designation
range
(8 points)
K3 designation
range
(12 points)
K4 designation
range
(16 points)

List of Numeric Values that Can Be Dealt with as Source Data for Digit Designation at Source (S) Side
Number of Digits Designated With 16-Bit Instruction
K1 (4 points) 0 to 15
K2 (8 points) 0 to 255
K3 (12 points) 0 to 4095
K4 (16 points) -32768 to 32767

If the source side is a digit-designated bit device, and the destination is a word device, the word device
on the destination side will be 0 after the digit-designated bits on the source side.

Ladder Example Processing


With 16-bit instruction
K1X0 X3X2X1X0

MOV K1X0 D0 Become 0

b15 …………………… b4 b3 b2 b1b0


Source (S) data D0 0 0 0 0 0 0 0 0 0 0 0 0 X3X2X1X0

II - 53
6. Explanation of Instructions
6.3 Data Designation Method

When a digit is designated on the destination (D) side, the No. of points designated by the digit will be the
target of the destination side.

Ladder Example Processing


When source data (S) is a numerical value
1 2 3 4

H1234 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
MOV H1234 K2M0

M15・・・・・・・・・・・・・M8M7・・・・・・・・・・・・・・M0
Destination (D) K2M0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0

Do not change 3 4

When source data (S) is a bit device


M15・・・・・・・・・・・・・・・M8M7・・・・・・・・・・・・・・・・M0
K1M0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0

(Note)

MOV K1M0 K2M100 M115・・・・・・・・・・・・・M108M107・・M104M103・・M100


K2M100 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0

Destination (D) Do not change 0 is Data in M3 to


transferred M0 is
transferred.

When source data (S) is a word device


M15・・・・・・・・・・・・・・・M8M7・・・・・・・・・・・・・・・・M0
D0 1 1 1 0 1 0 1 0 1 0 0 1 1 1 0 1

MOV D0 K2M100
M115・・・・・・・・・・・・・M108M107・・M104M103・・M100
K2M100 1 0 0 1 1 1 0 1
Destination (D)
Do not change

(2) When using word devices


Word devices are designated in 1-point (16 bits) units.

M0
MOV K100 D0

1 D0 point (16 bits) is word device

II - 54
6. Explanation of Instructions
6.3 Data Designation Method

6.3.3 Using Double Word Data (32 bits)


Double word data is 32-bit numerical data used by basic instructions and application instructions.
Word devices and bit devices designated by digit designation can be used as double word data.

(1) When using bit devices


Digit designation can be used to enable a bit device to deal with double word data.
Digit designation of bit devices is done by designating "Number of digits" and "Initial number of bit
device".
Digit designation of bit devices can be done in 4-point (4-bit) units, and designation can be made for K1
to K8.
For example, if X0 is designated for digit designation, the following points would be designated:
• K1X0 ….. The 4 points X0 through X3 are designated
• K2X0 ….. The 8 points X0 through X7 are designated
• K3X0 ….. The 12 points X0 through XB are designated
• K4X0 ….. The 16 points X0 through XF are designated
• K5X0 ….. The 20 points X0 through X13 are designated
• K6X0 ….. The 24 points X0 through X17 are designated
• K7X0 ….. The 28 points X0 through X1B are designated
• K8X0 ….. The 32 points X0 through X1F are designated

X1F X1CX1B X18X17 X14X13 X10XF XCXB X8X7 X4X3 X0

K1 designation range
(8 points)
K2 designation range
(8 points)
K3 designation range
(12points)
K4 designation range
(16 points)
K5 designation range
(20 points)
K6 designation range
(24 points)
K7 designation range
(28 points)
K8 designation range
(32 points)

List of Numeric Values that Can Be Dealt with as Source Data for Digit Designation at Source (S) Side
Number of Digits With 32-bit Number of
Digits With 32-bit Instructions
Designated Instructions
K1 (4 points) 0 to 15 K5 (20 points) 0 to 1048575
K2 (8 points) 0 to 255 K6 (24 points) 0 to 16772165
K3 (12 points) 0 to 4095 K7 (28 points) 0 to 268435455
K4 (16 points) 0 to 65535 K8 (32 points) -2147483648 to 2147483647

In cases where the source is a bit device designated by digit designation, and the destination is a word
device, the word device for the destination becomes 0 following the bit designated by digit designation at
the source.

II - 55
6. Explanation of Instructions
6.3 Data Designation Method

Ladder Example Processing


With 32-bit Instructions
K1X0 X3X2X1X0
Become 0
DMOV K1X0 D0 b15・・・・・・・・・・・・・・・・・・・・・・・b4 b3 b2 b1 b0
D0 0 0 0 0 0 0 0 0 0 0 0 0 X3X2X1X0
D1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Source (S) data b31 ‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥ b16

Become 0

(2) When using word devices


A word device designates devices used by the lower 16 bits of data.
A 32-bit instruction uses (designation device number) and (designation device number + 1).

M0
DMOV K100 D0

The 2 points D0 and D1(32 bits) are used


32-bit data transfer instruction

II - 56

You might also like