Chapter 6 Applied Instructions 4 digit th 3 digit rd 2 digit nd 1 digit st D10 ( ) 16-bit binary number Transferring the digits D20 ( ) 16-bit binary number Unchanged 4 digit th 3 digit rd 2 digit nd 1 digit st Unchanged Suppose the number in S is 16#1234, and the number in D is 16#5678. After the instruction is executed, the number in S is 16#1234, and the number in D is 16#5128. Example 1: 1. When SM605 is OFF, the data involved in the instruction is binary-coded decimal numbers.
When X0.0 is ON, the two digits of the decimal number which start from the fourth digit of the decimal number (the digit in the thousands place of the decimal number) in D10 are transferred to the two digits of the decimal number which start from the third digit of the decimal number (the digit in the hundreds place of the decimal number) in D20. After the instruction is executed, the digits in the thousands place of the decimal number (10 3 ) and the ones place of the decimal number (10 0 ) in D20 are unchanged. 2.
When the binary-code decimal number exceeds the range between 0 and 9,999, the operation error occurs, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#200D. D10 (16-bit binary number) Conversion D10 (4-digit binary-coded decimal) Transferring the digits D20 ( ) 4-digit binary-coded decimal Conversion D20 ( ) 16-bit binary number Suppose the number in D10 is 1234, and the number in D20 is 5678. After the instruction is executed, the number in D10 is unchanged, and the number in D20 is 5128. Example 2: When SM605 is ON, the data involved in the instruction is binary numbers.
When the instruction SMOV is executed, the binary numbers in D10 and D20 are not trasnformed into the binary-coded 6-131 3 10 2 10 1 10 0 10 hanged Unchan 3 10 2 10 1 10 0 10