Fnc 42 - Enco / Encode - Mitsubishi Electric FX3G SERIES Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
12.3
FNC 42 – ENCO / Encode
Outline
This instruction obtains positions in which bits are ON in data.
1. Instruction format
FNC 42
ENCO
P
2. Set data
Operand type
S
S
1
D
n
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T C D R U \G
S
S
1
S
D
2
n
: This function is supported only in FX
Explanation of function and operation
1. 16-bit operation (ENCO and ENCOP)
n
D
S
The 2
bit of
1
This instruction converts data into binary data according to a bit position in the ON status.
is a bit device (1 ≤ n ≤ 8)
D
S
1)
When
1
ON bit positions among "2
-When "n" is "8", 2
-The encoding result of
Command
input
FNC 42
ENCO
Mnemonic
16-bit Instruction
7 steps ENCO
ENCOP
Data to be encoded or word device number storing data
Word device number storing the encoding result
Number of bits of device storing the encoding result (n = 1 to 8)
(When "n" is "0", no processing is executed.)
Digit Specification
/FX
3U
3UC
is encoded, and the result value is stored to
n
" bits (1 ≤ n ≤ 8) from
8
= 256 bits (which is the maximum value) are occupied.
D
D
is "0" (OFF) from the most significant bit to the low-order bit "n".
1
When it is Y, M or S
S
D
n
(1 ≤ n ≤ 8)
M17
M16
M15
M14
0
0
0
7
6
5
b15
D10
0
0
0
0
0
0
0
All of them are "0".
Operation Condition
32-bit Instruction
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
V
PLCs.
D
D
.
1
D
S
D
are encoded to
1
M13
M12
M11
M10
0
1
0
0
0
4
(3)
2
1
0
4
(2)
(1)
0
0
0
0
0
0
0
1
1
b0
12 Data Operation – FNC 40 to FNC 49
12.3 FNC 42 – ENCO / Encode
Mnemonic
Operation Condition
Data type
16-bit binary
16-bit binary
16-bit binary
Others
Con-
Real
Charac-
Index
stant
Number
ter String
Z Modify K H
E
" "
D
.
1
When "n" is 3
S
= M10
D
11
12
13
14
Pointer
15
P
16
17
18
19
20
323

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents