Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 960

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

• Storing Data from the Leftmost Byte
Set bits 12 to 15 of C+1 to 0 hex.
Frame (order of data in line)
A
Data
area
S+5
S+6
Note: A, B, C, and D represent bytes of data.
• Storing Data from the Rightmost Byte
Set bits 12 to 15 of C+1 to 8 hex.
Frame (order of data in line)
A
Data
area
S+5
S+6
Note: A, B, C, and D represent bytes of data.
Precaution
Be sure that the order of bytes in the source data
matches the order in the explicit message's
frame (order of data in the line). For example,
when the service data is in 2-byte or 4-byte units,
the order of data in the frame is leftmost to
rightmost order in 2-digit pairs, as shown in the
following diagram.
The following diagrams show how data is stored in the data areas when the service data is in 2-byte or
4-byte units.
1)
Data in 2-byte Units
• Storing Data from the Leftmost Byte (Bits
12 to 15 of C = 0 hex)
Example: Storing the value 1234 hex in
S+5
• Storing Data from the Rightmost Byte (Bits
12 to 15 of C = 8 hex)
Example: Storing the value 1234 hex in
S+5
2)
Data in 4-byte Units
• Storing Data from the Leftmost Byte (Bits
12 to 15 of C = 0 hex)
Example: Storing the value 12345678 hex
in S+5 and S+6
CS/CJ/NSJ Series Instructions Reference Manual (W474)
B
C
D
Stored from leftmost byte.
15
08 07
00
A
B
C
D
B
C
D
Stored from rightmost byte.
15
08 07
00
B
A
D
C
Command format
Example: Address 1234 hex
Example: Cumulative time12345678 hex
stored in 34
12 order
stored in 78
34
12
Service Data:1234Hex
The data in the frame is
in the order 34
Frame
In this case, 1234 hex is
stored from the leftmost
byte in the order 34
S+5
The data in the frame is
in the order 34
Frame
In this case, 1234 hex is
stored from the rightmost
byte in the order 34
S+5
The data in the frame is in the
order 78
78
56
Frame
In this case, 12345678 hex is
stored from the leftmost byte in
the order 78
56
34
12.
15
S+5
7
S+6
3
3. Instructions
56
34
12 order
78
56
34
12
Service Data:12345678Hex
12.
34
12
12.
15
08 07
00
3
4
1
2
12.
34
12
12.
15
08 07
00
1
2
3
4
56
34
12.
34
12
08 07
00
8
5
6
4
1
2
923
3

Advertisement

Table of Contents
loading

Table of Contents