PISO-CPM100(U) / PCM-CPM100 user manual (ver. 2.02) Dec/03/2012 ----------------- 74
4.5.40. CPM100_DynamicPDO
Description:
This function can modify the mapping data of PDO object in the PDO
object list of the CANopen Master Library stack. Take a note that before
calling this function user must check if the PDO had been installed in the
CPM100.
Syntax:
WORD
CPM100_DynamicPDO(
BYTE
BoardNo,
BYTE
Node,
WORD
Cobid,
BYTE
RxTx,
BYTE
Entry,
DWORD
EntryData,
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).
Entry:
[input] PDO mapping object subindex value (1 ~ 8).
EntryData:
[input] A Double Word (4-byte) information of mapped
application object. Users need to look up the user manual of the
CANopen slave device to find the information of the application
object, and obey the following example format to fill this parameter.
For Example, EntryData = 0x64110310:
Mapping to index 0x6411
and subindex 0x03 with data length 0x10 bit (2-byte).
If the function parameters are as following,
Cobid = 0x333,
RxTx = 0, Entry = 2, EntryData = 0x64110310
.
This example will
map the 16-bit data of index 0x6411 and subindex 0x03 object to
the 2
nd
entry of COB-ID 0x333 RxPDO.
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”.