Fnc 42 - Enco / Encode - Mitsubishi FX3G Series Programming Manual

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

Advertisement

FX
/FX
/FX
/FX
3G
3U
3GC
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
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
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
This instruction converts data into binary data according to a bit position in the ON status.
D
S
1)
When
1
ON bit positions among "2
-When "n" is "8", 2
-The encoding result of
Command
input
316
Series
Mnemonic
16-bit Instruction
P
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
3U
is encoded, and the result value is stored to
1
is a bit device (1 ≤ n ≤ 8)
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
FNC 42
S
D
ENCO
M17
M16
M15
0
0
0
7
6
5
b15
D10
0
0
0
0
0
All of them are "0".
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
C D R U \G
/FX
PLCs.
3UC
D
D
1
D
S
are encoded to
1
n
(1 ≤ n ≤ 8)
M14
M13
M12
M11
0
1
0
0
4
(3)
2
1
0
0
0
0
0
0
0
0
12 Data Operation – FNC 40 to FNC 49
12.3 FNC 42 – ENCO / Encode
Mnemonic
32-bit Instruction
Con-
Real
Index
stant
Number
V
Z Modify K H
.
D
D
.
1
M10
When "n" is 3
0
S
= M10
0
4
(2)
(1)
0
1
1
D
b0
Operation Condition
Data type
16-bit binary
16-bit binary
16-bit binary
Others
Charac-
Pointer
ter String
E
" "
P

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3gc seriesFx3uc series

Table of Contents