PISO-CPM100(U) / PCM-CPM100 user manual (ver. 2.02) Dec/03/2012 ----------------- 60
4.5.26. CPM100_SDOWriteData
Description:
The function CPM100_SDOWriteData can send out a SDO message
to the specified salve device. This procedure is also called download
SDO protocol. The parameter node of the function
CPM100_SDOWriteData is used to point which slave device will receive
this SDO message. Because the data length of each object stored in
object dictionary is different, users need to know the data length when
writing the object of the object dictionary of the specified slave devices.
This function supports both expedition mode (less then 4-byte data
length) and segment mode (more then 4-byte data length)
Syntax:
WORD
CPM100_SDOWriteData (
BYTE
BoardNo,
BYTE
Node,
WORD
Index,
BYTE
SubIndex,
DWORD
TDLen,
BYTE
*TData,
WORD
*RDLen,
BYTE
*RData,
BYTE
BlockMode)
Parameter:
BoardNo:
[input] CPM100 board number (0~7).
Node:
[input] Slave device Node-ID (1~127).
Index:
[input] The index value of object of the object dictionary.
SubIndex:
[input] The subindex value of object of the object dictionary.
TDLen:
[input] Total data size to be written.
*TData:
[input] The SDO data written to slave device.
*RLen:
[output] Total data size of responded data.
*RData:
[output] SDO data responded from the specified slave device.
BlockMode:
[input] 0 means this function is non-block-function, and 1
means this function is block-function. If set this parameter to 1, the
running procedure of the users’ application will be held in the
function until return. If set to 0, this function will return “CPM_
Processing” directly. This function will return its process status
while users apply it with the same “BoardNo” and “Node” again. If
the procedure is still not complete, it will return “CPM_Wait”.