Using Data Handling Instructions
9–1
9
Using Data Handling Instructions
This chapter contains general information about the data handling instructions and
explains how they function in your application program. Each of the instructions
includes information on:
•
what the instruction symbol looks like
•
typical execution time for the instruction
•
how to use the instruction
In addition, the last section contains an application example for a paper drilling
machine that shows the data handling instructions in use.
Data Handling Instructions
Instruction
Purpose
Page
Mnemonic
Name
Purpose
Page
TOD
Convert to BCD
Converts the integer source value to BCD format
and stores it in the destination.
9–3
FRD
Convert from BCD
Converts the BCD source value to an integer and
stores it in the destination.
9–5
DCD
Decode 4 to 1 of 16
Decodes a 4-bit value (0 to 15), turning on the
corresponding bit in the 16-bit destination.
9–8
ENC
Encode 1 of 16 to 4
Encodes a 16-bit source to a 4-bit value.
Searches the source from the lowest to the
highest bit, and looks for the first set bit. The
corresponding bit position is written to the
destination as an integer.
9–9
COP and
FLL
Copy File and
Fill File
The COP instruction copies data from the source
file to the destination file The FLL instruction
loads a source value into each position in the
destination file.
9–10
Continued on the next page.
Programming
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive