5 Categories and Use of Basic Application Instructions Operands: S 1 : Source data device 1 S 2 : Source data device 2 D : Operation result Explanations: 2. When WOR is used as 16-bit instruction, Z device cannot be adopted; when WOR is used as 32-bit instruction, 1. WOR instruction conducts logical OR operation of S 1 and S 2 and stores the result in D V device cannot be adopted. Program Example 1: When X0 = ON, the 16-bit data source D0 and D2 are analyzed and the result of the logical OR is stored in D4. X0 D4 b15 b0 D0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 Before execution WOR D2 After execution D4 Program Example 2:
When X1 is ON, the 32-bit data source (D11, D10) and (D21, D20) are analyzed and the operation result of the logical OR is stored in (D41, D40). X1 B15 b0 b31 D11 D10 1 Before execution DWOR D21 D20 0 After execution D41 D40 1 DVP-PM Operation Instruction 5-44 API Mnemonic Operands Function Controllers 20PM 10PM 27 D WOR P Logical Word OR Type OP Bit Devices Word Devices Program Steps X Y M S K H KnX KnY KnM KnS T C D V Z WOR, WORP: 7 steps DWOR, DWORP:
9 steps S 1 * * * * * * * * * * * D S 2 * * * * * * * * * * * D * * * * * * * * Controllers 20PM 10PM WOR D0 D2 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 DWOR D10 D20 D40 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1