AH500 Programming Manual API 0306 Symbol: S 1 : Data which will be exchanged Word/Double word S 2 : Data which will be exchanged Word/Double word Explanation: 1. The data in the device specified by S 1 is exchanged with the data in the device specified by S 2 . 2. Only the 32-bit instructions can use the 32-bit counter. Example 1: When X0.0 is switched from OFF to ON, the data in D20 is exchanged with the data in D40. Before the instruction is executed: After the instruction is executed: D20 120 40 D20 D40 40 120 D40 Example 2: When X0.0 is switched from OFF to ON, the data in D100 is exchanged with the data in D200. Before the instruction is executed: After the instruction is executed:
D100 9 8 D100 D200 D101 20 8 40 9 D200 D101 D201 40 20 D201 6-126 Instruction code Operand Function D XCH P S , S 1 2 Exchanging the data Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S 1 S 2 Pulse instruction 16-bit instruction (5 steps) 32-bit instruction (5 steps) AH500 AH500 AH500