Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 978

Table of Contents

Advertisement

3. Instructions
Example Programming
In this example, EXPLT(720) is used to read the total ON time or number of contact operations from a
DRT2 Slave (I/O Terminal).
Communications Port
Enabled Flag (Port 6)
A202.06
0.00
Explicit message command format
0E
09
Service Code
Destination node address
CS1W-DRM21 DeviceNet Unit
(CPU Bus Unit with unit number 2)
CPU
Unit
Unit address 12 hex (because
the unit number is 2)
Explicit
message
S:
D0
0
S+1:
D1
0
S+2:
D2
0
S+3:
D3
0
S+4:
D4
0
S+5:
D5
0
D:
D100
0
D+1:
D101
0
D+2:
D102
0
D+3:
D103
2
D+4:
D104
2
C:
D200
0
C+1:
D201
0
C+2:
D202
0
C+3:
D203
0
942
When CIO 0.00 and A202.06 (the Communications Port
Enabled Flag for port 06) are ON, EXPLT(720) reads the
Total ON Time (s) or Number of Contact Operations from a
@EXPLT
DRT2 Slave (I/O Terminal). In this case, the Total ON Time or
D0
S
Number of Contact Operations for input 3 are read.
D100
D
D200
C
Service Code = 0E hex, Class ID = 09 hex, Instance ID =
03 hex, and Attribute ID = 66 hex.
For example, a value of 2,752,039 s is returned as the
response for the Total ON Time.
03
66
Attribute ID
Instance ID
Class ID
EXPLT(720)
instruction
DRT2-OD16 Slave
with node address 45
0
0
A
Number of bytes of data: S+1 to S+5 = 5 words = 10 bytes = 0A hex
0
2
D
Slave's node address = 45 = 2D hex
0
0
E
Service Code = 0E hex
0
0
9
Class ID = 09 hex
0
0
3
Instance ID = 03 hex (Input 3)
Attribute ID = 66 hex
0
6
6
Contains 08 hex for 8 bytes of received data in response frame.
0
0
8
0
2
D
Returns Slave's node address = 45 = 2D hex.
0
8
E
Service Code = 8E hex (normal completion)
7
F
E
Service Data = 0029FE27 hex (2,752,039 s decimal)
9
0
0
0
0
4
Set 5 words = 0005 hex since there are 5 words in D to D+5.
Byte order = 0 hex (from leftmost byte), communications port = 6 hex
6
1
2
(port 6), and the DeviceNet Unit's unit address = 12 hex
Response monitoring time = 0000 hex (2 s)
0
0
0
Explicit format type = 0000 hex (DeviceNet format)
0
0
0
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Advertisement

Table of Contents
loading

Table of Contents