Writing to the local object dictionary
Section 5-5
75
5-5
Writing to the local object dictionary
Control code #0001
The following figure shows the IOWR message structure.
IOWR message structure
word n
Index object entry [hex]
range: 0000h ~ FFFFh
word n+1
Sub-Index object entry [hex]
range: 0000h ~ 00FFh
word n+2
Data length
range: 0001 ~ 0008
word n+3
Data byte 2
Data byte 1
word n+4
Data byte 4
Data byte 3
Note:
Data byte 1 is the least
significant byte.
word n+5
Data byte 6
Data byte 5
word n+6
Data byte 8
Data byte 7
The maximum amount of data that can be written to an object entry with the
IOWR instruction is 8 bytes. Data can only be written to object entries with
the attribute WO (write-only), RW (read-write), RWR (read-write on input
application objects), or RWW (read-write on output application objects).
If an object entry is a simple variable, the value for the Sub-Index (word n+1)
should be set to zero.
Refer to the CANopen Communication Profile Specification or the EDS-file
(see appendix A) for the data length of a specific object entry.
Example
The following example shows how to store all configuration data in non-
volatile memory (see section 3-3-2-9). In this example, the Machine number
is set to ‘1’.
Note that the C200H syntax of the IOWR instruction is used.
10.00
IOWR (-)
Store_Params
#0001
Control code #0001
DM0100
Source of message
#1005
Destination = Mach.No.1
Message length = 5 words
255.06
12.00
EQ_FLAG
ERROR
PLC memory address
Content
Meaning
DM0100
1010
Index 1010h = Store Parameters
DM0101
0001
Subindex 01h = Save all
DM0102
0004
Data length = 4 bytes
DM0103
6173 = 'as'
DM0104
6576 = 'ev'
Data = 6576 6173h = 'evas'
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: ......