Separating 4 Bits From 16-Bit Data - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Separating 4 bits from 16-bit data

DIS(P)
These instructions store the data equivalent of the (n) nibbles (1-nibble/ 4-bits) of the 16-bit binary data specified by (s) in to
the lower-order 4 bits of (n) number of devices starting from the one specified by (d).
Ladder diagram
(s)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
Head device for storing the data to be separated
(d)
Head device storing separated data
(n)
Number of separations (0 indicates no processing is
performed)
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB
(s)
(d)
(n)
Processing details
• These instructions store the data equivalent of the (n) nibbles (1-nibble/ 4-bits) of the 16-bit binary data specified by (s) in to
the lower-order 4 bits of (n) number of devices starting from the one specified by (d).
b15 b12
···
b11
···
b8
b7
···
(s)
• The higher-order 12 bits of (n) number of devices starting from the one specified by (s) becomes 0.
• When (n) is 0, no processing is performed, and the contents of the (n) number of devices starting from the one specified by
(d) do not change.
Operation error
Error code
Description
(SD0/SD8067)
2820
The range of (n) number of points from (d) exceed the corresponding device range.
3401
(n) is other than 0 to 4.
6 BASIC INSTRUCTIONS
286
6.5 Data Conversion Instructions
(d)
(n)
Word
U\G T, ST,
T, ST, C, D,
C, LC
W, SD, SW, R
b4
b3
···
b0
b15
(d)
(d)+1
(d)+2
(d)+3
These bits
become "0".
Structured text
ENO:=DIS(EN,s,n,d);
ENO:=DISP(EN,s,n,d);
Range
1 to 4
Double word Indirect
U\G
Z
LC
···
b4
b3
···
b0
(n)
Storage area
Data type
16-bit signed binary
16-bit signed binary
16-bit unsigned binary
Constant
specification
LZ
K, H
Data type (label)
ANY16
ANY16
ANY16
Others
E
$

Advertisement

Table of Contents
loading

Table of Contents