PISO-CPM100(U) / PCM-CPM100 user manual (ver. 2.02) Dec/03/2012 ----------------- 105
4.5.70. CPM100_ResponseMasterSDO
Description:
Using this function can reply the SDO messages to the SDO sender.
For example, the CPM100 is initialized with node ID 2. If someone
sends a SDO message with the COB-ID 0x602 for reading or writing the
object of the CPM100, the CPM100 need to reply the corresponding
SDO message, use the function CPM100_ResponseMasterSDO to do it.
When users implement the function CPM100_ResponseMasterSDO,
the CPM100 will send a SDO message with COB-ID 0x582 to the
CANopen network. This function is usually applied with the SDO ISR
series function .About the demo please refer to the section 4.1.6
SDO_PDO_ISR.
Note1: The function is valid while the Node parameter of the
function CPM100_InitMaster is > 0.
Note2: If the CPM100 want to reply a SDO Abort message, please
use the function CPM100_SDOAbortTransmit (section 3.5.20) to do
it.
Syntax:
WORD
CPM100_ResponseMasterSDO (
BYTE
BoardNo,
BYTE
ResType,
WORD
Index,
BYTE
SubIndex,
BYTE
Len,
BYTE
*Data)
Parameter:
BoardNo:
[input] CPM100 board number (0~7).
ResType:
[input] Response type of SDO message, 0 for replying the
read SDO message and 1 for the write SDO message.
Index:
[input] Object index of object dictionary of slave devices.
SubIndex:
[input] Object subindex of object dictionary of slave devices.
Len:
[input] The data length of the response data. If the ResType is 1
(write type), the Len and *Data parameter is useless.
*Data:
[input] Return 0~4 bytes of the SDO response data.