PISO-CPM100(U) / PCM-CPM100 user manual (ver. 2.02) Dec/03/2012 ----------------- 32
SDO Services
“Initiate SDO download protocol” or “Initiate SDO upload protocol” is used
when the object data length
≦
4 bytes. If the object data length
>
4 bytes,
“Download SDO segment protocol” or “Upload SDO segment protocol” will be
used. Calling these two functions, CPM100_SDOReadData and
CPM100_SDOWriteData, the initial protocol and segment protocol will be
selected automatically according to the object data length.
CPM100_SDOAbortTransmit function can abort a pending SDO transfer
at any time. Applying the abort service will have no confirmation from the salve.
PDO Services
After using the CPM100_AddNode to add a slave, the default TxPDOs
and RxPDOs (TxPDO 1 ~ 10, RxPDO 1 ~ 10) will also be added to the
CPM100’s control list. If there are PDOs other than the default setting, the
function CPM100_InstallPDO is used for enabling these TxPDOs or RxPDOs
object. After installing the PDOs, the function CPM100_DynamicPDO can add
or change the PDOs’ mapping objects. Each PDO object supports 0~8
application objects. These application objects defined in the CANopen
specification DS401, and they are mapped to the relative parameters of the
DI/DO/AI/AO channels. After calling the function CPM100_InstallPDO and
CPM100_DynamicPDO, the PDO communication object will be mapped and
activated. If the PDO communication object is not needed no more, use the
function CPM100_RemovePDO to remove it.
When you want to output data via PDO, the function
CPM100_PDOWriteData is useful. This function can write all PDO 8-byte data
or write some parts of PDO 8-byte data. Calling this function will send the
specific data to the corresponding node via PDO protocol, and put the output
data into PDO buffer at the same time. Therefore, you can check the output
history of the PDO. But, if the connection between the CPM100 and the slave
is lost, the history output information may be not the same with the real status
on the slave.
In CANopen specification, you can get the TxPDOs data by applying the
remote transmit request CAN frame. The function CPM100_PDORemote is
needed in this case. Or you can use CPM100_GetPDOLastData to get the last
RxPDO and TxPDO data from the PDO buffer.