PISO-CPM100(U) / PCM-CPM100 user manual (ver. 2.02) Dec/03/2012 ----------------- 73
4.5.39. CPM100_InstallPDO
Description:
After calling the CPM100_InstallPDO function, a PDO COB-ID will be
installed in the PDO object list of the CANopen Master Library stack. If
the slave device has defined the default PDO object in RxPDO1 ~
RxPDO10 and TxPDO1 ~ TxPDO10, in this case, these default PDO
will be installed automatically while using the function
CPM100_AddNode with automatic mode. Otherwise, the TxPDOs or
RxPDOs need to be installed manually by calling the function
CPM100_InstallPDO.
Syntax:
WORD
CPM100_InstallPDO(
BYTE
BoardNo,
BYTE
Node,
WORD
Cobid,
BYTE
RxTx,
WORD
PDO_No,
BYTE
BlockMode)
Parameter:
BoardNo:
[input] CPM100 board number (0~7).
Node:
[input] Slave device Node-ID (1~127).
Cobid:
[input] COB-ID used by the PDO object.
RxTx:
[input] PDO type (0: RxPDO, 1: TxPDO).
PDO_No:
[input] PDO mapping object No (1 ~ 512).
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”.