884 Prog Guide Data Transfer Matrix Functions
884 Prog Guide Data Transfer Matrix Functions
Register Bits
I
40051 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
40052 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
40053 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
Each bit has a value of one or zero. Registers are generally displayed in decimal
format and have to be displayed in binary format to read bit information. To obtain
a register value in bit format, do the following:
5. Press the GET COUGET REF software label key or the ERASE/GET key on the
P190 panel. The register number appears with a value next to it in decimal
format (for example, 40250 = 0023 DECIMAL).
6. Press the DISP ASCIVDISP BIN software label key. The following is displayed
on the screen:
40250 = 0000000000010111
Each bit has a value assigned to it. To determine the value of the register in binary
format, add the individual bits.
9-1
DATA TRANSFER (DX) MATRIX FUNCTIONS
BITS 1 2 3 4 5 6 7 8
BITS 9 10 11 12 13 14 15 16
VALUES 128 64 32 16 8 4 2 1
If the bit pattern is 0000000001100100, the value is 100 (64 + 32 + 4). If the bit
pattern is 0000000111110100, the value is 500 (256 + 128 + 64 + 32 + 16 + 4).
The DX MATRIX functions can revise data, shift data, or examine data in a matrix
with or without altering the source.
The Bit Shift Left and Bit Shift Right function blocks occupy two sections in a
10 X 7 section network format and consist of a matrix start reference and the
matrix length.
The Bit Sense and Bit Modify function blocks occupy three sections in a 10 X 7
section network format and consist of a source, a destination, and a specified
matrix length in registers.
In all these function blocks, the top input is the control input; when it receives
power the function is performed. The top output passes power when the top input
receives power. This allows function blocks to be cascaded within a network.
9.1 BIT SHIFT LEFT (BSHL)
FUNCTION
The Bit Shift Left function shifts bits in a matrix to the left, one bit per scan. The
original matrix is replaced by the newly shifted matrix.
FUNCTION BLOCK
l The top section contains either a OXXXX logic coil reference or a 4XXXX holding
register reference. This specifies the first reference in the matrix in which the
shift is taking place.
l The bottom contains the symbol BSHL and the numerical value that specifies
the matrix length in registers or groups of discretes. This constant can range
from 1 to 100 (16 to 1600 bits).
INPUTS
l The top input controls the operation. When it receives power, all the bits in a
matrix are shifted one position to the left. The first bit is shifted out of the
matrix.
9-2
DATA TRANSFER (DX) MATRIX FUNCTIONS
The bottom input, when it receives power, places a 1 in the vacated bit of the
u l
matrix. If this input does not receive power, a 0 is placed in the vacated bit.
OUTPUTS
l The top output passes power when the top input receives power.
l The bottom output passes power when the bit shifted out of the matrix is a one
bit.
EXAMPLE
The following paragraphs provide a detailed explanation of the logic used in
Figure 9-2.
,___-------------_-----
-0
10071 00003
When input 10006 is energized, the top input receives power. All the bits in matrix
40052-40060 are shifted one bit position to the left.
The first bit is shifted out of the matrix. If this bit is a one bit, the bottom output
passespower to energize coil 00003.
If input 10071 is energized, the bottom input receives power and a one is placed
in the last bit of the matrix, bit 144. If the bottom input does not receive power, a
zero is placed in the last bit.
(BIT) (BIT)
LENGTH CARRY IN CARRY OUT
9-3
DATA TRANSFER (DX) MATRIX FUNCTIONS
FUNCTION BLOCK
l The top contains a OXXXX logic coil reference or a 4XXXX holding register
reference. This specifies the first reference in the matrix in which the shift is
taking place.
l The bottom contains the symbol BSHR and the numerical value that specifies
the matrix length in registers or groups of discretes. This constant can range
from 1 to 100 (16 to 1600 bits).
INPUTS
l The top input controls the operation. When it receives power, all the bits in a
matrix are shifted one position to the right. The last bit is shifted out of the
matrix.
l The bottom input, when it receives power, places a 1 in the vacated bit of the
matrix. If this input does not receive power, a 0 is placed in the vacated bit.
OUTPUTS
l The top output passes power when the top input receives power.
l The bottom output passes power when the bit shifted out of the matrix is a one
bit.
EXAMPLE
The following paragraphs provide a detailed explanation of the logic used in
Figure 9-3.
40021
BSHR
00010 ______
1 <> 00001
When input 10022 is energized, the top input receives power. All the bits in matrix
40021-40030 are shifted one bit position to the right.
The last bit, bit 160, is shifted out of the matrix. If this bit is a one bit, the bottom
outprpasses power to energize coil 00001.
If input 10028 is energized, the bottom input receives power and a one is placed
in the first bit of the matrix. If the bottom input does not receive power, a zero is
placed in the first bit.
9-4
DATA TRANSFER (DX) MATRIX FUNCTIONS
FUNCTION BLOCK
l The top holds the pointer value that controls which bit is examined. It can be
a 3XXXX input register reference, a 4XXXX holding register reference, or a
constant up to 1600.
l The middle is the source. It can be one of the following references: a OXXXX
logic coil, a 1XXXX discrete input, a 3XXXX input register, or a 4XXXX holding
register.
l The bottom contains the symbol SENS and the numerical value that specifies
the source matrix length. This constant can range from 1 to 100 (16 to 1600
bits).
INPUTS
l The top input controls the operation. When it receives power, one bit in a matrix
is examined and its status is reported.
NOTE
OUTPUTS
.
l The top output passes power when the top input receives power.
l The middle output passes power when the bit being examined is a one bit. This
output does not pass power when the bit is a zero bit.
. The bottom output passes power if the pointer value is greater than the matrix
size or if the pointer equals zero. In either case, no operation is performed.
9-5
DATA TRANSFER (DX) MATRIX FUNCTIONS
EXAMPLE
The following paragraphs provide a detailed explanation of the logic used in
Figure 9-4.
-1 I-
00026
30064
40011
SENS
._____--_------__--__
-3)
00033
00005
When contact 00026 is energized, the top input receives power. The bit in matrix
40011-40015 which is pointed to in register 30064, is sensed. If the bit sensed is a
one-bit, the middle output passes power to energize coil 00033. If the bit is a zero
bit, the middle output does not pass power.
If the value in register 30064 is 0035, the bit sensed is the third bit in register 40013.
l The middle contains the source and destination; the revised data replaces the
original data in the matrix. It can be either a OXXXX logic coil reference, or a
4XXXX holding register reference. If a logic coil is used it can only be used
once, in this function block. The logic coil cannot be used in another function
block or in the eleventh column of a network; it can be used as a relay contact.
9-6
DATA TRANSFER (DX) MATRIX FUNCTIONS
WARNING
l The bottom contains the symbol MBIT and the numerical value that specifies
the matrix length. This constant can range from 1 to 100 (16 to 1600 bits).
NOTE
INPUTS
l The top input controls the operation. When it receives power, the bit specified
by the pointer is either set to one or cleared to zero.
l The middle input controls whether the bit is set to one or cleared to zero. If this
input receives power, the bit is set to one. If no power is received, the bit is
cleared to zero.
OUTPUTS
l The top output passes power when the top input receives power.
l The middle output passes power when the bit modified is a disabled discrete.
l The bottom output passes power if the pointer value is greater than the matrix
size or if the pointer equals zero. In either case, no operation is performed and
the pointer value is set to the matrix size.
EXAMPLE
The following paragraphs provide a detailed explanation of the logic used in
Figure 9-5.
I
+ I--, 30016
I MBIT
00020
.--------------------~~
-0
00077
9-7
DATA TRANSFER (DX) MATRIX FUNCTIONS
When input 10039 is energized, the top input receives power. The bit in matrix
40061-40080 pointed to by the value in register 30016, is either set to one or cleared
to zero depending on the middle input.
If input 10020 is energized, the middle input receives power and sets the bit to one.
If the middle input does not receive power, the bit is cleared to zero.
If the pointer value is greater than the matrix size or equals zero, the bottom output
passes power and energizes coil 00077.
Top Input Control Input Control Input Control Input Control Input
Bottom Input State of Bit State of Bit Not Used Not Used
In = 1 In = 1
Bottom Node Max. 100 Max. 100 Max. 100 Max. 100
Top Output Copy of Top Copy of Top Copy of Top Copy of Top
Input Input Input Input
Bottom Output State of Bit State of Bit Pointer > Matrix Pointer > Matrix
Out=1 Out=1 or or
Pointer = Zero Pointer = Zero
9-8