Download Print this page

Shifting N-Word Data To The Right By N Word(S) - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Shifting n-word data to the right by n word(s)

WSFR(P)
This instruction shifts (n1) words of data to the right by (n2) word(s) from the device specified by (d).
Ladder diagram
(s)
(d)
(n1) (n2)
FBD/LD
EN
ENO
s
d
n1
n2
Setting data
■Descriptions, ranges, and data types
Operand
Remarks
(s)
Head device number stored to the shift data after the shift
(d)
Head device number to be shifted
*1
(n1)
Data length of shift data
*1
(n2)
Number of shifts
EN
Execution condition
ENO
Execution result
*1 Set so that n2n1.
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s)
(d)
(n1)
(n2)
Processing details
• This instruction shifts (n1) words of data to the right by (n2) word(s) from the device specified by (d). After the shift, (n2)
points from (s) are set into (n2) points from (d)+(n1-n2).
• This instruction sets the specified value for (n2) points of devices from (d) + (n1-n2) after the shift when K is specified for
(s).
(d)+8
(d)+7
(d)+6
(d)+5
30FH
1EH
100H
0H
(s)+3
(s)+2
(s)+1
(s)
0H
0H
0H
0H
• When the value specified for (n1) or (n2) is 0, the processing is not performed.
Word
T, ST, C, D, W,
U\G
SD, SW, R
(n1)
(n2)
(d)+4
(d)+3
(d)+2
(d)+1
1FFH
10H
1FH
7FFH
(d)+4
(d)+3
(d)+2
(d)+1
30FH
1EH
100H
0H
Structured text
ENO:=WSFR(EN,s,n1,n2,d);
ENO:=WSFRP(EN,s,n1,n2,d);
Range
Data type
Word
Word
0 to 65535
16-bit unsigned binary
0 to 65535
16-bit unsigned binary
Bit
Bit
Double word Indirect
specification
Z
LC
LZ
(d)
2AH
(d)
1FFH
Data type (label)
ANY16
ANY16
ANY16_U
ANY16_U
BOOL
BOOL
Constant
Others
K, H
E
$
6 SEQUENCE INSTRUCTIONS
6.4 Shift Instructions
6
153

Hide quick links:

Advertisement

loading