Publication 1766-RM001A-EN-P - October 2008
Conversion Instructions
251
If the destination is the math register, it must be directly addressed as S:13.
S:13 is the only status file element that can be used.
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.
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
TIP
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.
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive