AH500 Motion Control Module Manual The binary value in S is converted into a binary-coded decimal value, Explanation and the conversion result is transferred to D . If a binary number is converted to a binary-coded decimal number which is not in the range of 0 to 9,999, the instruction BCD will not be executed. If a binary number is converted to a binary-coded decimal number which is not in the range of 0 to 99,999,999, the instruction DBCD will not be executed. BCD can be used to convert the binary value in a positioning unit to a binary-coded decimal value, and transfer the conversion result to an external device, e.g. a seven-segment display.
SM1049 is an Ox motion subroutine error flag, and SM953 is an O100 error flag. Example When X0.0 is ON, the binary value in D10 is converted into a binary-coded decimal value, and the digit in the ones place of the conversion result is stored in K1M0 (M0~M3). X0.0 If D10=001E (hexadecimal number)=0030 (decimal number), M0~M3=0000 (binary number). 5-36 API Instruction code Operand Function Converting a binary number into a binary-coded decimal number 18 D BCD P S, D Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S D Pulse instruction 16-bit instruction (5 steps) 32-bit instruction (6 steps) 0 BCD D10 K1M0