EasyManua.ls Logo

Allen-Bradley MicroLogix 1200 - Page 171

Allen-Bradley MicroLogix 1200
424 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Publication 1762-RM001C-EN-P
Conversion Instructions 11-9
Updates to Math Status Bits
Changes to the Math Register
Contains the 5-digit BCD result of the conversion. This result is valid at
overflow.
Example
The integer value 9760 stored at N7:3 is converted to BCD and the BCD
equivalent is stored in N7:0. The maximum BCD value is 9999.
Table 11.12 Math Status Bits
With this Bit: The Controller:
S:0/0 Carry always resets
S:0/1 Overflow sets if BCD result is larger than 9999. On overflow, the minor error
flag is also set.
S:0/2 Zero Bit sets if result is zero, otherwise resets
S:0/3 Sign Bit sets if the source word is negative; otherwise resets
NOTE
To convert numbers larger than 9999 decimal, the
destination must be the Math Register (S:13). You must
reset the Minor Error Bit (S:5/0) to prevent an error.
TOD
To BCD
Source N7:3
9760<
Dest N10:0
9760<
TOD
9760N7:3 Decimal 0010 0110 0010 0000
9760N7:0 4-digit BCD1001 0111 0110 0000
MSB
LSB
The destination value is
displayed in BCD format.

Table of Contents

Other manuals for Allen-Bradley MicroLogix 1200

Related product manuals