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
Содержание C200HW-CORT21-V1
Страница 2: ...C200HW CORT21 V1 CANopen Slave Unit OPERATION MANUAL OMRON Cat No W904 E2 2 ...
Страница 3: ......
Страница 4: ......
Страница 5: ......
Страница 6: ...C200HW CORT21 V1 CANopen Slave Unit Operation Manual Produced June 2001 ...
Страница 7: ...iv ...
Страница 9: ...vi ...
Страница 13: ...x ...
Страница 47: ...Performance Section 2 3 30 ...
Страница 85: ...Control and Status area Section 4 3 68 ...
Страница 113: ...Flow diagrams Section 6 6 96 ...
Страница 123: ...Maintenance Section 7 3 106 ...
Страница 133: ...116 ...
Страница 135: ...118 ...
Страница 139: ...122 ...
Страница 141: ......