DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming Operands: S : Matrix source device D : Operation result n : Matrix length (K1~K256) Explanations: 1. MBS instruction shifts the bits in the matrix to the left or the right. M1097 = OFF, bits shift to the left, M1097 = ON, bits shift to the right. The empty bit (left shift: b0; right shift: b16 n -1) after every bit is shifted once will be filled with the value of M1096 (Borrow flag for matrix operation). The bit which is shifted out of the matrix (left shift: b16 n -1; right shift: b0) will be sent to M1095 (Carry flag for matrix operation) and operation result is stored in D . 2.
The pulse execution instruction (MBSP) is generally adopted. 3. If operands S or D use KnX, KnY, KnM, KnS format, only n = 4 is applicable 4. Associated flags: M1095: Carry flag for matrix rotation/shift/output M1096: Borrow flag for matrix rotation/shift/input M1097: Direction flag for matrix rotation/shift Program Example 1: When X0 = ON, M1097 = OFF, indicating a left matrix shift is performed. Assume matrix borrow flag M1096 = OFF (0) and the 16-bit registers D0 ~ D2 will perform a left matrix shift and the result will be stored in the matrix of the 16-bit registers D20 ~ D22, meanwhile the matrix carry flag M1095 will be ON (1). .
X0 K3 3-452 API Mnemonic Operands Function Controllers 188 MBS P Matrix bit shift ES2/EX2 SS2 SA2 SX2 SE Typ e OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F MBS, MBSP: 7 steps S * * * * * * * D * * * * * * n * * * PULSE 16-bit 32-bit SA2 SA2 SA2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 SE SE SE RST M1097 MBSP D0 D20