8 Application Instructions API 100-149 API 147 Operands: S : Device for swapping 8 high/low byte. Explanations: 1. If D is used in device F, only 16-bit instruction is applicable. 2. See the specifications of each model for their range of use. 3. As 16-bit instruction: the contents in the 8 high bytes and 8 low bytes are swapped. 4. As 32-bit instruction: the 8 high bytes and 8 low bytes in the two registers swap with each other respectively. 5. This instruction adopts pulse execution instructions (SWAPP, DSWAPP). Program Example 1: When X0 = On, the high 8 bytes and low 8 bytes in D0 will swap with each other. X0 D0 Program Example 2:
When X0 = On, the high 8 bytes and low 8 bytes in D11 will swap with each other and the high 8 bytes and low 8 bytes in D10 will swap with each other. X0 D10 D11 High Byte Low Byte DVP-PLC Application Manual 8-70 Mnemonic Operands Function D SWAP P Byte Swap Type OP Bit Devices Word Devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F SWAP, SWAPP: 3 steps DSWAP, DSWAPP: 5 steps S * * * * * * * * PULSE 16-bit 32-bit EH3 EH3 EH3 ES EX SS SA S X SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV SV2 SV2 SV2 SWAPP D0 High Byte Low Byte DSWAPP D10 High Byte Low Byte