
5. FUNCTIONAL INSTRUCTIONS
B–61863E/15
PMC SEQUENCE PROGRAM
202
This instruction converts data in binary format to an optional binary
format 1–byte, 2–byte, or 4–byte data.
Conversion input data address, conversion table, and conversion data
output address are necessary for data conversion; as shown in Fig.5.15.1.
Compared to the 5.14 ”COD Function Instruction”, this CODB function
instruction handles numerical data 1–, 2– and 4–byte length binary format
data, and the conversion table can be extended to maximum 256.
Conversion
data address
ffff
2
Specify table address
here.(binary format1 byte)
3
2
1
0
Conversion table
n
Table address
Conversion data
output address
ffff
Data stored in the specified
table address is output to
this address
1250
n : max. 255
(Note 1) This table data is binary
format 2–byte data.
(Note 2) Conversion table is written
in the ROM together
together with the program,
because it is defined in the
sequence program.
Fig. 5.15.1 Code conversion diagram
Fig.5.15.2 shows the expression format of CODB.
W1
CODB
(SUB 27)
RST
ACT
f
Format
designa
–tion
Error output
fff
Number
of
conver–
sion
table
data
ffff
Conversi
on input
data
address
*
ffff
Conversi
on data
output
address
Fig. 5.15.2 Expression format of CODB
5.15
CODB (BINARY
CODE CONVERSION)
5.15.1
Function
5.15.2
Format