
Chapter 10: Function Blocks LogicPro User’s Guide
164 Watlow Anafaze Doc.# 28002-00 Rev 3.00
D-- is the INT or LONG integer Variable on which the
rotation is to be performed (also an output).
Outputs
Q-- is the rotation function’s output bit. The output bit is
disabled if the enable bit is False and is enabled as soon as the
enable bit is True.
D-- is the rotation function’s output destination (as well as
input). The input INT or LONG integer will be replaced with
the result of the rotation operation.
Shift (RSFT/LSFT)
symbol1 = RSFT, LSFT
The shift function, shown in Figure 10.46, performs a bit-
level shift of 16-bit or 32-bit integers: the right shift RROT
moves the i-th bit into the (i-1)’th bit, as the lower bits are lost
and the higher padded with zeros; the left rotation LROT
moves the i-th bit into the (i+1)’th bit, as the highest bits are
lost and the lower bits padded with zeros. The operation is
performed on either BIN or BCD numerals which are treated
simply as a collection of bits, such that range-checking is not
performed.
symbol2 = W, L, WP, or LP
The Variable D needs to be declared as integer type, of size
specified in this symbol, as follows. Two memory sizes are
available for this integer, word-length W (16-bit) and long-
word L (32-bit). In addition, the function block’s calculation
can be performed continuously, or only as pulses, when the
enable bit (EN) switches value from False to True. In the
continuous computation case, integers are marked as W or L,
while in the Pulse computation case, they are marked as WP or
LP.
Figure 10.46 The Right and Left Shift Function
Blocks
Inputs
EN-- is the shift function block’s enable bit: the conversion is
performed if it is True.
Comentarios a estos manuales