background image

 

PISO-CPM100(U) / PCM-CPM100 user manual (ver. 2.02) Dec/03/2012    -----------------    117 

5. Demo Programs 

The CPM100 provides 10 demos of the various applications for NMT 

protocol, SDO protocol, PDO protocol, NMT Error IST…etc. All these demos 
support VC++, VB.net 2005, and C# 2005. There is also a tool, CPMUtility, to 
control/monitor CANopen slaves with CPM100 easily and quickly. Users can 
find these demos and utility tool in the fieldbus CD or on the web site. 

The path of CAN CD 

fieldbus_cd://canopen/master/piso-cpm100

 

The address of the web site is   

 

http://www.icpdas.com/products/Remote_IO/can_bus/piso-cpm100.htm

 

5.1.   Brief of the demo programs 

These demo programs are developed for demonstrating how to use the 

CANopen master library to apply the general CANopen communication 
protocol. These demo programs provide the SDO, PDO, NMT, SYNC 
communication applications. Each demo program includes some functions of 
the CANopen master library. The relationship between CANopen master 
library functions and demo programs are displayed in the following description. 

 

Summary of Contents for PISO-CPM100U-D

Page 1: ...bility for damages consequent to the use of this product ICP DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and...

Page 2: ...river Step by Step 20 4 CPM100 Function Library 24 4 1 Function List 24 4 2 Function Return Code 27 4 3 CANopen Master Library Application Flowchart 29 4 4 Communication Services Introduction 31 4 5 F...

Page 3: ...e 64 4 5 31 CPM100_PDORemote_Fast 65 4 5 32 CPM100_SetPDORemotePolling 66 4 5 33 CPM100_GetPDOLastData 67 4 5 34 CPM100_GetPDOLastData_Fast 68 4 5 35 CPM100_GetMultiPDOData 69 4 5 36 CPM100_GetMultiPD...

Page 4: ...sterReadSDOEvent 103 4 5 69 CPM100_GetMasterWriteSDOEvent 104 4 5 70 CPM100_ResponseMasterSDO 105 4 5 71 CPM100_InstallReadSDOISR 106 4 5 72 CPM100_RemoveReadSDOISR 107 4 5 73 CPM100_InstallWriteSDOIS...

Page 5: ...PISO CPM100 U PCM CPM100 user manual ver 2 02 Dec 03 2012 5 5 1 9 SYNC_Protocol 126 5 1 10 PDO_MultiData 127 6 Update Firmware 128...

Page 6: ...sed on the CAN bus and it is applied in a low level network that provides the connections between simple industrial devices sensors actuators and higher level devices controllers as shown in the Figur...

Page 7: ...and application profiles The main CANopen protocol and products are generally applied in the low volume and mid volume embedded systems The following examples show some parts of the CANopen applicati...

Page 8: ...lly Therefore it is helpful to reduce the complexity of developing a CANopen master interface and let users ignore the detail CANopen protocol technology This library mainly supports connection sets o...

Page 9: ...Support Emergency EMCY messages SDO Manager Expedited segmented and block methods for SDO download and upload PDO Manager Support all transmission types and event timer SYNC Manager SYNC message produ...

Page 10: ...2 specification Isolation voltage 2500 Vrms photo isolation protection on CAN side Power requirements 5 V 400 mA Operating Temperature 0 60 Storage Temperature 20 80 Humidity 0 90 non condensing Dime...

Page 11: ...ual ver 2 02 Dec 03 2012 11 Provide Listen Mode to listen the slave status of the CANopen network Block function and non block function selected Demos and utility are provided Library provides VC C Ne...

Page 12: ...ardware Configuration This section would describe the hardware setting of the PISO CPM100 U and PCM CPM100 This information includes the wire connection and terminal resistance configuration for the C...

Page 13: ...PISO CPM100 U PCM CPM100 user manual ver 2 02 Dec 03 2012 13 Figure 2 2 PISO CPM100U board layout Figure 2 3 PCM CPM100 board layout...

Page 14: ...om the utility PISO CPM100 JP1 Enable Disable PISO CPM100U JP4 Enable Disable PCM CPM100 JP6 Enable Disable The 120 terminal resistance of the CAN bus PISO CPM100 JP3 Enable Disable PISO CPM100U SW2 P...

Page 15: ...ignment is specified as follows 2 1 1 5 pin screw terminal connector The 5 pin screw terminal connector of the CAN bus interface is shown in figure 2 2 The details for the pin assignment are presented...

Page 16: ...and the corresponding pin assignments are given in following table Figure 2 3 9 pin D sub male connector Pin No Signal Description 1 N A No use 2 CAN_L CAN_L bus line dominant low 3 N A No use 4 N A...

Page 17: ...es of the CAN bus before they install a new CAN network Figure 2 4 CANopen network topology Moreover to minimize the voltage drop over long distances the terminal resistance should be higher than the...

Page 18: ...on except buffer status 2 4 Hardware Installation When users want to use CPM100 the hardware installation needs to be finished as following steps 1 Shutdown your personal computer 2 Configure the DIP...

Page 19: ...ented in the following figure The users CANopen master application programs can be developed by the following program development tools VC VB net and C The driver architecture is shown in the followin...

Page 20: ...connection and CANopen master program architectures It is very helpful for users to understand how to use these functions and develop their CANopen master application If users do not want to develop...

Page 21: ...O CPM100 U PCM CPM100 user manual ver 2 02 Dec 03 2012 21 Step 4 Select the folder where the CPM100 setup would be installed and click Next button to continue Step 5 Click the button Install to contin...

Page 22: ...2 02 Dec 03 2012 22 Step 6 Wait for finishing the CPM100 installation Step 7 Finally restart the computer to complete the installation Step 8 When finishing the installation The CPM100 folder would b...

Page 23: ...PISO CPM100 U PCM CPM100 user manual ver 2 02 Dec 03 2012 23 Remove the CPM100 driver If the CPM100 driver is not used any more users can click the Uninstall to remove the CPM100 driver below...

Page 24: ...eout Set the max timeout value of all functions O CPM100_InitMaster Activate the CPM100 module O CPM100_ShutdownMaster Remove all nodes and stop the master X CPM100_MasterSendBootupMsg Let CPM100 sent...

Page 25: ...Get the several input or output PDO data once in fast mode O CPM100_GetRxPDOID Get all COB ID of the RxPDO of the specific slave O CPM100_GetTxPDOID Get all COB ID of the TxPDO of the specific slave X...

Page 26: ...artbeat event process O CPM100_RemoveNMTErrISR Remove the Guarding Heartbeat event process O CPM100_GetMasterReadSDOEvent Get the read SDO message sent to the CPM100 O CPM100_GetMasterWriteSDOEvent Ge...

Page 27: ...n 14 CPM_CmdReceErr CPM100 receive command of wrong length 15 CPM_DataEmpty There is no data to receive 16 CPM_MemAllocErr CPM100 has not enough memory 17 CPM_SendCycMsgErr Cyclic message send error 1...

Page 28: ...ut Message response timeout 36 CPM_DataLenErr Data length setting error 40 CPM_Wait Command is uncompleted only for non block mode 41 CPM_Processing Command is running only for non block mode 50 CPM_L...

Page 29: ...M100_InitMaster must be called first The functions is used to initialize CPM100 and configure the CAN port After initializing the CAN interface successfully users need to use the function CPM100_AddNo...

Page 30: ...PISO CPM100 U PCM CPM100 user manual ver 2 02 Dec 03 2012 30 Figure 4 1 Main programming sequences...

Page 31: ...om the node list by the function CPM100_RemoveNode Through NMT services the NMT Master controls the state of the slaves Table 4 3 is the command value and corresponding NMT command for the input param...

Page 32: ...ng 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 chann...

Page 33: ...f the timer parameter is set to 0 the SYNC object transmission will be stopped When the times parameter is set to non zero value the function will send the SYNC message until the timer is set to 0 or...

Page 34: ...Dec 03 2012 34 4 5 Function Description 4 5 1 CPM100_GetVersion Description This function is used to obtain the version information of the CPM100 lib library Syntax WORD CPM100_GetVersion void Paramet...

Page 35: ...r manual ver 2 02 Dec 03 2012 35 4 5 2 CPM100_TotalBoard Description Obtain the total board number of CPM100 plugged in the PCI bus Syntax WORD CPM100_TotalBoard void Parameter None Return Return the...

Page 36: ...No of CPM100 Syntax WORD CPM100_GetBoardSwitchNo BYTE BoardCntNo BYTE BoardNo Parameter BoardCntNo input The number of specified CPM100 For example if the first CPM100 is applied this value is 0 If t...

Page 37: ...arameter BoardNo input Switch No of CPM100 DIP The value is from 0 to 15 dwVID output The address of a variable which is used to receive the vendor ID dwDID output The address of a variable used to re...

Page 38: ...ess of a variable is applied to get the status value of CAN controller The bit interpretation of the bStatus parameter is as below Bit Name Value Status 1 Bus off Bit 7 Bus Status 0 Bus on 1 Error Bit...

Page 39: ...never gets the feedback from the CPM100 until timeout value goes by the error code CPM_Timeout will be returned Through this function the user can adjust the suitable maximum timeout value of all func...

Page 40: ...it If the parameter is 1 127 different from other slave other master can do some control to it through some ISR function BaudRate input The baudrate of the CPM100 Value Baud rate 0 10Kbps 1 20Kbps 2...

Page 41: ...ption The function CPM100_ShutdownMaster removes all the slaves that had added to master and stop all the functions of the CPM100 The function must be called before exit the users application programs...

Page 42: ..._MasterSendBootupMsg BYTE BoardNo BYTE BlockMode Parameter BoardNo input CPM100 board number 0 7 BlockMode input 0 means this function is non block function and 1 means this function is block function...

Page 43: ...0_SetMasterMode BYTE BoardNo BYTE Mode BYTE BlockMode Parameter BoardNo input CPM100 board number 0 7 Mode input 1 is listen mode and others are normal mode default mode BlockMode input 0 means this f...

Page 44: ...7 Mode output 0 is normal mode default mode and 1 is listen mode 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...

Page 45: ...d number 0 7 Fir_Ver output CPM100 firmware version information 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 r...

Page 46: ...t may overrun the buffer of the slave Too large value of this parameter reduces the performance of the CPM100 The unit of the parameter is ms This parameter will be applied to the specified slave afte...

Page 47: ...only and will not send any message to check if the slave is existent or not Besides the manual mode doesn t install the SYNC ID EMCY ID and any PDO object into the firmware of the CPM100 Users must ca...

Page 48: ...timeout if there is a feedback The unit of this parameter is millisecond BlockMode input 0 means this function is non block function and 1 means this function is block function If set this parameter...

Page 49: ...BlockMode Parameter BoardNo input CPM100 board number 0 7 Node input Slave device Node ID 1 127 BlockMode input 0 means this function is non block function and 1 means this function is block function...

Page 50: ...BoardNo BYTE Node BYTE BlockMode Parameter BoardNo input CPM100 board number 0 7 Node input Slave device Node ID 1 127 BlockMode input 0 means this function is non block function and 1 means this func...

Page 51: ...27 DelayTime input The parameter is the same as DelayTime of the function CPM100_AddNode ResTimeout input The parameter is the same as ResTimeout of the function CPM100_AddNode BlockMode input 0 means...

Page 52: ...it is 0 means that the node ID doesn t exist and 1 means the node ID is on the CANopen network For example if the NodeList 0 is 0x16 0001 0110 it means that the nodes with ID 1 2 and 4 exist and the n...

Page 53: ...eList 0 is 0x16 0001 0110 it means that the nodes with ID 1 2 and 4 have been added into node list and the nodes with ID 0 3 5 6 and 7 don t If the NodeList 1 is 0x41 0100 0001 it means that the nodes...

Page 54: ...ave device Node ID 1 127 Set this parameter to 0 to indicate all slave devices State input NMT command specifier 1 start 2 stop 128 enter PRE OPERATIONAL 129 Reset_Node 130 Reset_Communication BlockMo...

Page 55: ...tate output The NMT state of the slave 4 STOPPED 5 OPERATIONAL 127 PRE OPERATIONAL BlockMode input 0 means this function is non block function and 1 means this function is block function If set this p...

Page 56: ...gered to send the EMCY message It is recommended that LifeTime value is set to more than 1 Take a note that following the CANopen specification it is not allowed for one slave device to use both error...

Page 57: ...the ProduceTime value Take a note that following the CANopen specification it is not allowed for one slave device to use both error control mechanisms Guarding Protocol and Heartbeat Protocol at the...

Page 58: ...No input CPM100 board number 0 7 Node input Slave device Node ID 1 127 Index input Object index of object dictionary of slave devices SubIndex input Object subindex of object dictionary of slave devic...

Page 59: ...he file Syntax WORD CPM100_SDOReadFile BYTE BoardNo BYTE Node WORD Index BYTE SubIndex DWORD Start DWORD Len DWORD RLen BYTE RData Parameter BoardNo input CPM100 board number 0 7 Node input Slave devi...

Page 60: ...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 o...

Page 61: ...rd number 0 7 Node input Slave device Node ID 1 127 Index input The object index value of the object dictionary SubIndex input The object subindex value of the object dictionary AData input Abort data...

Page 62: ...with the data from the specified start position and send the data to the specified slave via PDO protocol at the same time Syntax WORD CPM100_PDOWrite BYTE BoardNo WORD Cobid BYTE Offset BYTE DLlen BY...

Page 63: ...ut twice as faster than CPM100_PDOWrite at high speed baud rate greater than or equal to 250kbps Syntax WORD CPM100_PDOWrite_Fast BYTE BoardNo WORD Cobid BYTE Offset BYTE DLlen BYTE TData Parameter Bo...

Page 64: ...DO object DLen output The data length of the RTR PDO message TData output The PDO message received from the slave device BlockMode input 0 means this function is non block function and 1 means this fu...

Page 65: ...ote_Fast only to send a RTR remote transmit request PDO message to the slave device but not wait for the response message Note This function usually is used with CPM100_GetPDOLastData Syntax WORD CPM1...

Page 66: ...ly Syntax WORD CPM100_SetPDORemotePoling BYTE BoardNo BYTE PDOCnt WORD Cobid BYTE BlockMode Parameter BoardNo input CPM100 board number 0 7 PDOCnt input The number of the Cobid array Cobid input COB I...

Page 67: ...ID used by the PDO object IsNew output Check the data if had been read before 0 is been read before and 1 is new one DLen output The data length of the PDO message RData output The PDO message gets f...

Page 68: ...is better than CPM100_GetPDOLastData but CPM100_GetPDOLastData_Fast can t check the getting data is new or not Syntax WORD CPM100_GetPDOLastData_Fast BYTE BoardNo WORD Cobid BYTE DLen BYTE RData Param...

Page 69: ...PDO number that want to get Cobid input Maximum 50 COB ID used by the PDO objects IsNew output Check these PDO data if they have been read before 0 is to be read before and 1 is new one DLen output Th...

Page 70: ...M100_GetMuliPDOData_Fast can t check the getting data is new or not Syntax WORD CPM100_GetMuliPDOData_Fast BYTE BoardNo BYTE PDOCnt WORD Cobid BYTE DLen BYTE RData Parameter BoardNo input CPM100 board...

Page 71: ...ode input Slave device Node ID 1 127 PDO_Cnt output The number of installed RxPDO ID_List output The RxPDO COB ID list BlockMode input 0 means this function is non block function and 1 means this func...

Page 72: ...ode input Slave device Node ID 1 127 PDO_Cnt output The number of installed TxPDO ID_List output The TxPDO COB ID list BlockMode input 0 means this function is non block function and 1 means this func...

Page 73: ...ntax 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...

Page 74: ...ed 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 0x6411031...

Page 75: ...put COB ID used by the PDO object Entry input PDO mapping object subindex value 0 8 If this value is set to 0 the specified PDO object will be removed If others 1 8 the specified subindex content of t...

Page 76: ...ld_Cobid input Old COB ID used by the PDO object New_Cobid input New COB ID used by the PDO object BlockMode input 0 means this function is non block function and 1 means this function is block functi...

Page 77: ...t Transmission type Event_Timer output PDO event timer Entry_Cnt output Useful PDO entry number of the PDO object Map_Data output Double Word array parameter Response the mapping data of the PDO objec...

Page 78: ...ul when the CPM100 is running in listen mode User can use the function CPM100_RemovePDO_List to remove the PDO object which is installed by CPM100_InstallPDO_List Syntax WORD CPM100_InstallPDO_List BY...

Page 79: ...8 bit data of index 0x6200 and subindex 0x01 object 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 proce...

Page 80: ...nput COB ID used by the PDO object Entry input PDO mapping object subindex value 0 8 If this parameter is set to 0 the specified PDO object will be removed If others 1 8 the specified subindex content...

Page 81: ...Mode Parameter BoardNo input CPM100 board number 0 7 Cobid input COB ID used by the PDO object Entry input Useful entry number of PDO mapping object BlockMode input 0 means this function is non block...

Page 82: ...n of transmission type transmission type PDO transmission cyclic acyclic synchronous asynchronous RTR only 0 X X 1 240 X X 241 251 reserved 252 X X 253 X X 254 X 255 X BlockMode input 0 means this fun...

Page 83: ...kMode Parameter BoardNo input CPM100 board number 0 7 Cobid input COB ID used by the PDO object Timer input Event timer of TxPDO The unit is millisecond BlockMode input 0 means this function is non bl...

Page 84: ...ber 0 7 Cobid input COB ID used by the PDO object Time input Inhibit time of TxPDO BlockMode input 0 means this function is non block function and 1 means this function is block function If set this p...

Page 85: ...Slave device Node ID 1 127 Cobid input COB ID used by the SYNC object BlockMode input 0 means this function is non block function and 1 means this function is block function If set this parameter to...

Page 86: ...List The users need to confirm that by themselves Syntax WORD CPM100_SetSYNC_List BYTE BoardNo BYTE Node WORD Cobid BYTE BlockMode Parameter BoardNo input CPM100 board number 0 7 Node input Slave devi...

Page 87: ...ode ID 1 127 Cobid output Return the COB ID used by the SYNC object BlockMode input 0 means this function is non block function and 1 means this function is block function If set this parameter to 1 t...

Page 88: ...RD Cobid WORD Timer DWORD Times BYTE BlockMode Parameter BoardNo input CPM100 board number 0 7 Cobid input COB ID used by the SYNC object Timer input SYNC message transmission period If the timer is 0...

Page 89: ...ray Return most 5 SYNC ID Timer input 5 WORD array Each value is the cyclic period of the SYNC message Times input 5 Double WORD array Each one is the SYNC message sending times that set before BlockM...

Page 90: ...input Slave device Node ID 1 127 Cobid input COB ID used by the EMCY object BlockMode input 0 means this function is non block function and 1 means this function is block function If set this paramete...

Page 91: ...n CPM100_SetEMCY_List Syntax WORD CPM100_SetEMCY_List BYTE BoardNo BYTE Node WORD Cobid BYTE BlockMode Parameter BoardNo input CPM100 board number 0 7 Node input Slave device Node ID 1 127 Cobid input...

Page 92: ...ode ID 1 127 Cobid output Return the COB ID used by the EMCY object BlockMode input 0 means this function is non block function and 1 means this function is block function If set this parameter to 1 t...

Page 93: ...1 127 IsNew output Check the data if had been read before 0 is been read before and 1 is new one RData output 8 byte EMCY message gets from the EMCY buffer BlockMode input 0 means this function is non...

Page 94: ...number of the CPM100 which receives the boot up message The parameter Node is the ID of the slave node which produces the boot up message The CPM100_GetBootUpNodeAfterAdd function is usually applied...

Page 95: ...e CPM100 which receives the EMCY message The parameter Node is the ID of the slave node which produces the EMCY The parameters RData is the 8 bytes EMCY message data The function CPM100_GetEMCYData is...

Page 96: ...he heartbeat protocol or guarding protocol The parameter NMTErr is the NMTErr event mode If the NMTErr event is Node_Guarding_Event the NMTErr parameter is CPM_Node_Guarding_Event or else the CPM_ Hea...

Page 97: ...If the boot up message of a slave which has been added to the CPM100 is happen the CPM100 will go into the boot up process to do some specified mechanism which follows the user s boot up process Synt...

Page 98: ...ec 03 2012 98 4 5 63 CPM100_RemoveBootUpISR Description When the user doesn t need the boot up IST function call this function to remove the user s IST Syntax WORD CPM100_RemoveBootUpISR BYTE BoardNo...

Page 99: ...will go to the EMCY IST If the EMCY of a slave is happen the CPM100 will go into the EMCY process to do some security mechanism which follows the user s EMCY process Syntax WORD CPM100_InstallEMCYISR...

Page 100: ...2 Dec 03 2012 100 4 5 65 CPM100_RemoveEMCYISR Description When the user doesn t need the EMCY IST function call this function to remove the user s IST Syntax WORD CPM100_RemoveEMCYISR BYTE BoardNo Par...

Page 101: ...0_NMTGuarding to enable the guarding protocol or had used the CPM100_Heartbeat to enable the heartbeat protocol the CPM100 will go into the NMTErr IST to do the user s NMTErr process while the guardin...

Page 102: ...ec 03 2012 102 4 5 67 CPM100_RemoveNMTErrISR Description When the user doesn t need the NMTErr IST function call this function to remove the user s IST Syntax WORD CPM100_RemoveNMTErrISR BYTE BoardNo...

Page 103: ...arameter BoardNo indicates the number of the CPM100 which receives the read SDO message The parameters Index and SubIndex are the object indicator The function CPM100_GetMasterReadSDOEvent is usually...

Page 104: ...ubIndex are the object indicator The parameter WLen is the data length of the parameter WData The function CPM100_GetMasterWriteSDOEvent is usually applied with the function CPM100_InstallWriteSDOISR...

Page 105: ...he 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...

Page 106: ...with node ID 2 If someone sends an SDO message with the COB ID 0x602 for reading the object of the CPM100 the CPM100 will go into the IST if the user has installed it Note The function is valid while...

Page 107: ...c 03 2012 107 4 5 72 CPM100_RemoveReadSDOISR Description When the user doesn t need the ReadSDO IST function call this function to remove the user IST Syntax WORD CPM100_RemoveReadSDOISR BYTE BoardNo...

Page 108: ...ed with node ID 2 If someone sends an SDO message with the COB ID 0x602 to the CPM100 for writing an object the CPM100 will go into the IST if the user has installed it Note The function is valid whil...

Page 109: ...03 2012 109 4 5 74 CPM100_RemoveWriteSDOISR Description When the user doesn t need the WriteSDO IST function call this function to remove the user IST Syntax WORD CPM100_RemoveWriteSDOISR BYTE BoardN...

Page 110: ...ePDOEvent to get this PDO message The parameter BoardNo indicates the number of the CPM100 which receives the Remote PDO message The parameter Cobid is the PDO COB ID sent to the CPM100 This function...

Page 111: ...receives the RxPDO message The parameter Cobid is the RxPDO COB ID ID The two parameters WLen and WData are the data length and contents of the RxPDO message This function is usually applied with the...

Page 112: ...it When users implement the function CPM100_ResponseMasterPDO the CPM100 will send a TxPDO message to the CANopen network This function is usually used with the CPM100_InstallRemotePDOISR function Abo...

Page 113: ...stall a PDO object with the COB ID 0x333 of the CPM100 If some one sends a PDO message with the COB ID 0x333 to the CPM100 the CPM100 will go into the IST if the user had installed it Note The functio...

Page 114: ...Dec 03 2012 114 4 5 79 CPM100_RemoveRxPDOISR Description When the user doesn t need the RxPDO IST function call this function to remove the user IST Syntax WORD CPM100_RemoveRxPDOISR BYTE BoardNo Par...

Page 115: ...TxPDO object with the COB ID 0x444 of the CPM100 If some one sends a Remote PDO message with the COB ID 0x444 to the CPM100 the CPM100 will go into the IST if the user had installed it Note The funct...

Page 116: ...3 2012 116 4 5 81 CPM100_RemoveRemotePDOISR Description When the user doesn t need the RemotePDO IST function call this function to remove the user IST Syntax WORD CPM100_RemoveRemotePDOISR BYTE Board...

Page 117: ...on the web site The path of CAN CD fieldbus_cd canopen master piso cpm100 The address of the web site is http www icpdas com products Remote_IO can_bus piso cpm100 htm 5 1 Brief of the demo programs...

Page 118: ...sten NMT state 4 TxPDO messages with the COB ID 0x180 Node ID 0x280 Node ID 0x380 Node ID and 0x480 Node ID 4 RxPDO messages with the COB ID 0x200 Node ID 0x300 Node ID 0x400 Node ID and 0x500 Node ID...

Page 119: ...a specific slave node but also how to protect the slave through the Guarding and Heartbeat functions Applied function list CPM100_InitMaster CPM100_Shutdown CPM100_AddNode CPM100_RemoveNode CPM100_NMT...

Page 120: ...type PDO ID event timer dynamic PDO and so forth This demo will demonstrate how to change settings of these PDO parameters and show the configuration result Applied function list CPM100_InitMaster CPM...

Page 121: ...protocol to control the I O of the specific slave device in the CANopen network This demo shows how to read and write data to the slave device with the PDO functions Applied function list CPM100_InitM...

Page 122: ...ant to know which slave nodes exist on the CANopen network or which slave nodes are under the control of the CPM100 this demo will is useful Applied function list CPM100_InitMaster CPM100_Shutdown CPM...

Page 123: ...hen the CPM100 the I 8053W DI module and the I 8057W DO module are plugged in the same MCU If the user has an application like this this demo may be a good reference Applied function list CPM100_InitM...

Page 124: ...n functions used to read write CANopen object dictionary You can read any object data of the object dictionary through the object address index and sub index by SDO protocol This demo is a good model...

Page 125: ...ons used to read write CANopen object dictionary You can write any data to the specific object of the object dictionary through the object address index and sub index by SDO protocol This demo is a go...

Page 126: ...he PDO communication It is always used with the transmission type of the PDO communication In this demo users can know how to use the SYNC related functions Applied function list CPM100_InitMaster CPM...

Page 127: ...PDO data one by one So users can set event timer or remote list for these PDO When the PDO data are polled by the CPM100 or are replied from slave automatically then use the CPM100_GetMultiPDOData fu...

Page 128: ...ess of the web site http ftp icpdas com pub cd fieldbus_cd can pci piso cm100u tools 2000_xp The following steps describe the method about how to update the CPM100 firmware by CANUtility tool After ex...

Page 129: ...PISO CPM100 U PCM CPM100 user manual ver 2 02 Dec 03 2012 129 When finishing the download procedure the Download OK dialog is popped up Click OK button to continue...

Reviews: