Download 620 WinLoader, Version 5.4, User Manual

Transcript
3.11
Data Conversion Instructions, Continued
Binary to BCD
Conversion
Refer to Table 3-59 for binary to BCD conversion specifications.
Table 3-59 Binary to BCD Conversion Specifications
SPECIFICATION
DESCRIPTION
CPM
Compatibility
620-11/12/14/1631/1633/36 LCs
Symbol
Usage
Converts a two's complement binary number obtained from
a data manipulation instruction or preceding calculation into
a 4-digit BCD number within a range of 0 to 9999; BCD
value can then be outputted through a discrete output
module to a field device that requires BCD-coded input data.
Characteristics
• Sign of original binary value can be indicated by
programming a coil immediately following conversion with
a send out or Push of 1 instruction programmed on next
line.
• An optional error/status word may be assigned to monitor
for non-BCD operands (out of range, invalid data); when
this occurs:
– bit 11 of error/status word is asserted (set to 1) and
2048 is written to specified error address;
– conversion result of zero is placed on stack;
– refer to Section 4 for information on error/status word.
Programming
keystrokes
Perform the following steps to program a binary to BCD
conversion instruction in a line of logic.
Step
1
2
3
4
Action
Press [F9] to select Operators Logic
Group.
Press [F6] to select Conversion
Operators Group.
Press [F1] to select binary to BCD
conversion instruction.
Enter optional error address.
Continued on next page
72
620 WinLoader Programming Reference
4/05