Mitsubishi — Chapter 6 Application Instructions API 00-49

6 Application Instructions API 00-49 Operands: D 1 : Data to be exchanged 1 D 2 : Data to be exchanged 2 Explanations: 1. If D 1 and D 2 are used in device F, only 16-bit instruction is applicable. 2. See the specifications of each model for their range of use. 3. The contents in the devices designated by D 1 and D 2 will exchange. 4. Flag: M1303 (designated by XCH working mode). Program Example 1: When X0 = Off → On, the contents in D20 and D40 exchange with each other. X0 Before execution After execution 40 D20 120 D20 D40 120 40 D40 Program Example 2: When X0 = Off → On, the contents in D100 and D200 exchange with each other.

Before execution After execution D100 D100 D101 40 20 D101 D200 D200 D201 20 40 D201 Remarks: 1. ES/EX/SS do not support M1303. 2. As a 16-bit instruction, when the devices designated by D 1 and D 2 are the same and M1303 = On, the upper and lower 8 bits of the designated devices exchange with each other. 3. As a 32-bit instruction, when the devices designated by D 1 and D 2 are the same and M1303 = On, the upper and lower 16 bits in the individual designated device exchange with each other. DVP-PLC Application Manual 6-30 API Mnemonic Operands Function 17 D XCH P Exchange Type OP Bit Devices Word Devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F XCH, XCHP: 5 steps DXCH, DXCHP:

9 steps D 1 * * * * * * * * D 2 * * * * * * * * PULSE 16-bit 32-bit EH3 SV2 EH3 EH3 ES EX SS SA SX SC EH SV ES EX SS S A SX SC EH SV ES EX SS SA SX SC EH SV SV2 SV2 XCHP D20 D40 DXCHP D100 D200