Omron SYSMAC CS Series Instruction & Reference Manual page 920

Hide thumbs Also See for SYSMAC CS Series:
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+1 = 0 hex)
Example: Storing the value 1234 hex in
D+3
• Storing Data from the Rightmost Byte (Bits
12 to 15 of C+1 = 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+1 = 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+1 = 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.
886
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 → 56 → 34 → 12 order
stored in 34 → 12 order
34
12
Service Data:1234Hex
The data in the frame is in the order 34 → 12.
Frame
In this case, 1234 hex is
stored from the leftmost
byte in the order 34 → 12.
D+3
The data in the frame is in the order 34 → 12.
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 → 56 → 34 → 12.
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 → 56 → 34 → 12.
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)
78
56
34
12
Service Data:12345678Hex
34
12
15
08 07
00
3
4
1
2
34
12
15
08 07
00
1
2
3
4
56
34
12
08 07
00
8
5
6
4
1
2
56
34
12
08 07
00
6
7
8
2
3
4

Advertisement

Table of Contents
loading

Table of Contents