Sld/Srd - Omron SYSMAC CP Series Instruction & Reference Manual

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

SLD/SRD

Instruction
ONE DIGIT SHIFT LEFT
ONE DIGIT SHIFT RIGHT
Symbol
Applicable Program Areas
Area
Step program areas
Usage
OK
Operands
Operand
St
Starting Word
E
End Word
Operand Specifications
Area
CIO
WR
HR
St,E
OK
OK
OK
Flags
Name
Error Flag
Function
SLD
SLD(074) shifts data between St and E by one digit (4 bits) to the left. "0" is placed in the rightmost digit
(bits 3 to 0 of St), and the content of the leftmost digit (bits 15 to 12 of E) is lost.
SRD
SRD(075) shifts data between St and E by one digit (4 bits) to the right. "0" is placed in the leftmost digit
(bits 15 to 12 of E), and the content of the rightmost digit (bits 3 to 0 of St) is lost.
Precautions
• St and E must be in the same data
area.
• When large amounts of data are
shifted, the instruction execution
time is quite long. Be sure that the
power is not cut while SLD(074) and
SRD(075) is being executed, caus-
ing the shift operation to stop half-
way through.
CP1E CPU Unit Instructions Reference Manual(W483)
Mnemonic
Variations
SLD
@SLD
SRD
@SRD
SLD
SLD(074)
St
St: Starting Word
E
E: End word
Description
Word addresses
AR
T
C
DM
OK
OK
OK
OK
Label
P_ER
• ON when St is greater than E.
• OFF in all other cases.
Function
code
074
Shifts data by one digit (4 bits) to the left.
075
Shifts data by one digit (4 bits) to the right.
Subroutines
OK
Data type
UINT
UINT
Indirect DM addresses
Constants
@DM
*DM
OK
OK
---
Operation
SLD
E
Lost
SRD
E
S
0Hex
2 Instructions
Function
SRD
SRD(075)
St
St: Starting Word
E
E: End word
Interrupt tasks
OK
Size
Variable
Variable
CF
Pulse bits
TR bits
---
---
---
S
t
0Hex
t
Lost
2-139
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents