当前位置:首页 >> 互联网 >>

CANOpen


LIVIC – Laboratoire de recherche sur les Intéractions Véhicule - Infrastructure - Conducteur
INRETS – Institut National de Recherche sur les Transports et leur Sécurité LCPC – Laboratoire Central des Ponts et Chaussées Ministères Recherche & Transport

CANOpen Memento
Francis Dupin, November 2005

Version 1.2

CANopen CANopen francis.dupin@inrets.fr

I have put on this document some of the tips to test a node or to configure a CANOpen network. If you do not know how works CANOpen, this document will not help you at all. Feel free to redistribute this paper ... and to report the errors and missings to francis.dupin@inrets.fr

QQ 21561401 Email dragon2001 @163.com

hex

LIVIC – 14, route de la Minière. 78000 Versailles Satory. France http://www.inrets.fr/ur/livic

1

CAN
id rtr do d1 ... d7

Id CAN 11bit rtr 0 1 dn 0-8 ---------------------------------------------------Id : the CAN identifiant of the message. Usually on 11 bits. rtr : 0 : normal message 1 : Remote Transmit Request message. Cannot contain data dn : data byte. A normal message can contain 0 to 8 bytes of data

CANOpen

CAN
d1 ... d7

cobId rtr do

CAN :

LSB 0x01020304

(ie little endian). :

cobId rtr 04

03

02

01

Fct code 4 bits Fct Code (

Node-ID 7 bits ) : EMCY PDO : SDOrx : SDOtx : NMT error control : NMT : SYNC : TIME STAMP : 0001 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010 1011 1100 1110 0000 0001 0010

-

Note :
CAN

, ?normals? . (rtr = 0)

LIVIC – 14, route de la Minière. 78000 Versailles Satory. France http://www.inrets.fr/ur/livic

2

NMT protocol
NMT 11-bit CAN Node-ID NMT

operational

D0

D1
nodeId

ID D1

4-bit D0

000

0

01

stop D0 D1
nodeId

000

0

02

pre-operational D0 D1
nodeId

000

0

80

reset-application D0 D1
nodeId

000

0

81

reset-communication D0 D1
nodeId

000

0

82

Note :

nodeId = 00

0x06

operational : pre-operational

000 01 06 : 000 80 00

LIVIC – 14, route de la Minière. 78000 Versailles Satory. France http://www.inrets.fr/ur/livic

3

Node guard protocol
master 700 + nodeID :
1

: 700 + nodeID
0

t

state

t : 0,1,0,1.... state : 0 = 1 = 2 = 3 = 4 = stopped 5 = operational 7F = pre-operational

master master 5

5

5 master CAN (rtr = 1) : 705 stopped : 705 05 NMT pre-operational : 000 80 05 CAN : 705 pre-operational : 705 FF ( toggle = 1)

Heartbeat protocol
: 700 + nodeID
0

0

state state : 0 = Boot-up 4 = stopped 5 = operational 7F = pre-operational

5 :

pre-operational t.

: 705 7F

Bootup protocol
initializing 700 + nodeID
0

pre-operational
00 0

:

Boot-up

4

SDO protocol
SDO / / / client server

Read = upload protocol Write = download protocol / 4 SDO CAN

8

SDO upload/download expedited protocol. rtr = 0.

SDO Download expedited protocol
write 0xd0d1... server client Data length = 1 byte : 2F Index Sub index d0 x x x client :

600 + Serv 0 NodeId

X : undefined. Put 0 client Data length = 2 bytes : 2B Index Sub index d1 d0 x x
600 + Serv 0 NodeId

X : undefined. Put 0 client Data length = 3 bytes : 27 Index Sub index d2 d1 d0 x
600 + Serv 0 NodeId

X : undefined. Put 0 client Data length = 4 bytes : 23 Index Sub index d3 d2 d1 d0
600 + Serv 0 NodeId

server

( 60

): Index Sub index 00 00 00 00

580 + Serv 0 NodeId

server

( 80

): Index Sub index SDO abort code error |------ 4 -----|

580 + Serv 0 NodeId

0xFD 5 605 2F 00 14 02 FD 00 00 00 5 585 60 00 14 02 00 00 00 00 4 0x60120208 605 23 03 16 01 08 02 12 60 5 585 60 03 16 01 00 00 00 00 5

0x1400

2

0x1603

1

:

LIVIC – 14, route de la Minière. 78000 Versailles Satory. France http://www.inrets.fr/ur/livic

5

SDO Upload expedited protocol

read server client

0xd0d1... client : 40 Index

:

600 + Serv 0 NodeId

Sub index

00

00

00

00

server Data length = 1 byte
580 + Serv 0 NodeId

( 4F

): Index Sub index d1 x x x

X : undefined. Should be 0 server Data length = 2 bytes ( 4B ): 47 ): 43 Index Sub index d3 d2 d1 d0 Index Sub index d2 d1 d0 x ): Index Sub index d1 d0 x x
580 + Serv 0 NodeId

X : undefined. Should be 0 server Data length = 3 bytes (
580 + Serv 0 NodeId

X : undefined. Sould be 0 server Data length = 4 bytes (
580 + Serv 0 NodeId

server

( 80

): Index Sub index SDO abort code error |------ 4 -----|

580 + Serv 0 NodeId

read 5 0x1400 605 40 00 14 02 00 00 00 00 5 : 585 4F 00 14 02 FD 00 00 00 read 5 0x1400 605 40 03 16 01 00 00 00 00 5 : 585 43 03 16 01 08 02 12 60

2

0xFD

client

1

0x60120208

client

LIVIC – 14, route de la Minière. 78000 Versailles Satory. France http://www.inrets.fr/ur/livic

6

SDO abort protocol

Abort code (hexa) 0503 0000 0504 0000 0504 0001 0504 0002 0504 0003 0504 0004 0504 0005 0601 0000 0601 0001 0601 0002 0602 0000 0604 0041 0604 0042 0604 0043 0604 0047 0606 0000 0607 0010 0607 0012 0607 0013 0609 0011 0609 0030 0609 0031 0609 0032 0609 0036 0800 0000 0800 0020 0800 0021 0800 0022 0800 0023

t SDO Client/server block

(block mode only) (block mode only) CRC (block mode only) memory Unsupported access to an object

PDO PDO PDO

Sub-index (only for write access) Value of parameter written too hight Value of parameter written too low Data cannot be transferred or stored to the application Data cannot be transferred or stored to the application because of local control Data cannot be transferred or stored to the application because ofthe present device state

LIVIC – 14, route de la Minière. 78000 Versailles Satory. France http://www.inrets.fr/ur/livic

7

How to configure a PDO Transmit ?

: PDO 0x1800 + n - COBID 0x387 (why not ?) - PDO synchro X (2 bytes) Y(4 bytes) --- dataX 0x6000 03 --- dataY 0x2010 21 1– 2– 1800 + n, 01 : 02 : COBID(4 ) ? t ? (1 ) t = 1 to 0xF0 : PDO t = FD : t = FF : ) (8 ) (1 byte) – (8 ) ?2? (1 byte)

? t ? SYNC PDO (rtr = 1)

3–

1A00 + n : nth 0: PDO (1 1: : (2 bytes) – ? 6000 03 08 ? 2: ? 2010 21 20 ?

PDO

605 605 605 605 605

5 PDO 1802 3 synchro 23 02 18 01 00 00 07 38 2F 02 18 02 03 00 00 00 2F 02 1A 00 02 00 00 00 23 02 1A 01 08 03 00 60 23 02 1A 02 20 21 10 10

SDOs

(

) :

The PDO :
387
0

dataX

dataY

Note :

PDO

8

What is a PDO Transmited ? on request ? ?
PDO COBID (rtr) PDO

: PDO 384 :
1

COBID 384 PDO

? on request ?,

LIVIC – 14, route de la Minière. 78000 Versailles Satory. France http://www.inrets.fr/ur/livic

8

How to configure a PDO Receive ?

: PDO 0x1400 + n - COBID 0x183 (why not ?) - PDO : data X (2 bytes) --- dataX 0x6000 --- dataY 0x2010 1– 2– 1400 + n, 1400 + n, 01 : 02 :

data Y (4 bytes) 03 21

3–

1600 + n : 0: 1: 2:

PDO :

COBID(4 bytes) ? t ? (1 byte) t = 1 to 0xF0 : PDO ? t ? SYNC t = FD : PDO (rtr = 1) t = FF : . (1 ) ?2? (8 ) (2 bytes) – (1 byte) – (1 byte) ? 6000 03 08 ? (8 ) ? 2010 21 20 ?

PDO

605 605 605 605 605

5 PDO 1402 3 syncchro 23 02 14 01 00 00 07 38 2F 02 14 02 03 00 00 00 2F 02 16 00 02 00 00 00 23 02 16 01 08 03 00 60 23 02 16 02 20 21 10 10

SDOs

(

):

The PDO :
387
0

dataX

dataY

Question : Why do we need to configure a ? transmission type ? for a PDO receive ? Answer : I don't know

PDO --- PDO ---

( receive/transmit) : 8 . ID COBID (You are not obliged to make the cobId with the node id) 4 (bit 10 to 7) – PDO ( ): 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010 7 (bits 6 to 0) 0 , PDO CobId (hexa) : 181 to 57F 200, 280, 300, 380, 400, 480, 500

LIVIC – 14, route de la Minière. 78000 Versailles Satory. France http://www.inrets.fr/ur/livic

9

How to configure a SDO client ?
SDO Master SDO CANopen slave slave slave slave SDO SDO client slave 1280, 1281, ... SDO clients ( nsl(slave slave ) SDO ). SDO server (
1200)

client

0x1280+n SDO client 1– 2– 3– 1280 + n,

01 : write the cobId transmit (4 bytes) : 600 + nsl 02 : write the cobId receive (4 bytes) : 580 + nsl 03 : write the slave node id (1 byte) : nsl ( )

Master
Index 1280 (client) CobId SDO transmited 600 + ns1 SubIndex 1 CobId SDO received 580 + ns1

Slave

. Node id = ns1
Index 1200 (server)

CobId SDO received 600 + ns1

SubIndex 1

SubIndex 2

CobId SDO transmited 580 + ns1 SubIndex 2

Slave
Index 1281 (client) CobId SDO transmited 600 + ns2 SubIndex 1 CobId SDO received 580 + ns2

Node id = ns2
Index 1200 (server)

CobId SDO received 600 + ns2

SubIndex 1

SubIndex 2

CobId SDO transmited 580 + ns2 SubIndex 2

Index ...

LIVIC – 14, route de la Minière. 78000 Versailles Satory. France http://www.inrets.fr/ur/livic

10

How to configure a node to send the SYNC ?

SYNC 1– 1006, : 10ms( 10000us) : 00 : SYNC,

master (4 : 0x2710 ):

slave

9

SDO

609 23 06 10 00 10 27 00 00 0 0x40000080 0x1005, operational SYNC

0

Note:

What is the SYNC message ?
80 SYNC
0

PDO

LIVIC – 14, route de la Minière. 78000 Versailles Satory. France http://www.inrets.fr/ur/livic

11

How to configure a node to send its heartbeat ?

1– :

n ms : 0x1017 –

00 :

? n ?. (2 0x64

):

100ms 9 SDO 609 2B 17 10 00 64 00 00 00 0

How to configure a node to monitor the heartbeats of several nodes ?

: 2 ? nodeid1 ?, ? nodeid2 ?, 1– 23: 1016, n1 ms n2 ms 00 : 01 (4 02 (4

:

): ):

(4 ) ? 2 ?. : 00 – nodeid1 (1 byte) – n1 (2 bytes) : 00 – nodeid2 (1 byte) – n2 (2 bytes) |---------------4 ---------------|

9 node 2 : 100(dec) ms = 0x64 node 3 : 400(dec) ms = 0x190 node 7 : 4000(dec) ms = 0xFA0 SDO 609 2B 16 10 00 03 00 00 00 // 3 609 2B 16 10 01 64 00 02 00 // 609 2B 16 10 02 90 01 03 00 // 609 2B 16 10 03 A0 0F 07 00 // 0 01 , . ..,

0x00 02 00 64 0x00 03 01 90 0x00 07 0F A0

What is this message ?
(ID-bits10-7)

0000 0001 0001 0010 0011->1010 1011 1100 1110 *

C OBID(hex) 000 080 081-0FF 100 181-57F 581-5FF 601-67F 701-77F

Protocol NMT SYNC EMERGENCY TIME STAMP PDO* SDO response (server->client) SDO request (client->server) NMT error control

OD 1005H, 1006H, 1007H 1024H, 1015H 1012H, 1013H 1200H 1200H 1016H, 1017H

200, 280, 300, 380, 400, 480, 500 NM SYNC TIME STAMP

LIVIC – 14, route de la Minière. 78000 Versailles Satory. France http://www.inrets.fr/ur/livic

12


赞助商链接
相关文章:
芬兰CANopen双轴倾角传感器说明
芬兰CANopen双轴倾角传感器说明 - 芬兰 CANopen 倾角传感器说明 一、接线说明 二、通过串口设定传感器的各种参数 通过串口设置传感器的 CAN 节点号和波特率等参数可以...
基于微处理器和CANopen现场总线技术的电液比例阀放大器设计
基于CAN 现场总线技术的电液比例阀放大器设计 摘要:适应现代工程机械向数字化、分布式控制方向发展的需求,提出一种基于微处理器和 CANopen 现场总线技术的电液比例...
CANopen工作流分析 --SDO
CANopen工作流分析 --SDO - 机械工程学院机械设计及理论研究所 工作流分析 CANopen 工作流分析 2011Date: 2011-5-20 i V1.0 Copyright ...
cadence 破解时出现 can not open …… 或者是 diff pubkey等字样...
cadence 破解时出现 can not open …… 或者是 diff pubkey等字样 ,解决方法 - Cadence SPB 16.5 破解成功 一下午终于破解成功了! SPB16...
...if the library will be open Sunday_答案_百度高考
A: Hello, can you tell me if the library will be open Sunday eveningB:(). A. please call others. B. Good. I can help you. C. Hold the ...
Open-ended questions
Open-ended questions - Open-Ended Questions Examples of open-ended questions: ? · How can I be o...
AppCan插件使用文档之uexCamera
AppCan插件使用文档之uexCamera - uexCamera对象用于调用设备照相机拍摄照片,成功后返回相关图片存储地址
1067错误-mysql.host不存在
1067错误-mysql.host不存在 - Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 201...
语言学问答题
[ If you ask somebody“Can you open the door?”he answers“Yes”…] Answer: I would be angry with him.“Can you open the door”is normally a ...
更多相关标签: