Reading from the local object dictionary
Section 5-6
78
Example
The following example shows how the COB-ID of RPDO1 (object index
1400h, sub-index 1) is read. In this example, the Mach.No. is set to ‘1’.
PLC memory address
Contents
Meaning
DM0200
1400
Index of object to be read
DM0201
0001
Sub-index
11.00
IOWR (-)
Indicate_Obj_Entry
#0002
Control code = #0002
DM0200
Source of message
#1002
Destination = Mach.No.1
Message length = 2 words
255.06
SET
EQ_FLAG
11.01
Read_Obj
11.01
IORD (-)
Read_Obj
#0002
Control code = #0002
#1003
Mach.No.1, message length 3 words
DM0300
Destination of message
255.06
RSET
EQ_FLAG
11.01
Read_Obj
Note that the C200H syntax of the IOWR and IORD instruction is used.
On the rising edge of IR11.00, the Index and Sub-Index are transmitted to
the Unit. After successful execution of the IOWR instruction, IR11.01 is set.
When IR 11.01 is set, the indicated object entry is read and written to PLC
address DM0300. If the reading of the object entry was successful, IR11.01
is reset. The result is e.g.:
PLC memory address
Contents
Meaning
DM0300
0004
Data length = 4 bytes
DM0301
0210
DM0302
4000
COB-ID of RPDO1 = 40000210h
(See Section 3-3-2-1)
In this example, RPDO1 uses identifier 210h.
If another object entry is to be read:
-
Change DM0200 and DM0201
-
Change the message length of the IORD instruction if the length of the
object entry is different
Generate a rising edge of IR11.00
Summary of Contents for C200HW-CORT21-V1
Page 2: ...C200HW CORT21 V1 CANopen Slave Unit OPERATION MANUAL OMRON Cat No W904 E2 2 ...
Page 3: ......
Page 4: ......
Page 5: ......
Page 6: ...C200HW CORT21 V1 CANopen Slave Unit Operation Manual Produced June 2001 ...
Page 7: ...iv ...
Page 9: ...vi ...
Page 13: ...x ...
Page 47: ...Performance Section 2 3 30 ...
Page 85: ...Control and Status area Section 4 3 68 ...
Page 113: ...Flow diagrams Section 6 6 96 ...
Page 123: ...Maintenance Section 7 3 106 ...
Page 133: ...116 ...
Page 135: ...118 ...
Page 139: ...122 ...
Page 141: ......