309
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Data Shift Instruction
3
SFTR
SFTR
Applicable Program Areas
Operands
C: Control Word
Note St and E must be in the same data area.
z Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
REVERSIBLE SHIFT REGIS-
TER
SFTR @SFTR 084
Creates a shift register that shifts data to either the
right or the left.
Symbol
SFTR
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or transition
programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
C Control word UINT 1
St Starting word UINT Variable
EEnd word UINT Variable
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
C
OK OK OK OK OK OK OK OK OK OK ---
OK
--- OK --- --- --- ---St
---
E
Name Label Operation
Error Flag ER • ON when St is greater than E.
• OFF in all other cases.
Carry Flag CY • ON when 1 is shifted into it.
• OFF when 0 is shifted into it.
• OFF when reset is set to 1.
SFTR(084)
C
St
E
C: Control word
St: Starting word
E: End word
15 14 13 12
Data input
Reset
Shift input
Shift direction
1 (ON): Left
0 (OFF): Right