Functions
5.1 CANopen
SIMATIC PN/CAN LINK
Operating Instructions, 03/2022, A5E39895388-AC
49
5.1.2.3
Acyclic data exchange between controller and PN/CAN LINK
Acyclic data exchange
The PN/CAN LINK provides multiple data records for the CANopen Manager module on the
PROFINET side, which the S7 user program can access with the acyclic PROFINET IO services
RDREC (read data record) und WRREC (write data record). These data records are not available
to the configured CANopen slaves.
16 data records are available for SDO reading and for SDO writing.
The data record indices in use are 0x200 to 0x20F.
Note
A data record for a (sub)module in PROFINET is uniquely defined by an "index" that specifies
the data record number. The index is a 32-bit integer. Different data records differ in their
index.
Each data record represents an independent communication channel that can be used
independently of the other channels. SDO communication is initiated with the corresponding
data record with the help of the services RDREC (read data record) and WRREC (write data
record). A WRREC is always run first to transfer the desired SDO command to the PN/CAN
LINK; it is followed by a RDREC to the same index to retrieve the result. RDREC may have to be
repeated multiple times if the PN/CAN LINK returns information that SDO access has not yet
finished (status code = "Busy").
A maximum of 128 bytes are transmitted during an SDO access.
WRREC: Write data record
Data record size: 7 bytes for SDO read access, 7 bytes + <data length> for SDO write access
Table 5- 3
Structure of the data to be written with WRREC (write data record)
Byte
Value for "Read SDO"
Value for "Write SDO"
0
Command = 0x52 = 82 ("R")
Command = 0x57 = 87 ("W")
1
Node ID
2 … 3
OD index (Big Endian, which means MSB of the value in byte 2 and LSB in byte 3)
4
OD subindex
5 … 6
Number of bytes to be read with SDO
(Big Endian), permitted are 1 ... 128
Number of bytes to be written with SDO
(Big Endian)
7 ... <END>
<missing>
Bytes to be written
WRREC access can be successful or return one of the following error codes.
Summary of Contents for SIMATIC PN/CAN LINK
Page 1: ......