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

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

Advertisement

3. Instructions
• 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
D+3
D+4
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
D+3
• Storing Data from the Rightmost Byte (Bits
12 to 15 of C = 8 hex)
Example: Storing the value 1234 hex in
D+3
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 D+3 and D+4
• Storing Data from the Rightmost Byte (Bits
12 to 15 of C = 8 hex)
Example: Storing the value 12345678 hex
in D+3 and D+4
Note The examples above only show the storage of received data in D+3, but send data is stored in S+6 in the
same way.
914
B
C
D
Stored from rightmost byte.
15
08 07
00
B
A
D
C
Command format
Example: Cumulative time 12345678 hex
Example: Address 1234 hex
stored in 78
stored in 34
12 order
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
D+3
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
12.
D+3
The data in the frame is in the order 78
78
Frame
In this case, 12345678 hex is
stored from the leftmost byte in
the order 78
56
34
12.
15
D+3
7
D+4
3
The data in the frame is in the order 78
Frame
78
In this case, 12345678 hex is
stored from the rightmost byte in
the order 78
56
34
12.
15
D+3
5
D+4
1
CS/CJ/NSJ Series Instructions Reference Manual (W474)
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
15
08 07
00
1
2
3
4
56
34
12.
56
34
12
08 07
00
8
5
6
4
1
2
56
34
12.
56
34
12
08 07
00
6
7
8
2
3
4

Advertisement

Table of Contents
loading

Table of Contents