DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming Operands: S 1 : Matrix source device 1 S 2 : Matrix source device 2. D : Operation result n : Matrix length ( n = K1~K256) Explanations: 1. MOR instruction performs matrix OR operation between matrix source device 1 and 2 with matrix length n and stores the operation result in D . 2. Rule of matrix OR operation: the result is 1 if either of the two bits is 1. The result is 0 only when both two bits are 0. 3. If operands S 1 , S 2 , D use KnX, KnY, KnM, KnS format, only n = 4 is applicable. Program Example: When X0 = ON, MOR performs matrix OR operation between 16-bit registers D0~D2 and 16-bit registers D10~D12.
The operation result is then stored in 16-bit registers D20~D22. X0 MOR D0 b15 b0 D1 D2 MOR Before Execution D10 D11 D12 After Execution D20 D22 D21 3-442 API Mnemonic Operands Function Controllers 181 MOR P Matrix OR ES2/EX2 SS2 SA2 SX2 SE Typ e OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY Kn M KnS T C D E F MOR, MORP:
9 steps S 1 * * * * * * * S 2 * * * * * * * D * * * * * * n * * * PULSE 16-bit 32-bit SA2 2 SE SA2 SA2 ES2/EX2 SS SX2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 SE SE D0 D10 D20 K3 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1