Download Print this page

Encoding From 256 To 8 Bits - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Encoding from 256 to 8 bits

ENCO(P)
These instructions encode the 2
Ladder diagram
(s)
FBD/LD
EN
ENO
s
d
n
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
Head device for storing the encode data
(d)
Device number for storing the encoding result
(n)
Valid bit length
EN
Execution condition
ENO
Execution result
*1 When using a bit-type label, use a global label assigned to a bit device.
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s)
(d)
(n)
Processing details
• These instructions store into (d) the binary value corresponding to the bit whose value is 1 in the data with 2
8
7
6 5 4 3 2 1 0
(s)
0
0
1 0 0 0 0 0 0
• When (n) is 0, no processing is performed, and the contents of the device specified by (d) do not change.
• The bit device is handled as a device storing one-bit data and the word device is handled as a device storing 16-bit data.
• If two or more bits are 1, the higher bit position is processed.
Operation error
Error code
Description
(SD0/SD8067)
2820H
The device specified by (s) exceeds the corresponding device range.
3401H
The entire data from (s) to 2
(s) is specified as a bit device and (n) is other than 0 to 8.
(s) is specified as a word device and (n) is other than 0 to 4.
7 BASIC INSTRUCTIONS
328
7.5 Data Conversion Instructions
(n)
bits of data from the device specified by (s), and store it in (d).
(d)
(n)
Word
T, ST, C, D, W,
U\G
SD, SW, R
(d)
=6
1 1 0
(n)
number of bits is 0.
Structured text
ENO:=ENCO(EN,s,n,d);
ENO:=ENCOP(EN,s,n,d);
Range
1 to 8
Double word Indirect
specification
Z
LC
LZ
Data type
Data type (label)
Bit/16-bit unsigned
ANY_ELEMENTARY
1
binary
16-bit signed binary
ANY_ELEMENTARY
16-bit unsigned binary
ANY16
Bit
BOOL
Bit
BOOL
Constant
K, H
E
$
(n)
*
Others
bits.

Hide quick links:

Advertisement

loading