ICP PISO-CPM100U-D User manual

Category
Networking
Type
User manual

This manual is also suitable for

PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 1
PISO-CPM100-DT
PISO-CPM100U-DT
CANopen Master PCI Card
Users Manual
Warranty
All products manufactured by ICP DAS are warranted
against defective materials for a period of one year from
the date of delivery to the original purchaser.
Warning
ICP DAS assume no liability 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 reliable. However, no responsibility is
assumed by ICP DAS for its use, nor for any infringements
of patents or other rights of third parties resulting from its
use.
Copyright
Copyright 2008 by ICP DAS. All rights are reserved.
Trademark
The names used for identification only maybe registered
trademarks of their respective companies.
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 2
Tables of Content
1. General Information................................................................................5
1.1. CANopen Introduction.................................................................5
1.2. CANopen Applications ................................................................6
1.3. PISO-CPM100(U) Library Characteristics ..................................7
2. Hardware Configuration.......................................................................10
2.1. Board Layout..............................................................................10
2.1.1. 5-pin screw terminal connector....................................................12
2.1.2. 9-pin D-sub male connector.........................................................13
2.1.3. Wire Connection ..........................................................................14
2.2. Green LED ..................................................................................15
2.3. Red LED......................................................................................15
2.4. Hardware Installation.................................................................15
3. Software Installation.............................................................................16
3.1. Software Structure.....................................................................16
3.2. Installation Driver Step by Step ................................................17
4. PISO-CPM100(U) Function Library......................................................21
4.1. Function List ..............................................................................21
4.2. Function Return Code ...............................................................24
4.3. CANopen Master Library Application Flowchart.....................26
4.4. Communication Services Introduction ....................................28
4.5. Function Description.................................................................31
4.5.1. CPM100_GetVersion...................................................................31
4.5.2. CPM100_TotalBoard...................................................................32
4.5.3. CPM100_GetBoardSwitchNo......................................................33
4.5.4. CPM100_GetBoardInf.................................................................34
4.5.5. CPM100_GetCANStatus.............................................................35
4.5.6. CPM100_SetFunctionTimeout ....................................................36
4.5.7. CPM100_InitMaster ....................................................................37
4.5.8. CPM100_ShutdownMaster..........................................................38
4.5.9. CPM100_SetMasterMode............................................................39
4.5.10. CPM100_GetMasterMode...........................................................40
4.5.11. CPM100_GetFirmwareVersion....................................................41
4.5.12. CPM100_EDS_Load ...................................................................42
4.5.13. CPM100_AddNode......................................................................43
4.5.14. CPM100_RemoveNode...............................................................45
4.5.15. CPM100_ScanNode.....................................................................46
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 3
4.5.16. CPM100_GetNodeList ................................................................47
4.5.17. CPM100_NMTChangeState........................................................48
4.5.18. CPM100_NMTGetState...............................................................49
4.5.19. CPM100_NMTGuarding.............................................................50
4.5.20. CPM100_NMTHeartbeat.............................................................51
4.5.21. CPM100_SDOReadData .............................................................52
4.5.22. CPM100_SDOReadFile...............................................................53
4.5.23. CPM100_SDOWriteData.............................................................54
4.5.24. CPM100_SDOAbortTransmit .....................................................55
4.5.25. CPM100_PDOWrite....................................................................56
4.5.26. CPM100_PDORemote.................................................................57
4.5.27. CPM100_SetPDORemotePolling................................................58
4.5.28. CPM100_GetPDOLastData.........................................................59
4.5.29. CPM100_GetMultiPDOData.......................................................60
4.5.30. CPM100_GetRxPDOID ..............................................................61
4.5.31. CPM100_GetTxPDOID...............................................................62
4.5.32. CPM100_InstallPDO...................................................................63
4.5.33. CPM100_DynamicPDO ..............................................................64
4.5.34. CPM100_RemovePDO................................................................65
4.5.35. CPM100_ChangePDOID.............................................................66
4.5.36. CPM100_GetPDOMapInfo .........................................................67
4.5.37. CPM100_InstallPDO_List...........................................................68
4.5.38. CPM100_RemovePDO_List........................................................70
4.5.39. CPM100_PDOUseEntry..............................................................71
4.5.40. CPM100_PDOTxType.................................................................72
4.5.41. CPM100_PDOEventTimer..........................................................73
4.5.42. CPM100_ChangeSYNCID..........................................................74
4.5.43. CPM100_SetSYNC_List.............................................................75
4.5.44. CPM100_GetSYNCID ................................................................76
4.5.45. CPM100_SendSYNCMsg ...........................................................77
4.5.46. CPM100_GetCyclicSYNCInfo....................................................78
4.5.47. CPM100_ChangeEMCYID.........................................................79
4.5.48. CPM100_SetEMCY_List............................................................80
4.5.49. CPM100_GetEMCYID................................................................81
4.5.50. CPM100_ReadLastEMCY ..........................................................82
4.5.51. CPM100_GetEMCYData............................................................83
4.5.52. CPM100_GetNMTError..............................................................84
4.5.53. CPM100_InstallEMCYISR .........................................................85
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 4
4.5.54. CPM100_RemoveEMCYISR......................................................86
4.5.55. CPM100_InstallNMTErrISR.......................................................87
4.5.56. CPM100_RemoveNMTErrISR....................................................88
4.5.57. CPM100_GetMasterReadSDOEvent...........................................89
4.5.58. CPM100_GetMasterWriteSDOEvent..........................................90
4.5.59. CPM100_ResponseMasterSDO...................................................91
4.5.60. CPM100_InstallReadSDOISR.....................................................92
4.5.61. CPM100_RemoveReadSDOISR .................................................93
4.5.62. CPM100_InstallWriteSDOISR....................................................94
4.5.63. CPM100_RemoveWriteSDOISR.................................................95
4.5.64. CPM100_GetMasterRemotePDOEvent ......................................96
4.5.65. CPM100_GetMasterRxPDOEvent ..............................................97
4.5.66. CPM100_ResponseMasterPDO...................................................98
4.5.67. CPM100_InstallRxPDOISR........................................................99
4.5.68. CPM100_RemoveRxPDOISR...................................................100
4.5.69. CPM100_InstallRemotePDOISR ..............................................101
4.5.70. CPM100_RemoveRemotePDOISR...........................................102
5. Demo Programs..................................................................................103
5.1. Brief of the demo programs....................................................103
5.1.1. Listen_Mode..............................................................................104
5.1.2. NMT_Protocol...........................................................................105
5.1.3. PDO_Parameter .........................................................................106
5.1.4. PDO_Protocol............................................................................107
5.1.5. Scan_Node.................................................................................108
5.1.6. SDO_PDO_ISR .........................................................................109
5.1.7. SDO_Read .................................................................................110
5.1.8. SDO_Write.................................................................................111
5.1.9. SYNC_Protocol .........................................................................112
5.1.10. PDO_MultiData.........................................................................113
6. Update Firmware.................................................................................114
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 5
1. General Information
1.1. CANopen Introduction
The CAN (Controller Area Network) is a kind of serial communication
protocols, which efficiently supports distributed real-time control with a very
high level of security. It is an especially suited for networking intelligent devices
as well as sensors and actuators within a system or sub-system. In CAN
networks, there is no addressing of subscribers or stations in the conventional
sense, but instead, prioritized messages are transmitted. CANopen is one kind
of the network protocols based 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
Figure 1.1.
Figure 1.1 Example of the CANopen network
CANopen was developed as a standardized embedded network with
highly flexible configuration capabilities. It provides standardized
communication objects for real-time data (Process Data Objects, PDO),
configuration data (Service Data Objects, SDO), network management data
(NMT message, and Error Control), and special functions (Time Stamp, Sync
message, and Emergency message). Nowadays, CANopen is used for many
various application fields, such as medical equipment, off-road vehicles,
maritime electronics, public transportation, building automation and so on.
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 6
1.2. CANopen Applications
CANopen is the standardized network application layer optimized for
embedded networks. Its specifications cover the standardized application layer,
frameworks for the various applications (e.g. general I/O, motion control
system, maritime electronics and so forth) as well as device, interface, 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 application fields. (For more information,
please refer to the web site, http://www.can-cia.org):
z Truck-based superstructure control systems
z Off-highway and off-road vehicles
z Passenger and cargo trains
z Maritime electronics
z Factory automation
z Industrial machine control
z Lifts and escalators
z Building automation
z Medical equipment and devices
z Non-industrial control
z Non-industrial equipment
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 7
1.3. PISO-CPM100(U) Library Characteristics
In order to use the PCI CAN board of PISO-CPM100(U), we provide
CPM100 library for VC, VB.net and C# development, and users can use it to
establish the CANopen communication network rapidly. Most of the CANopen
communication protocols, such as PDO, SDO and NMT, would be handled by
the library automatically. 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 of
master-slave architecture, which include some useful functions to control the
CANopen slave device in the CANopen network. The following figure
describes the general application architecture of PISO-CPM100(U).
Figure 1.2 Example of application architecture
The PISO-CPM100(U) follows the CiA CANopen specification DS-301
V4.02, and supports the several CANopen features. The CANopen
communication general concept is shown as Figure 1.3.
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 8
Figure 1.3 CANopen communication general concept
Node Manager (NMT Master)
- Functions for changing the slave device state
- Node Guarding and Heartbeat Protocol for error control
- 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 production
- SYNC cycles of 0.1ms resolution
EMCY Manager
- EMCY message consumer
For more information about the CANopen functions described above,
please refer to the function descriptions and demo programs shown in the
chapter 3 and chapter 4.
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 9
Specifications
z PISO-CPM100-D/T:
¾ 33 MHz 32bit 5 V PCI bus (V2.1) plug and play technology.
z PISO-CPM100U-D/T:
¾ Universal PCI card supports both 5 V and 3.3 V PCI bus.
z CPU: 80186 compactable CPU, 80 MHz.
z CAN controller: NXP SJA1000T with 16 MHz.
z CAN transceiver: NXP 82C250.
z CAN bus interface: Follow ISO 11898-2 specification.
z Connector: 5-pin screw terminal or 9-pin D-sub male connector.
z Isolation voltage: 2500 Vrms photo-isolation protection on CAN side.
z Power requirements: 5 V@ 400 mA.
z Operating Temperature: 0 ~ +60 .
z Storage Temperature: -20 ~ +80 ℃.
z Humidity: 0 ~ 90% non-condensing.
z Dimensions: please refer to section 2.1.
Features
z One CAN communication port.
z Follow CiA DS-301 V4.02.
z Support 8 kinds baud: 10 kbps, 20 kbps, 50 kbps, 125 kbps, 250 kbps, 500
kbps, 800 kbps, and 1 Mbps.
z Support the node id range from 1 ~ 127.
z Support upload and download SDO Segment.
z Support Node Guarding protocol and Heartbeat protocol.
z Provide 5 sets of SYNC cyclic transmission.
z Support EDS file.
z Support EMCY protocol.
z Timestamp of CAN message with at least ±1ms precision.
z Jumper select 120Ω terminator resistor for CANopen network.
z Support firmware update.
z Two indication LEDs (Tx/Rx and Err LEDs).
z Provide Listen Mode to listen the slave status of the CANopen network.
z Block-function and non-block-function selected.
z Demos and utility are provided.
z Library provides VC++, C#.Net2005, and VB.Net2005 developments.
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 10
2. Hardware Configuration
This section would describe the hardware setting of the
PISO-CPM100(U). This information includes the wire connection and terminal
resistance configuration for the CAN network.
2.1. Board Layout
Figure 2.1 PISO-CPM100 board layout
Figure 2.2 PISO-CPM100U board layout
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 11
Jumper Selection
The following table shows the definition of jumpers and DIP switch. Users
need to refer to this table to configure the PISO-CPM100(U) hardware.
Jumper Description Status
JP1
(PISO-CPM100)
CAN Port 120Ωterminal
resistance
Enable Disable
JP4
(PISO-CPM100U)
CAN Port 120Ωterminal
resistance
Enable Disable
DIP switch
DIP switch is used to set the
PISO-CPM100(U) board No.
Switch1 is for bit0, switch2 is for
bit1 and so forth. For example, if
the left-hand-side switch (switch1)
is ON, the board No. is set to 1.
The range of board No. is from 0 to
15. Be careful that the board No.
for each board must be unique in
the PC.
The situation indicates
the board No. 1.
Table 2.1 Jumper or DIP switch selections
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 12
Connector Pin Assignment
The PISO-CPM100(U) has two kinds of connector. One is 5-pin screw
terminal connector (PISO-CPM100(U)-T) and the other is 9-pin D-sub male
connector (PISO-CPM100(U)-D) for wire connection of the CANopen network.
The connector’s pin assignment 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 in the following
table.
Figure 2.2 5-pin screw terminal connector
Pin No. Signal Description
1 N/A No use
2 CAN_L CAN_L bus line (dominant low)
3 CAN_SHLD Optional CAN shield
4 CAN_H CAN_H bus line (dominant high)
5 N/A No use
Table 2.2 Pin assignment of 5-pin screw terminal connector
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 13
2.1.2. 9-pin D-sub male connector
The 9-pin D-sub male connector of the CAN bus interface is shown in
figure 2.3 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 No use
5 CAN_SHLD Optional CAN Shield
6 N/A No use
7 CAN_H CAN_H bus line (dominant high)
8 N/A No use
9 N/A No use
Table 2.3 Pin assignment of the 9-pin D-sub male connector
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 14
2.1.3. Wire Connection
In order to minimize the reflection effects on the CAN bus line, the CAN
bus line has to be terminated at both ends by two terminal resistances as in the
following figure. According to the ISO 11898-2 spec, each terminal resistance
is 120Ω(or between 108Ω~132Ω). The length related resistance should have
70mΩ/m. Users should check the resistances 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 value defined in the ISO 11898-2. The
following table can be used as a good reference.
Bus Cable Parameters
Bus Length
(meter)
Length Related
Resistance
(mΩ/m)
Cross Section
(Type)
Terminal
Resistance
(Ω)
0~40 70
0.25(23AWG)~0.34
mm
2
(22AWG)
124 (0.1%)
40~300 <60
0.34(22AWG)~0.6
mm
2
(20AWG)
127 (0.1%)
300~600 <40
0.5~0.6mm
2
(20AWG)
150~300
600~1K <20
0.75~0.8mm
2
(18AWG)
150~300
Table 2.4 Relationship between cable feature and terminal resistance
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 15
2.2. Green LED
After PISO-CPM100(U) has been activated, the greed LED would be
flashed once when PISO-CPM100 receives or transmits one message to CAN
bus successfully. If the bus loading is heavy, the green LED would turn on
always.
2.3. Red LED
When some error occurs, the red LED would turn on until the error has
been solved. Users can use CPM100_GetCANStatus function to get the
situation except buffer status.
2.4. Hardware Installation
When users want to use PISO-CPM100(U), the hardware installation
needs to be finished as following steps.
1. Shutdown your personal computer.
2. Configure the DIP switch and JP1 of PISO-CPM100(U) for the
board No. and the terminal resistance. The more detail
information could be found on the section 2.1.
3. Find an empty PCI slot for the PISO-CPM100(U) on the mother
board of the personal computer. Plug the configured
PISO-CPM100(U) into this empty PCI slot.
4. Plug the CAN bus cable(s) into the 5-pin screw terminal
connector or the 9-pin D-sub connector.
When the procedure described above is completed, turn on the PC.
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 16
3. Software Installation
3.1. Software Structure
The CPM DLL driver is the CANopen specification function collections for
the PISO-CPM100(U) cards used in Windows 2000/XP/Vista/7 with 32-bit
systems. The application structure is presented 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 following Figure.
MiniOS7
O
p
eration
Windows
Operation
Kernel Mode
User Mode
PISO-CPM100(U)
Function Library
Users’ Programs
PISO-CM100(U)
Function Library
PISO-CM100(U)
Kernel Driver
PISO-CPM100(U)
Firmware
Application
PCI Bus & DPRAM
KP_CM100.sys
CPM10XXX.exe
Firmware
CM100.dll
CPM100.dll
Figure 3.1 Driver concept of PISO-CPM100(U)
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 17
3.2. Installation Driver Step by Step
When users want to use the PISO-CPM100(U) CAN card, the
PISO-CPM100(U) driver must be installed firstly. After finishing the installation
process, the CPM_Utility and the demo programs would also be installed to the
PC. The demo programs may be a good reference for users to build their
CANopen master interface by using VC++, C# and VB.net. The demo
programs also give a simple interface to show the basic functions of
master/slave 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 this
application by themselves, the CPM_Utility can be used to be an easily
CANopen master program. The following description displays the step-by-step
procedures about how to install the PISO-CPM100(U) driver.
Install the PISO-CPM100(U) CAN card driver
Step 1: Insert the product CD into the CD-ROM and find the path
\CANopen\Master\PISO-CPM100\Install\. Then execute the
PISO-CPM100.exe to install the PISO-CPM100(U) CAN card
driver.
Step 2: Wait until the install wizard has prepared.
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 18
Step 3: Click “Next” to start the PISO-CPM100(U) installation.
Step 4: Select the folder where the PISO-CPM100(U) setup would be
installed and click “Next” button to continue.
Step 5: Click the button “Install” to continue.
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 19
Step 6: Wait for finishing the PISO-CPM100(U) installation.
Step 7: Finally, restart the computer to complete the installation.
.
Step 8: When finishing the installation. The PISO-CPM100(U) folder
would be found at the Start menu shown as below.
PISO-CPM100(U) user manual (ver. 2.01) Jan/12/2011 ----------------- 20
Remove the PISO-CPM100(U) driver
If the PISO-CPM100(U) driver is not used any more, users can click
the “Uninstall” to remove the PISO-CPM100(U) driver below.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115

ICP PISO-CPM100U-D User manual

Category
Networking
Type
User manual
This manual is also suitable for

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI