logo资料库

Cia DS301_V4.02.pdf

第1页 / 共135页
第2页 / 共135页
第3页 / 共135页
第4页 / 共135页
第5页 / 共135页
第6页 / 共135页
第7页 / 共135页
第8页 / 共135页
资料共135页,剩余部分请下载后查看
CONTENTS
1 TABLES
2 FIGURES
3 SCOPE
4 REFERENCES
4.1 Normative references
4.2 Informative references
5 DEFINITIONS AND ABBREVIATIONS
5.1 Abbreviations
6 MODELING
6.1 Reference Model
6.2 Device Model
6.2.1 General
6.2.2 The Object Dictionary
6.3 Communication Model
6.3.1 Master/Slave relationship
6.3.2 Client/Server relationship
6.3.3 Producer/Consumer relationship - Pull/Push model
7 PHYSICAL LAYER
7.1 Transceiver
7.2 Bit rates and timing
8 DATA LINK LAYER
8.1 CAN Frame Type
9 APPLICATION LAYER
9.1 Data Types and Encoding Rules
9.1.1 General Description of Data Types and Encoding Rules
9.1.2 Data Type Definitions
9.1.3 Bit Sequences
9.1.3.1 Definition of Bit Sequences
9.1.3.2 Transfer Syntax for Bit Sequences
9.1.4 Basic Data Types
9.1.4.1 NIL
9.1.4.2 Boolean
9.1.4.3 Void
9.1.4.4 Unsigned Integer
9.1.4.5 Signed Integer
9.1.4.6 Floating-Point Numbers
9.1.5 Compound Data Types
9.1.6 Extended Data Types
9.1.6.1 Octet String
9.1.6.2 Visible String
9.1.6.3 Unicode String
9.1.6.4 Time of Day
9.1.6.5 Time Difference
9.1.6.6 Domain
9.2 Communication Objects
9.2.1 Process Data Object (PDO)
9.2.1.1 Transmission Modes
9.2.1.2 Triggering Modes
9.2.1.3 PDO Services
9.2.1.3.1 Write PDO
9.2.1.3.2 Read PDO
9.2.1.4 PDO Protocol
9.2.1.4.1 Write PDO Protocol
9.2.1.4.2 Read PDO Protocol
9.2.2 Service Data Object (SDO)
9.2.2.1 SDO Services
9.2.2.1.1 SDO Download
9.2.2.1.2 Initiate SDO Download
9.2.2.1.3 Download SDO Segment
9.2.2.1.4 SDO Upload
9.2.2.1.5 Initiate SDO Upload
9.2.2.1.6 Upload SDO Segment
9.2.2.1.7 Abort SDO Transfer
9.2.2.1.8 SDO Block Download
9.2.2.1.9 Initiate SDO Block Download
9.2.2.1.10 Download SDO Block
9.2.2.1.11 End SDO Block Download
9.2.2.1.12 SDO Block Upload
9.2.2.1.13 Initiate SDO Block Upload
9.2.2.1.14 Upload SDO Block
9.2.2.1.15 End SDO Block Upload
9.2.2.2 SDO Protocols
9.2.2.2.1 Download SDO Protocol
9.2.2.2.2 Initiate SDO Download Protocol
9.2.2.2.3 Download SDO Segment Protocol
9.2.2.2.4 Upload SDO Protocol
9.2.2.2.5 Initiate SDO Upload Protocol
9.2.2.2.6 Upload SDO Segment Protocol
9.2.2.2.7 Abort SDO Transfer Protocol
9.2.2.2.8 SDO Block Download Protocol
9.2.2.2.9 Initiate SDO Block Download Protocol
9.2.2.2.10 Download SDO Block Segment Protocol
9.2.2.2.11 End SDO Block Download Protocol
9.2.2.2.12 Upload SDO Block Protocol
9.2.2.2.13 Initiate SDO Block Upload Protocol
9.2.2.2.14 Upload SDO Block Segment Protocol
9.2.2.2.15 End SDO Block Upload Protocol
9.2.2.2.16 CRC calculation algorithm to verify SDO Block Transfer
9.2.3 Synchronisation Object (SYNC)
9.2.3.1 SYNC Services
9.2.3.2 SYNC Protocol
9.2.4 Time Stamp Object (TIME)
9.2.4.1 TIME Services
9.2.4.2 TIME Protocol
9.2.5 Emergency Object (EMCY)
9.2.5.1 Emergency Object Usage
9.2.5.2 Emergency Object Data
9.2.5.3 Emergency Object Services
9.2.5.4 Emergency Object Protocol
9.2.6 Network Management Objects
9.2.6.1 NMT Services
9.2.6.1.1 Module Control Services
9.2.6.1.2 Error Control Services
9.2.6.1.3 Bootup Service
9.2.6.2 NMT Protocols
9.2.6.2.1 Module Control Protocols
9.2.6.2.2 Error Control Protocols
9.2.6.2.3 Bootup Protocol
9.3 Synchronisation of the SYNC Consumer
9.3.1 Transmission of Synchronous PDO Messages
9.3.2 Optional High Resolution Synchronisation Protocol
9.4 Network Initialisation and System Boot-Up
9.4.1 Initialisation Procedure
9.4.2 NMT State Machine
9.4.2.1 Overview
9.4.2.2 States
9.4.2.2.1 Initialisation
9.4.2.2.2 Pre-Operational
9.4.2.2.3 Operational
9.4.2.2.4 Stopped
9.4.2.3 States and Communication Object Relation
9.4.2.4 State Transitions
9.4.3 Pre-Defined Connection Se
9.5 Object Dictionary
9.5.1 General Structure of the Object Dictionary
9.5.2 Dictionary Components
9.5.3 Data Type Entry Specification
9.5.3.1 Organisation of structured Object Dictionary Entries
9.5.4 Specification of Predefined Complex Data Types
9.5.4.1 PDO Communication Paramter Record Specification
9.5.4.2 PDO Mapping Parameter Record Specification
9.5.4.3
9.5.4.4 SDO Parameter Record Specification
9.5.4.5 Identity Record Specification
9.6 Communication Profile Specification
9.6.1 Detailed Object Specification
9.6.2 Overview Object Dictionary Entries for Communication
9.6.3 Detailed Specification of Communication Profile specific Objects
Object 1000h: Device Type
Object 1001h: Error Register
Object 1002h: Manufacturer Status Register
Object 1003h: Pre-defined Error Field
Object 1005h: COB-ID SYNC message
Object 1006h: Communication Cycle Period
Object 1007h: Synchronous Window Length
Object 1008h: Manufacturer Device Name
Object 1009h: Manufacturer Hardware Version
Object 100Ah: Manufacturer Software Version
Object 100Ch: Guard Time
Object 100Dh: Life Time Factor
Object 1010h: Store parameters
Object 1011h: Restore default parameters
Object 1012h: COB-ID Time Stamp Object
Object 1013h: High Resolution Time Stamp
Object 1014h: COB-ID Emergency Object
Object 1015h: Inhibit Time EMCY
Object 1016h: Consumer Heartbeat Time
Object 1017h: Producer Heartbeat Time
Object 1018h: Identity Object
Object 1200h - 127Fh: Server SDO Parameter
Object 1280h - 12FFh: Client SDO Parameter
Object 1400h - 15FFh: Receive PDO Communication Parameter
Object 1600h - 17FFh: Receive PDO Mapping Parameter
Object 1800h - 19FFh: Transmit PDO Communication Parameter
Object 1A00h - 1BFFh: Transmit PDO Mapping Parameter
10 IMPLEMENTATION RECOMMENDATIONS
Invalid COB's
Time-out's
11 Annex A (normative)
Additional functionality for CANopen NMT slaves
11.1 Additional object dictionary entries
11.2 Device configuration
11.2.1 Boot-up configuration process
11.2.2 EDS storage
11.3 OS command and prompt
11.3.1 OS command
11.3.2 OS debugger interface
11.3.3 OS prompt
11.4 Multiplexed PDOs
11.4.1 MPDO Protocol
11.4.1.1 Destination Address Mode (DAM)
11.4.1.2 Source Address Mode (SAM)
11.4.2 Object dictionary entries
11.4.2.1 PDO Mapping Record
11.4.2.2 Object Dispatching List
11.4.2.3 Object Scanner List
11.4.3 Implementing MPDOs
11.4.4 Groups, security and network configuration tools
11.4.5 Indication of MPDO capability in the EDS
11.5 Additional functionality for modular CANopen devices
11.5.1 Background
11.5.2 Modular Devices
11.6 Additional communication objects
11.6.1 Emergency consumer object
11.6.2 Error behaviour object
12 Index
© CAN in Automation e. V. CANopen Application Layer and Communication Profile CiA Draft Standard 301 Version 4.02 Date: 13 February 2002
HISTORY HISTORY CANopen CiA Date Changes June 1999 Document completely revised; Summary of major changes: • Object Dictionary structure reviewed • Object services and NMT services included (former in CiA DS-201 .. CiA DS-207 specified) • Data type definitions included (former in CiA DS-201 .. CiA DS-207 specified) and extended • Boot Up Message specified • Optional Heartbeat specified • Additional Emergency error codes specified • Additional SDO abort codes specified • Timer-driven PDO transmission specified • PDO Communication parameter enhanced • PDO Mapping procedure clarified • SDO Block transfer specified • Pre-defined Identifier set extended • • • Appendix: correction of some typing errors clarification of some descriptions • Device configuration • OS command and prompt • Multiplexed PDOs • Modular CANopen devices • Error behaviour • errata sheet included • chapter '11.6.2. Error behaviour object' – wrong reference changed • default value changed from 'No' to '(device profile dependent)' for inhibit time and event timer at definition of TPDO chapter '9.4.4. Restricted COB-Ids' added • • default value changed from 'No' to 'disabled' for COB-ID Client -> Server and COB-ID Server -> Client at definition of Server SDO Parameter for Index 1201h – 127Fh • default value changed from 'No' to 'disabled' for COB-ID Client -> June 2000 February 2002 • • Server and COB-ID Server -> Client at definition of Client SDO Parameter 'All client SDOs are invalid by default (invalid bit – see …)' added 'A000h – BFFFh – Standardised Interface Profile Area' added at table 1 figure 49 changed – structure of the Initialisation state. • • annex A edited 2
CONTENTS CANopen CiA CONTENTS 1 2 3 4 5 6 TABLES............................................................................................................................... 6 FIGURES ............................................................................................................................. 8 SCOPE .............................................................................................................................. 10 REFERENCES .................................................................................................................. 11 4.1 4.2 Normative references .............................................................................................. 11 Informative references............................................................................................. 11 DEFINITIONS AND ABBREVIATIONS....................................................................... 12 5.1 Abbreviations ........................................................................................................... 12 MODELING ....................................................................................................................... 14 6.1 6.2 Reference Model ..................................................................................................... 14 Device Model .......................................................................................................... 15 6.2.1 General.............................................................................................................. 15 6.2.2 The Object Dictionary ....................................................................................... 16 6.3 Communication Model............................................................................................ 17 6.3.1 Master/Slave relationship ................................................................................. 18 6.3.2 Client/Server relationship ................................................................................. 19 6.3.3 Producer/Consumer relationship - Pull/Push model ....................................... 19 7 PHYSICAL LAYER......................................................................................................... 20 7.1 7.2 Transceiver .............................................................................................................. 20 Bit rates and timing.................................................................................................. 20 8 9 DATA LINK LAYER...................................................................................................... 22 8.1 CAN Frame Type..................................................................................................... 22 APPLICATION LAYER................................................................................................... 23 9.1 Data Types and Encoding Rules ............................................................................ 23 9.1.1 General Description of Data Types and Encoding Rules ............................... 23 9.1.2 Data Type Definitions ....................................................................................... 23 9.1.3 Bit Sequences ................................................................................................... 24 3
CONTENTS CANopen CiA 9.1.4 Basic Data Types.............................................................................................. 25 9.1.5 Compound Data Types..................................................................................... 28 9.1.6 Extended Data Types ....................................................................................... 28 9.2 Communication Objects .......................................................................................... 29 9.2.1 Process Data Object (PDO) ............................................................................. 29 9.2.2 Service Data Object (SDO) .............................................................................. 33 9.2.3 Synchronisation Object (SYNC)....................................................................... 58 9.2.4 Time Stamp Object (TIME)............................................................................... 59 9.2.5 Emergency Object (EMCY) .............................................................................. 60 9.2.6 Network Management Objects......................................................................... 63 9.3 Synchronisation of the SYNC Consumer ............................................................... 71 9.3.1 Transmission of Synchronous PDO Messages............................................... 71 9.3.2 Optional High Resolution Synchronisation Protocol........................................ 72 9.4 Network Initialisation and System Boot-Up ............................................................ 74 9.4.1 Initialisation Procedure ..................................................................................... 74 9.4.2 NMT State Machine .......................................................................................... 74 9.4.3 Pre-Defined Connection Set............................................................................. 77 9.5 Object Dictionary ..................................................................................................... 79 9.5.1 General Structure of the Object Dictionary...................................................... 79 9.5.2 Dictionary Components .................................................................................... 80 9.5.3 Data Type Entry Specification.......................................................................... 80 9.5.4 Specification of Predefined Complex Data Types........................................... 82 9.6 Communication Profile Specification ...................................................................... 84 9.6.1 Detailed Object Specification ........................................................................... 84 9.6.2 Overview Object Dictionary Entries for Communication ................................. 84 9.6.3 Detailed Specification of Communication Profile specific Objects ................. 86 10 IMPLEMENTATION RECOMMENDATIONS .............................................................. 114 11 ANNEX A (NORMATIVE)............................................................................................... 115 11.1 Additional object dictionary entries ....................................................................... 116 11.2 Device configuration .............................................................................................. 117 11.2.1 Boot-up configuration process ....................................................................... 117 4
CONTENTS CANopen CiA 11.2.2 EDS storage.................................................................................................... 118 11.3 OS command and prompt ..................................................................................... 120 11.3.1 OS command .................................................................................................. 120 11.3.2 OS debugger interface ................................................................................... 122 11.3.3 OS prompt ....................................................................................................... 124 11.4 Multiplexed PDOs .................................................................................................. 126 11.4.1 MPDO Protocol ............................................................................................... 126 11.4.2 Object dictionary entries ................................................................................. 127 11.4.3 Implementing MPDOs..................................................................................... 129 11.4.4 Groups, security and network configuration tools ......................................... 129 11.4.5 Indication of MPDO capability in the EDS ..................................................... 129 11.5 Additional functionality for modular CANopen devices ........................................ 130 11.5.1 Background ..................................................................................................... 130 11.5.2 Modular Devices ............................................................................................. 130 11.6 Additional communication objects......................................................................... 132 11.6.1 Emergency consumer object.......................................................................... 132 11.6.2 Error behaviour object .................................................................................... 133 12 INDEX .............................................................................................................................. 135 5
TABLES 1 TABLES CANopen CiA Table 1: Object Dictionary Structure ........................................................................................................... 16 Table 2: Recommended Bit Timing Settings .............................................................................................. 20 Table 3: Write PDO...................................................................................................................................... 31 Table 4: Read PDO...................................................................................................................................... 31 Table 5: SDO Download .............................................................................................................................. 35 Table 6: Initiate SDO Download .................................................................................................................. 35 Table 7: Download SDO Segment .............................................................................................................. 36 Table 8: SDO Upload................................................................................................................................... 36 Table 9: Initiate SDO Upload....................................................................................................................... 37 Table 10: Upload SDO Segment................................................................................................................. 37 Table 11: Abort SDO Transfer..................................................................................................................... 37 Table 12: SDO Block Download.................................................................................................................. 38 Table 13: Initiate SDO Block Download...................................................................................................... 38 Table 14: Download SDO Block.................................................................................................................. 39 Table 15: End SDO Block Download .......................................................................................................... 39 Table 16: SDO Block Upload....................................................................................................................... 40 Table 17: Initiate SDO Block Upload........................................................................................................... 40 Table 18: Upload SDO Block....................................................................................................................... 41 Table 19: End SDO Block Upload............................................................................................................... 41 Table 20: SDO abort codes ......................................................................................................................... 48 Table 21: Emergency Error Codes.............................................................................................................. 60 Table 22: Start Remote Node...................................................................................................................... 63 Table 23: Stop Remote Node ...................................................................................................................... 63 Table 24: Enter Pre-Operational ................................................................................................................. 63 Table 25: Reset Node .................................................................................................................................. 64 Table 26: Reset Communication ................................................................................................................. 64 Table 27: Node Guarding Event.................................................................................................................. 65 Table 28: Life Guarding Event..................................................................................................................... 65 Table 29: Heartbeat Event........................................................................................................................... 65 Table 30: Bootup Event ............................................................................................................................... 65 Table 31: Trigger for State Transition ......................................................................................................... 75 Table 32: States and Communication Objects ........................................................................................... 77 Table 33: Broadcast Objects of the Pre-defined Connection Set .............................................................. 78 Table 34: Peer-to-Peer Objects of the Pre-defined Connection Set ......................................................... 78 Table 35: Restricted COB-IDs ..................................................................................................................... 78 Table 36: Format of Object Dictionary Headings........................................................................................ 79 Table 37: Object Dictionary Object Definitions ........................................................................................... 79 Table 38: Access Attributes for Data Objects............................................................................................. 80 Table 39: Object Dictionary Data Types ..................................................................................................... 80 Table 40: complex data type example ........................................................................................................ 82 6
TABLES CANopen CiA Table 41: PDO Communication Parameter Record ................................................................................... 83 Table 42: PDO Mapping Parameter Record............................................................................................... 83 Table 43: SDO Parameter Record .............................................................................................................. 83 Table 44: Identity Record............................................................................................................................. 83 Table 45: Format of an Object Description ................................................................................................. 84 Table 46: Object Value Description Format................................................................................................ 84 Table 47: Standard Objects......................................................................................................................... 84 Table 48: Structure of the Error Register .................................................................................................... 87 Table 49: Description of SYNC COB-ID entry ............................................................................................ 89 Table 50: Structure of read access ............................................................................................................. 93 Table 51: Structure of restore read access................................................................................................. 96 Table 52: Description of TIME COB-ID entry.............................................................................................. 97 Table 53: Description of EMCY COB-ID entry............................................................................................ 99 Table 54: Description of SDO COB-ID entry ............................................................................................ 103 Table 55: Description of PDO COB-ID entry ............................................................................................ 106 Table 56: Description of transmission type............................................................................................... 106 7
FIGURES 2 FIGURES CANopen CiA Figure 1: Reference Model .......................................................................................................................... 14 Figure 2: Service Types............................................................................................................................... 15 Figure 3: Device Model................................................................................................................................ 16 Figure 4: Unconfirmed Master Slave Communication................................................................................ 18 Figure 5: Confirmed Master Slave Communication.................................................................................... 18 Figure 6: Client/Server Communication ...................................................................................................... 19 Figure 7: Push model................................................................................................................................... 19 Figure 8: Pull model ..................................................................................................................................... 19 Figure 9: Transfer Syntax for Bit Sequences.............................................................................................. 25 Figure 10: Transfer syntax for data type UNSIGNEDn .............................................................................. 26 Figure 11: Transfer syntax for data type INTEGERn ................................................................................. 26 Figure 12: Transfer syntax of data type REAL32 ....................................................................................... 27 Figure 13: Synchronous and Asynchronous Transmission........................................................................ 30 Figure 14: Write PDO Protocol.................................................................................................................... 32 Figure 15: Read PDO Protocol.................................................................................................................... 32 Figure 16: Download SDO Protocol ............................................................................................................ 42 Figure 17: Initiate SDO Download Protocol ................................................................................................ 43 Figure 18: Download SDO Segment Protocol ............................................................................................ 44 Figure 19: Upload SDO Protocol................................................................................................................. 45 Figure 20: Initiate SDO Upload Protocol..................................................................................................... 46 Figure 21: Upload SDO Segment Protocol................................................................................................. 47 Figure 22: Abort SDO Transfer Protocol..................................................................................................... 48 Figure 23: SDO Block Download Protocol.................................................................................................. 50 Figure 24: Initiate SDO Block Download Protocol...................................................................................... 51 Figure 25: Download SDO Block Segment................................................................................................. 52 Figure 26: End SDO Block Download Protocol .......................................................................................... 53 Figure 27: Upload SDO Block Protocol....................................................................................................... 54 Figure 28: Initiate SDO Block Upload Protocol........................................................................................... 55 Figure 29: Upload SDO Block Segment Protocol....................................................................................... 56 Figure 30: End SDO Block Upload Protocol ............................................................................................... 57 Figure 31: SYNC Protocol ........................................................................................................................... 58 Figure 32: TIME Protocol............................................................................................................................. 59 Figure 33: Emergency State Transition Diagram ....................................................................................... 61 Figure 34: Emergency Object Data............................................................................................................. 61 Figure 35: Emergency Object Protocol ....................................................................................................... 62 Figure 36: Start Remote Node Protocol...................................................................................................... 66 Figure 37: Stop Remote Node Protocol ...................................................................................................... 66 Figure 38: Enter Pre-Operational Protocol ................................................................................................. 67 Figure 39: Reset Node Protocol .................................................................................................................. 67 Figure 40: Reset Communication Protocol ................................................................................................. 68 8
分享到:
收藏