Reading From The Local Object Dictionary - Omron C200HW-CORT21-V1 Operation Manual

Canopen slave unit
Table of Contents

Advertisement

Reading from the local object dictionary

5-6

Reading from the local object dictionary

IOWR message structure
IORD message structure
Control code #0002
Reading from the local object dictionary requires a combination of the IOWR
and IORD instructions. The IOWR instruction indicates to the Unit which
object entry to read. After that, the indicated object entry is read with the
IORD instruction.
The reading of a local object entry must be preceded by the corresponding
IOWR instruction at least once after power-on or reset. After an object entry
has been indicated with the IOWR instruction, this object entry can be read
as often as is needed.
If another object entry should be read, a new IOWR instruction must be
executed first, to indicate the index and sub-index of that object.
Note
The IORD instruction can only be executed after a successful execution of
the IOWR instruction.
The following figure shows the IOWR and IORD message structure.
word n
Index object entry [hex]
word n+1
Sub-Index object entry [hex]
word n
Data length
word n+1
Data byte 2
word n+2
Data byte 4
word n+3
Data byte 6
word n+4
Data byte 8
The maximum length of an object entry that can be read is 8 bytes. Data can
only be read from object entries with the attribute RO (read-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 0000h.
Refer to the CANopen Communication Profile Specification or the EDS-file
(see appendix A) for the data length of a specific object entry.
range: 0000h ~ FFFFh
range: 0000h ~ 00FFh
range: 0001 ~ 0008
Data byte 1
Note: Data byte 1 is the least
significant byte.
Data byte 3
Data byte 5
Data byte 7
Section 5-6
77

Advertisement

Table of Contents
loading

Table of Contents