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

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Conversion Instructions
Examples
3-11-5 2'S COMPLEMENT: NEG(160)
Purpose
Ladder Symbol
Variations
Applicable Program Areas
Operand Specifications
The following diagram shows an example of 8-digit BCD-to-binary conversion.
7
6
5
4
3
2
1
0
16
16
16
16
16
16
16
16
When CIO 0.00 is ON in the following example, the hexadecimal value in
CIO 201 and CIO 200 is converted to a BCD value and stored in D1001 and
D1000.
0.00
200
D1000
S+1: CIO 201
MBS
0
0
7
6
x16
x16
x16
2X16
R+1: D1001
MBS
0
2
7
6
x10
x10
x10
Calculates the 2's complement of a word of hexadecimal data.
NEG(160)
S
R
Variations
Executed Each Cycle for ON Condition
Executed Once for Upward Differentiation
Executed Once for Downward Differentiation Not supported
Immediate Refreshing Specification
Block program areas
OK
OK
Area
CIO Area
Work Area
Holding Bit Area
Auxiliary Bit Area
Timer Area
Counter Area
DM Area
R+1
R
7
6
5
4
3
2
1
10
10
10
10
10
10
10
10
S: CIO 200
2
D
3
5
4
3
x16
x16
5
4
3
2
+13X16
+3X16
+2X16
+10=2961930
9
6
1
5
4
3
x10
x10
S: Source word
R: Result word
Step program areas
Subroutines
OK
S
CIO 0 to CIO 6143
W0 to W511
H0 to H511
A0 to A959
T0000 to T4095
C0000 to C4095
D0 to D32767
Section 3-11
0
2
0
A
LSB
2
1
0
x16
x16
x16
R: D1000
9
3
0
LSB
2
1
0
x10
x10
x10
NEG(160)
@NEG(160)
Not supported
Interrupt tasks
OK
R
A448 to A959
395

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents