Delta AH500 — 6.13.2 Explanation of Data Processing Instructions

AH500 Programming Manual Example 2: 1. When X0.0 is switched from OFF to ON, the instruction DECO decodes the values of b2~b0 in D10 as the values of b7~b0 in D20, and the values of b15~b8 in D10 become 0. 2. The values of the lower 3 bits in D10 is decoded as the values of the lower 8 bits in D20. The values of the higher 8 bits are 0. 3. After the instruction DECO is executed and X0.0 is switched OFF, the data in D20 is unchanged. b15 b0 D10 b15 b0 D20 Additional remark: 1. Suppose D is a bit device. If n is less than 1, or if n is larger than 8, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#200B. 2. Suppose D is a word device.

If n is less than 1, or if n is larger than 4, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#200B. 3. Suppose S is a bit device. If S + n -1 exceeds the device range, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 4. Suppose D is a bit device. If D +(2^ n )- 1 exceeds the device range, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 6-266 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 4 2 1 The values of b15~b8 in D10 become 0. 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0