Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 463

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Conversion Instructions
Flags
Example
0.00
3-11-18 GRAY CODE CONVERT: GRY(474)
Purpose
Ladder Symbol
Variations
430
Name
Label
Error Flag
ER
Equals Flag
=
Negative Flag
N
When CIO 0.00 is ON in the following example, the double signed binary data
in D101 and D100 are checked against the format specified in the control
word (0003). The source data is correct, so the double signed binary data in
D101 and D100 is converted to double signed BCD and output to D201 and
D200.
S+1: D101
F F 8 B
D100
D+1: D201
D200
F 7 6 5
Converts the gray binary code in a specified word to standard binary data,
BCD data, or an angle at the specified resolution.
GRY(474)
C
S
D
Variations
Executed Each Cycle for ON Condition
Executed Once for Upward Differentiation
Executed Once for Downward Differentiation Not supported
Immediate Refreshing Specification
Operation
ON if C is not within the specified range of 0000 to 0003.
ON if C=0000 and the source data is not within the range:
FF67 6981 to FFFF FFFF or 0000 0000 to 0098 967F.
ON if C=0001 and the source data is not within the range:
FB3B 4C01 to FFFF FFFF or 0000 0000 to 04C4 B3FF.
ON if C=0002 and the source data is not within the range:
FF67 6981 to FFFF FFFF or 0000 0000 to 05F5 E0FF.
ON if C=0003 and the source data is not within the range:
FECE D301 to FFFF FFFF or 0000 0000 to 05F5 E0FF.
OFF in all other cases.
ON if D and D+1 contain 0000 0000 after execution.
OFF in all other cases.
ON if C=0000 or 0001 and the result's sign bit is ON after
execution.
ON if C=0002 and the leftmost digit of the result is F.
ON if C=0003 and the leftmost digit of the result is A or F.
OFF in all other cases.
S: D100
Double signed binary data
3 4 4 F
D: D200
4 3 2 1
Double signed BCD data
(–7,654,321)
C: First control word
S: Source word
D: First destination word
Section 3-11
GRY(474)
@GRY(474)
Not supported

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents