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

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的基本开发技术以及应用难点怎么做 canopen 开发 我现在要做 DSP2812 与驱动器的通信,使用 CANopen...
canopen开发中常见的问题
canopen开发中常见的问题_专业资料。CANopenSDO 是 CANopen 协议中最复杂的一部分,带有应答机制,有多种传输方式,并且完整的 SDO 功能节点需提供 1 个 SDO ...
CAN与CANopen总结
CAN与CANopen总结_信息与通信_工程科技_专业资料。IXXAT CANopen 协议栈移植总结1 CAN 总线 1.1 介绍 1、CAN 协议(Conroller Area Network Protocol)为 Robert...
canopen和devicenet比较
3.2 标识符分配 CANopen 支持 CAN2.0 A11 位和 CAN2.0 B29 位标识符,而且报文的优先级只能通过它的 大小来区分, 通常节点地址比较小的 COB-ID 报文的优先...
CANopen协议—PDO介绍
10 CANopen 工作流分析 Date: 2011-5-20 i V1.0 Copyright By Tongji University 机械工程学院机械设计及理论研究所 第一章一、目的: PDO 实例分析 实例的...
CAN及CANOpen的分析
CAN及CANOpen的分析 - CAN 及 CANOpen 的分析 目录 1. CAN 及 CANOPen 的概述 ........................................
Canopen PDO 简介与示例
Canopen PDO 简介与示例_计算机软件及应用_IT/计算机_专业资料。CANopen过程数据对象基础知识,及应用示例 4.PDO 通讯 4.1 PDO COB-ID 参数每一个 PDO 在对象...
CANopen协议SDO部分基础知识实例介绍
9 CANopen 工作流分析 2011Date: 2011-5-20 i V1.0 第一章一、目的: 目的 SDO 实例分析 实现节点 2 的数据传送到节点 3 二、手段: 手段使用 SDO 进行...
CANopen的一些常规设置总结
I 主站的设置(以 EL6751 为例) II Beckhoff 从站的设置(以 BK5120 为例) CanOpen 的传输类型(Trans. Type) : PDO 分为 3 大类传输类型。 1 Event ...
简明CANopen协议
简明CANopen协议_调查/报告_表格/模板_实用文档。总结过的 简明CANOpen 协议 090120 I CANOpen 的协议版本 常用标准分 2 种 DS301 communications profile The ...
更多相关标签: