Encoding From 256 To 8 Bits - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Encoding from 256 to 8 bits

ENCO(P)
High
Basic
Process
Redundant Universal
performance
ENCO
ENCOP
(S): Head number of the device where the data to be encoded is stored (Device name)
(D): Number of the device where the encoding result will be stored (BIN 16 bits)
n:
Valid bit length (1 to 8), 0: No processing (BIN 16 bits)
Setting
Internal device
data
Bit
Word
(S)
(D)
n
Processing details
• Stores the binary value corresponding to the bits which are "1" included in the 2
8
7
6
5 4 3 2 1 0
S
0
0
1 0 0 0 0 0 0
D
• The value of n can be designated at between 1 and 8.
• If n=0, there will be no operation, and the contents of (D) will not change.
• Bit devices are treated as 1 bit, and word devices as 16 bits.
• If more than 1 bit is at 1, processing will be conducted at the upper bit location.
Operation error
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
Error details
code
4100
The value of n is other than 0 to 8. All data 2
n
4101
The range 2
bits from (S) exceeds the range of the corresponding device.
LCPU
Command
Command
R, ZR
J\
Bit
1 1 0
(Binary value = 6)
n
bits from (S) is "0".
ENCO
S
D
ENCOP
S
D
U\G
Zn
Word
n
-bit data of (S) to (D).
Q00J/
QnH
QnPH
Q00/
Q01
7 APPLICATION INSTRUCTIONS
7.5 Data Processing Instructions
n
n
Constant
Others
K, H
QnPRH
QnU
LCPU
425
7

Advertisement

Table of Contents
loading

Table of Contents