Data Formats - Omron CP1E CPU UNIT SOFTWARE User Manual

Cp1e cpu unit software
Table of Contents

Advertisement

Operand
Specifying
An offset from the beginning of the DM Area
indirect DM
is specified. The contents of the address will
addresses in
be treated as binary data (E-type CPU Unit
Binary Mode
0000 to 2047, N/NA-type CPU Unit 0000 to
8191) to specify the word address in DM
Area.
Add the @ symbol at the front to specify an
indirect address in Binary Mode.
Specifying
An offset from the beginning of the DM Area
indirect DM
is specified. The contents of the address will
Addresses
be treated as BCD data (E-type CPU Unit
in BCD
0000 to 2047, N/NA-type CPU Unit 0000 to
Mode
8191) to specify the word address in the DM
Area.
Add an asterisk (*) at the front to specify an
indirect address in BCD Mode.
Note For Timer Completion Flags and Counter Completion Flags, there is no distinction between word addresses and bit
addresses.
4-3-6

Data Formats

The following table shows the data formats that the CP1E CPU Units can handle.
Type
Unsigned
binary
Binary
Hexadecimal
Decimal
Signed
binary
Binary:
Hexadecimal:
Decimal:
The data is treated as 16-bit signed binary data using the leftmost bit as the
sign bit. The value is expressed in 4-digit hexadecimal.
Positive numbers: If the leftmost bit is OFF, it indicates a non-negative value.
For 4-digit hexadecimal, the value will be 0000 to 7FFF hex.
Negative numbers: If the leftmost bit is ON, it indicates a negative value. For 4-
digit hexadecimal, the value be 8000 to FFFF hex. It will be expressed as the
2's complement of the absolute value of the negative value (decimal).
CP1E CPU Unit Software User's Manual(W480)
Description
Data format
15
14
13
12
11
10
9
15
14
13
12
11
10
9
2
2
2
2
2
2
2
2
3
2
1
0
3
2
1
2
2
2
2
2
2
2
2
32768
16384
8192
4096
2048
1024
512
256
15
14
13
12
11
10
9
15
14
13
12
11
10
9
2
2
2
2
2
2
2
2
3
2
2
2
1
2
0
2
3
2
2
2
1
-32768
16384
8192
4096
2048
1024
512
Sign bit:
1:Negative, 0:Non-negative
4 Understanding Programming
Example
@D300
Contents
&256 decimal
(#0100 hexadecimal)
Specify D00256
Add @
* D200
Contents
#0100
Specify D100
Add *
8
7
6
5
4
3
2
1
8
7
6
5
4
3
2
1
2
2
2
2
2
2
2
0
3
2
1
0
3
2
1
2
2
2
2
2
2
2
128
64
32
16
8
4
2
8
7
6
5
4
3
2
1
8
7
6
5
4
3
2
2
2
2
2
2
2
2
2
2
0
2
3
2
2
2
1
2
0
2
3
2
2
2
256
128
64
32
16
8
4
Application
examples
MOV #0001 @D300
MOV #0001 *D200
Decimal
hexadeci-
equivalent
&0 to
#0000 to
0
&65535
#FFFF
0
2
0
2
1
Negative:
Negative:
0
-1 to
#8000 to
- 32768
#FFFF
1
0
2
1
2
0
Positive:
Positive:
2
1
0 to 32767
#0000 to
#7FFF
4
4-digit
mal
4-13

Advertisement

Table of Contents
loading

Table of Contents