0% found this document useful (0 votes)
261 views21 pages

Canopen: ⌕㸠⃻⌆Ⱘ Can-Bus 催ሖण䆂

The document discusses CANopen, an open communication protocol standard used in industrial automation. It describes the protocol layers including application, communication profile, and device profile layers. It also explains key CANopen concepts such as the object dictionary, process data objects, service data objects, and network management services for device configuration and boot-up procedures.

Uploaded by

Allen Yao
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
261 views21 pages

Canopen: ⌕㸠⃻⌆Ⱘ Can-Bus 催ሖण䆂

The document discusses CANopen, an open communication protocol standard used in industrial automation. It describes the protocol layers including application, communication profile, and device profile layers. It also explains key CANopen concepts such as the object dictionary, process data objects, service data objects, and network management services for device configuration and boot-up procedures.

Uploaded by

Allen Yao
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

www.zlgmcu.

com

CANopen
CAN-bus

www.zlgmcu.com

1 2 3 CAL

..................................................................................................................................................................... 1 ............................................................................................................................................................ 2

CANopen ............................................................................................................................................................. 3 3 3 3 1 2 CANopen 3 CANopen 8 OD........................................................................................................................................ 3 ..................................................................................................................................... 4 ..................................................................................................................... 6 ......................................................................................................................... 8 ........................................................................................................................ 8 ..................................................................................................................... 9

3 4 CANopen 3 5 CANopen boot-up 3 4 5 6 CANopen

................................................................................................................................................................... 18 ................................................................................................................................................................... 19

www.zlgmcu.com

1
OSI 7 5 6 1 2 Software CAN CAN 11/29 8 CAN z z z CAN CAN ISO11898 Firmware 1 3 2 4

CAN Controller Area Network

Application layer Communication profile Device proflile CAN CAN-in-Automation(CiA) CAL : CANopen CAL CANopen CANopen

CANopen

CAN

OSI

CAN

CANopen

CiA DSP-401 Application Layer

CiA DSP-404

CiA DSP-xxx

Communication Pr ofile CiA DS-301

Data Link Layer

Chip

CAN 2.0A

ISO 11898 Physical Layer

Cable

1.1

CAN CANopen

OSI

www.zlgmcu.com

CAL
CAL CAN Application Layer CAL CAN CAN CiA CAN in Automation Philips

CAL z

CMS (CAN-based Message Specification) CMS CMS 8

CMS z

MMS (Manufacturing Message Specification)

MMS

OSI

NMT (Network ManagemenT)

NMT z DBT (DistriBuTor) CAN ID z COB-ID DBT LMT (Layer ManagemenT) LMT NMT LMT Master CAN LMT Slave Communication Object Identifier

CMS 0 1761-2031

8 NMT DBT LMT 2-1

220

COB-ID

1760

2-1

CAL COB-ID 0 1 221 441 661 881 220 440 660 880 1100 1320 1540 1760 2015 2031

COB-ID(11

CAN

NMT CMS CMS CMS CMS CMS CMS CMS CMS NMT NMT LMT

/ 0 1 2 3 4 5 6 7

1101 1321 1541 1761 2016 -

DBT

CAN2.0A 29 ID

11

ID 11

[0 2047] 29 COB-ID

[0 2031] 11

CAN2.0B COB-ID

www.zlgmcu.com

CANopen
CAL how CANopen CAL what CAL CANopen CMS

CANopen CANopen OD Object Dictionary CAL OD Object Dictionary CANopen Profibus Interbus-S CANopen

3.1

OD
OD Object Dictionary 8 0x0FFF 0x1000 data types0x9FFF 16 + 3-1

3-1

CANopen

0000 0001 0020 0040 0060 0080 00A0 1000 2000 6000 A000 001F 003F 005F 007F 009F 0FFF 1FFF 5FFF 9FFF FFFF

Not used Boolean Integer 16 8

PDOCommPar SDOParameter

Reserved

PDO

DSP-401 I/O

Read State 8 Input Lines

Reserved

CANopen

EDS Electronic Data Sheet CAN-bus CANopen communication profile CANopen device profile CANopen 5 + CANopen

www.zlgmcu.com

EDS Electronic Data Sheet DCF Device Configuration File CANopen OD CANopen 8 OD EDS

CANopen

2 CANopen
CANopen CANopen COB-ID CANopen 4 CANopen

1 z z CAN 2 z z z 8 SDO 3 z PDO z z z PDO PDO PDO PDO PDO PDO in bits 8 PDO SDO z PDO PDO PDO / PDO 2 COB-ID PDO PDO PDO 64 I/O 4 CAN ID 16 AD PDO Process Data Object 1 8 SDO CAL CMS 4 CAL ID LMT NMT LMT SDO(Service Data Object) CAN SDO NMT DBT DBT

SDO

ID

SDO

www.zlgmcu.com 3-2 8 3-2 PDO PDO (B = both needed SYNC 0 1-240 241-251 252 253 254 255 z z z z z B O B RTR B O O O O = one or both) Event B O O Reserved RTR RTR PDO PDO PDO 1

SYNC 8 240 SYNC 8

SYNC RTR Event 1

SYNC-object

240

PDO

SYNC

PDO

PDO L

16 z z 4 8 z SYNC PDO PDO 16 CAL PDO

100us PDO 1ms CMS CAN-ID PDO PDO 8 64 PDO

SYNC z CAL CMS SYNC CAL CANopen CMS COB-ID SYNC SYNC SYNC SYNC PDO

Time Stamp

www.zlgmcu.com z z NMT z Boot-UP NMT NMT 8 NMT NMT NMT NMT Node Guard Node guarding Life guarding NMT / CAL CMS Node/Life guarding

Emergency

3-1

CANopen

z z

SDO PDO CANopen SDO 8 / PDO CAN 3-1 8

CANopen 8 administrative messages

CANopen

3 CANopen 8
CANopen 8 ID 3-2 11 CAN ID 4 CANopen / 7 ID(Node-ID) CAN-ID

www.zlgmcu.com

3-2 Node-ID 8 2 CAN-ID 1 SYNC 3-3 NMT-Module-Control ID CANopen 8

ID Node-ID 1~127 0

PDO Receive 1 Time Stamp

PDO

PDO Transmit

PDO

SDO

(Node-Error-Control)ID

3-3

CAN CANopen 8 ID-bits 10-7 / COB-ID 000H 080H 100H OD 1005H 1006H 1007H 1012H 1013H

NMT Module Control SYNC TIME SSTAMP

0000 0001 0010

CANopen

COB-ID ID-bits 10-7 0001 PDO1( PDO1( PDO2( PDO2( PDO3( PDO3( PDO4( PDO4( SDO( SDO( / / ) ) ) ) ) ) ) ) ) ) 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1110 081H-0FFH 181H-1FFH 201H-27FH 281H-2FFH 301H-37FH 381H-3FFH 401H-47FH 481H-4FFH 501H-57FH 581H-5FFH 601H-67FH 701H-77FH

OD

1024H 1015H 1800H 1400H 1801H 1401H 1802H 1402H 1803H 1403H 1200H 1200H 1016H-1017H

NMT Error Control z z

PDO/SDO NMT

slave

CAN H Heartbeat Boot-up

N Node Guarding

www.zlgmcu.com

4 CANopen
ID ( 8 ID) ID ID CAL CANopen CAL set 127 ID

CMS CANopen z z z CAL 8 PDO ID CAN ID 8 8 ID CAL LMT CAL ID SDO NMT CAL DBT COB-ID 3 PDO

SDO

DBT

ID

Connect_Remote_Node CAN boot-up

PDO

5 CANopen boot-up
CANopen boot-up CAL DBT boot-up ID / / 3-3 boot-up boot-up boot-up 8 boot-up boot-up

3-3 CANopen z z 1

boot-up

3-3 b. Node Guard 1 5 NMT c. SDO d. NMT Emergency e. PDO f. Boot-up

a. NMT

Start_Remote_node (0x01) 8

www.zlgmcu.com

2 Stop_Remote_Node (0x02) 3 4 Enter_Pre-Operational_State (0x80) Reset_Node (0x81)

5 Reset_Communication (0x82) 6 NMT (COB-ID=0) ID 0 boot-up SDO NMT Stopped COB-ID 8 l Pre_Operational Boot-up NMT CAN CAN

(NMT command specifier)

6 CANopen
COB ID CANopen 8

1 NMT NMT-Master

NMT Module Control NMT Module Control NMT NMT-Master NMT-Slave(s) COB-ID 0x000 Byte 0 CS CS NMT 1 2 128 129 130 Start Remote Node Stop Remote Node Enter Pre-operational State Reset Node Reset Communication Byte 1 Node-ID / NMT

NMT Module Control

Node-ID=0

NMT

2 MNT

NMT Node Guarding M MNT

NMT-Master NMT-Master NMT-Slave COB-ID 0x700+Node_ID

NMT-Slave NMT-Master NMT-Slave COB-ID 0x700 + Node_ID bit7 0 0 6 Byte0 Bit 7 : toggle Bit6-0 : / bits0 6 9 0 1

www.zlgmcu.com

Value 0 1 2 3 4 5 127 boot-up Initialising Disconnected Connecting Preparing Stopped Operational Pre-operational 0 * * *

Heartbeat Heartbeat Producer Consumer(s) COB-ID 0x700 + Node_ID Byte 0

0 4 5 127 Heartbeat NMT-Master Heartbeat Node Guarding Heartbeat Boot-up

Boot-up Stopped Operational Pre-operational Heartbeat Heartbeat H

NMT Boot-up Boot-up NMT-Master initialising pre-operational

NMT-slave

NMT-Master NMT-Slave COB-ID 0x700 + Node_ID Byte 0 0

PDO transmit-PDO 0x1A01 : CANopen Transmit-PDO 0x1A01

0 1 2

2 0x60000208 0x64010110

2 0x6000 0x6401

PDO 0x02 0x01 8 16

CANopen I/O 0x6401 PDO ( 0x1801 0x01

CiA DSP-401 1 16

0x6000

PDO 2 ) 3

10

www.zlgmcu.com PDO-producer PDO-consumer(s) COB-ID 0x280+Node_ID 8 Byte 0 16 8 0x1A01 CANopen 8 PDO LSB little endian PDO CiA DS 301 V 4.02 ID OD 64 16 Transmit-PDOs 16 PDO Byte 1 16 8 Byte 2

CANopen Application Layer and Communication Profile MPDO(multiplexor PDO) PDO

5 SDO

SDO (client) (server) CAN CAN 8

CANopen

SDO z z SDO

2 Expedited transfer Segmented transfer 4 4

Client Server / Server Client Byte 0 SDO Command Specifier ** 4 (expedited transfer) 4 segmented transfer Byte 1-2 Byte 3 Byte 4-7 ** block transfer )

Client Server / Server Client Byte 0 SDO SDO z z z z z SDO Domain Segment Abort Domain Transfer CANopen Block transfer B 4 SDO 1 5 / Initiate Domain Upload / / / CAN toggle bit Initiate Domain Download Download Download / upload Request /response Segmented / expedited transfer 7 Byte 1-70 segmented transfer

Upload Domain Segment

Initiate Block Download End Block Download Initiate Block Upload

Download Block Segment Upload Block

11

www.zlgmcu.com

Segment D Download SDO 0

End Block Upload U Upload SDO CAN

Initiate Domain Download Bit Client Server z z z z z z n 7 e s e=0 e=0 s=0 s=1 MSB e=1 download CiA byte 4 LSB byte 7 0= 1= 0= 1= 7 0 0 6 0 1 5 1 1 4 3 n 2 1 e 0 s -

e=1

s=1

Download Domain Segment Bit Client Server z z z n c t 0= download 1= 0 request/response 7 0 0 6 0 0 5 0 1 4 t t 3 2 n 1 0 c -

Initiate Domain Upload Bit Client Server n e 7 0 0 s 6 1 1 5 0 0 4 3 n 2 1 e 0 s

Upload Domain Segment Bit Client Server n SDO c t SDO Abort Domain Transfer Bit C/S 7 1 6 0 5 0 4 3 2 1 0 7 0 0 6 1 0 5 1 0 4 t t 3 2 n 1 0 c

12

www.zlgmcu.com

0 3-4

32

3-4

SDO 16

0503 0000 0504 0000 0504 0001 0504 0002 0504 0003 0503 0004 0503 0005 0601 0000 0601 0001 0601 0002 0602 0000 0604 0041 0604 0042 0604 0043 0604 0047 0606 0000 0606 0010 0606 0012 0606 0013 0609 0011 0609 0030 0609 0031 0609 0032 0609 0036 0800 0000 0800 0020 0800 0021 0800 0022 0800 0023 ( ) PDO PDO CRC SDO Client/Server Block Transfer Block Transfer Block Transfer

Initiate Block Download Bit Client Server z z cc sc 7 1 1 6 1 0 5 0 1 4 3 2 cc sc 1 s 0 0 0

CRC CRC

0 = no 1 = yes 0 = no 1 = yes

13

www.zlgmcu.com z z z z

s s=0 s=1 4 blksize CiA

0=

LSB

MSB

0<blksize<128

Download Block Segment Bit Client Client etc Server z z z z z 1 / 2 0<blksize<128 blksize / c seqno 7 c c c 1 0 1 6 5 4 3 0 1 seqno 1 0 2 1 0

download 0 0<seqno<128 7

yes 1=no

download 0 1

End Block Download Bit Client Server z z CRC n bytes1+2 16 CRC cc sc 1 7 1 1 6 1 0 5 0 1 4 3 n 2 1 0 1 1

Initiate Block Upload Bit Client Server Client z z z z z z z 0= 7 1 1 1 6 0 1 0 5 1 0 1 4 3 2 cc sc 1 1 0 0 0 0 1

cc sc s s=0 s=1 4 5 CiA

CRC CRC 0=

no 0=no

1=yes 1=yes 1

4 blksize

LSB

MSB 0<blksize<128

pst 1=

Protocol Switch Threshold upload Upload Domain 14

SDO pst Server

Initiate Domain Upload

www.zlgmcu.com

Upload Block Segment Bit Server Server ..etc Client z z z z z 1 / 2 0<blksize<128 blksize / 7 c c c 1 1 0 6 5 4 3 0 1 seqno 1 0 2 1 0

c seqno

download 0 0<seqno<128 7

yes 1=no

download 0 1

End Block Upload Bit Server Client z z CRC 7 1 1 6 1 0 5 0 1 4 3 n 2 1 0 1 1

n bytes1+2 16 CRC cc sc 1

SDO SDO Client Server ( COB-ID 0 602 Client Server( 582 60 SDO 2 Client Server( COB-ID 0 602 Client Server( 582 4B 40 2) 01 18 03 FE 03 1 01 2 18 2) Byte 3 03 4 5 6-7 2B 2) 01 18 03 0x1801 3 1 01 2 18 0x3FE 2 #2) Byte 3 03 4 FE 5 03 6-7 ID 2 0x1801 3

(Emergency Object) 15

www.zlgmcu.com

8 sender receiver(s) COB-ID 0x080+Node_ID 16 3-5 3-5 16 Byte 0-1 Byte 2 Byte 3-7

0x1001) xx

00xx 10xx 20xx 21xx 22xx 23xx 30xx 31xx 32xx 33xx 40xx 41xx 42xx 50xx 60xx 61xx 62xx 63xx 70xx 80xx 81xx 8110 8120 8130

Error Reset Generic Error Current Current Current Current Voltage

No Error

device input side inside the device device output side

Mains voltage Voltage inside the device Output voltage Temperature Ambient temperature Device tempearture Device hardware Device software Internal software User software Data set Additional modules Monitoring communication CAN overrun Error Passive Life Guard Error Heartbeat Error

8140 82xx 8210

Recovered from Bus-Off Protocol Error PDO no processed Due to length error

8220 90xx F0xx FFxx

Length exceedd External error Additional functions Device specific

16

www.zlgmcu.com

(Error Register)

0x1001

3-6

3-6 8 Bit 0 1 2 3 4 5 6 7 Generic Current Voltage Temperature Communication Device profile specific Reserved(=0) Manufacturer specific

17

www.zlgmcu.com

4 CAN z z z z z z CANopen 3 z CANopen z z CANopen ASCII CANopen OD Object Dictionary EDS DCF

CANopen boot-up Node Guarding

CAL

CMS CAL NMT

CANopen z z z z SDO NMT Reset_Node Enter_Preoperational_State Reset_Communication Start_Remote_Node ID

Stop_Remote_Node

18

www.zlgmcu.com

5
CANopen CAN-bus CANopen CAN-bus : CAN-bus CANopen NIKHEF H. Boterenbrood CANopen CAN-bus CANopen CANopen high-level protocol for

19

You might also like