CAN全套协议之 DS303_2
- 格式:pdf
- 大小:173.71 KB
- 文档页数:8
VCII系列精密伺服驱动器Accurate servo driver安装手册目录1简介 (1)2.主要特性 (1)3.信号&功率范围 (15)4.电气特性 (15)5.通信 (15)5.1.MCK软件 (15)5.2.RS-232 (15)5.3.RS-232多点通信 (15)5.4.ASCII通信 (16)5.5.CANopen (16)5.6.CANopen通信 (16)5.7.CANopen连接器 (16)5.8.APX-NK CAN连接器套件 (17)5.9.CAN状态指示灯 (17)5.10.驱动器状态指示灯 (18)6.命令输入 (15)6.1.模拟量参考输入 (15)6.2.数字位置 (15)6.3.数字转矩/速度 (16)6.4.数字输入 (16)6.5.上拉/下拉控制 (17)6.6.HP数字输入 (17)7.命令输出 (18)7.1.数字输出 (18)7.2.制动输出[OUT4] (18)8.电机连接 (19)8.1.电机相连接 (19)8.2.数字霍尔信号 (19)8.3.数字编码器 (19)8.4.模拟编码器(-S模式) (20)8.5.模拟量霍尔(-S模式)+数字编码器 (20)8.6.旋转变压器(-R模式) (20)8.7.电机温度传感器 (20)8.8.电机制动器[OUT4] (21)8.9.多模式编码器端口 (21)8.9.1.作为数字正交反馈编码器的缓存输出 (21)8.9.2.作为模拟的Sin/Cos编码器输出的数字正交A/B/X信号 (22)8.9.3.作为数字正交编码器输出的主编码器或者齿轮编码器输入 (22)8.9.4.作为脉冲/方向、脉冲上升/脉冲下降、数字正交编码器格式的数字命令输入 (22)9.驱动器连接 (15)9.1.正交A/B编码器连接 (15)9.2.Sin/Cos编码器连接 (15)9.3.旋转变压器连接 (15)10.电源和接地 (16)10.1.驱动器电源 (16)10.2.外部+24VDC (16)10.3.内部信号电源 (16)10.4.干线电源 (17)10.5.接地 (17)10.6.再生 (17)10.7.符合CE标准的接地&屏蔽 (15)11.驱动器端口 (15)12.CANopen位置控制的单个驱动器设置 (15)13.CANopen位置控制的多个驱动器设置 (15)14.Stand-alone操作 (16)15.经典控制系统 (16)16.尺寸 (17)1.简介系列可编程精密伺服驱动器具有紧凑的平板结构,拥有连续功率输出达5KW的单相或者三相离线电源机动组,纯数字CANopen网络控制直线,DDR,音圈或者有刷,无刷旋转电机。
变频器设备如何快速实现CANopen 通信基于CANopen协议的XGate-COP10应用1.1 引言步入20世纪80年代,全球变频器技术变革速度加快,走向成熟的变频产品被广泛应用在国民经济的各个行业中。
随着中国变成世界工厂,制造业的快速发展也为变频器产品提供了越来越大的市场空间。
然而时至今日,国内变频器市场可以说是外国人的天下。
随着基于CAN总线的CANopen协议的发展,在国外特别是欧洲等地区的变频器都提供CANopen接口,因此为了对国外的产品兼容也要求国内厂商的产品提供CANopen接口。
本期文章将介绍如何利用XGate-COP10协议转换模块快速设计一款基于CANopen从站协议接口的变频器设备。
1.2 XGate-COP10简介XGate-COP10是一款CANopen从站协议转换模块,内部集成了CANopen从站协议栈,遵循CiA DS301 V4.02进行设计,其内部集成了网络管理(NMT)、服务数据(SDO)、过程数据(PDO)、错误管理等功能。
同时也遵循了DS303-3指示灯以及DS305层设置(LSS)等相关协议,使模块功能更强大。
所有的功能均通过CiA的一致性测试软件的测试,保证了与其它CANopen设备良好的兼容性。
XGate-COP10为DIP24封装,拥有较小的占位面积(6cm2),使其更容易集成到设备中。
其硬件设计也非常简单,其外观图如图1所示。
图 1 XGate-COP10外观图1.3 变频器简介1.变频器原理变频器是利用电力半导体器件的通断作用将工频电源变换为另一频率的电能控制装置。
现在使用的变频器主要采用交—直—交方式(VVVF变频或矢量控制变频),先把工频交流电源通过整流器转换成直流电源,然后再把直流电源转换成频率、电压均可控制的交流电源以供给电动机。
变频器的电路一般由整流、中间直流环节、逆变和控制4个部分组成。
整流部分为三相桥式不可控整流器,逆变部分为IGBT三相桥式逆变器,且输出为PWM波形,中间直流环节为滤波、直流储能和缓冲无功功率。
CTSC-200 CANopen系列产品用户手册深圳市合信自动化技术有限公司发布日期:11/2012手册版本:V1.30版权声明Copyright ©2012深圳市合信自动化技术有限公司版权所有,保留一切权利。
非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文件内容的部分或全部,并不得以任何形式传播。
、TrustPLC、CoPanel 均为合信自动化技术有限公司的商标。
对于本文件中出现的其它商标,由各自的所有人拥有。
为了便于说明,本文中使用部分软件截图,对于这些软件版权,由各自的所有人拥有。
由于产品版本升级或其它原因,本文件内容会不定期进行更新。
除非另有约定,本文件仅作为使用参考,本文件中的所有陈述、信息和建议不构成任何明示或暗示的担保。
免责声明CTSC-200 CANopen系列产品的安装、操作、维护工作仅限于合格人员执行。
对于使用本资料所引发的任何后果,合信概不负责。
安全注意事项在开始使用之前,请认真阅读用户手册的注意事项,以避免意外事故的发生。
所负责产品安装、操作的人员必须经过严格培训,遵守相关行业的安全规范,严格遵守该手册提供的相关设备注意事项和特殊安全指示,按正确的操作方法进行设备的各项操作。
本手册中,将安全注意事项分为“警告”、“注意”与“提示”三个等级:使用中的注意事项使用中必须有安全电路,保证当外部电源掉电或可编程控制器故障时,可编程控制器的应用系统能安全工作。
在使用的设计中应考虑的方面包括:必须在可编程控制器的外部电路中加设紧急制动电路、保护电路、正反转操作互锁电路和防止机器损坏的位置上限、下限互锁开关。
为确保使设备能安全运行,对重大事故相关的输出信号,请务必设计外部保护电路和安全机构。
可编程控制器的CPU 检测到系统异常可能会导致所有输出关闭;当控制器的部分电路故障时,可能导致其输出不受控制,为保证设备正常运转,需加设合适的外部控制电路。
可编程控制器的继电器、晶体管等输出单元损坏时,会使其输出无法控制为ON 或OFF 状态。
一.COE协议1. CANopen over EtherCAT(CoE)CANopen以CAN为基础,CAN只定义了物理层和数据链路层,CANopen协议就是CAN的应用层。
它将CAN网络中的通信数据的组建和传输标准化,描述了不同设备之间互操作的要求。
CiA(CAN inAutomation)组织为CANopen定义了设备和通信两种规范。
设备规范定义了特定类型的设备进入CAN总线的方式和功能,还定义了实现这些功能的通信规范工具,设备规范见表2.3所列。
表2.3 CANopen设备规范CiA(DS).401 数字输入输出设备CiA(DS).402 伺服驱动设备CiA(DS)-403 操作和显示设备CiA(DS).404 传感器和调节器CiA(DS)-405 可编程控制器CiA(DS)-406 编码器通信规范最重要的是DS301,它定义了CANopen设备之间的通信方式和行为规范。
在DS301中,定义了几个关于CANopen的重要概念:对象字典(OD)、服务数据对象(SDO)、过程数据对象(PDO)、网络管理对象(NMT),以及一些特殊功能对象,如SYNC、TIME和EMCY等㈨1。
CANopen设备模型见图2.12所示。
EtherCAT在应用层支持CANopen协议,为EtherCAT连接CANopen设备开辟了途径。
CoE帧头结构如图2.13,设备框架如图2.14所示。
CoE的主要功能包括:①使用邮箱访问CANopen 对象字典及其对象,实现网络初始化:②使用CANopen应急对象和可选的事件驱动PDO消息,实现网络管理;③使用对象字典映射过程数据,周期性传输指令数据和状态数据2.CoE对象字典OD(Object Dictionary)CANopen使用一种基于对象的方法来定义标准设备,每一个设备都表现为一组对象的集合,能够被网络访问。
对象字典就是通过网络可以读取的一组预先定义好形式的对象,它是一个参数列表㈨。
Kinco伺服CANOPEN通讯介绍PDO通讯介绍Kinco伺服是具备动态PDO配置能力的典型CANOPEN SLAVE设备。
PDO的配置存于设备中以备在没有MASTER设备(NMT MASTER)时启动后操作。
ECO2WIN软件可以用来观察NMT MASTER对PDO的配置或手工对PDO的配置。
常见4组PDO,每组包括TxPDO和RxPDO,对应的ID号(注意,ID号的值越小,其优先级越高),TxPDO1(181h~1ffh)、RxPDO1(201h~27Fh)、TxPDO2(281h~2ffh)、RxPDO2(301h~37Fh)、TxPDO3(381h~3ffh)、RxPDO3(401h~47Fh)、TxPDO4(481h~4ffh)、RxPDO4(501h~57Fh),在Kinco伺服内部RxPDO1和TxPDO1、RxPDO2和TxPDO2出厂时已经被初始化预定义,用户可根据需要修改。
PDO的通讯配置,每个PDO包含三个通讯参数:ID号(msg id),传输类型(type)和禁止时间(inhibit time)。
传输类型按CANopen协议规定有如下多种:――同步:0:同步报文(非周期性,当具有同步ID(080h)的报文出现在总线上时,PDO被触发)1-240:同步报文(周期性,要求在同步时间窗内周期性地发送数据,数值表示多少个(1~240)同步报文(SYNC)之后,PDO将会被触发,主要应用于运动控制)252:由远程帧来的请求命令同步更新PDO并响应请求――异步:253:PDO连续更新,但只在远程帧请求后触发255:非同步(RxPDO每次接收时更新,TxPDO在内容发生变化并不在禁止时间内时就发送),禁止时间只适用于TxPDO,缺省100微妙。
说明:对于PDO通讯,需要启动“CAN”网络才能实现,“CAN”网络的启动可以通过网络中的“NMT MASTER”设备来完成,如果没有“NMT MASTER”设备,则必须启动kinco伺服的CAN-Node(Kinco伺服的一个内部软件模块)。
由于其高可靠性和实时性的特点,CAN总线能够满足系统高性能的要求,已经深入到各个行业,例如专业车辆、工业控制、医辽器械、海事应用等。
CAN的标准协议 CAN2.0协议和国际标准 ISO11898是设计 CAN 应用系统的基本依据,但它们只是定义了物理层和数据链路层,没有对应用层进一步规范,本身并不完善,需要一个更开放的、标准化的高层协议来定义 CAN报文中的标识符和字节数据。
在此背景下,由 CiA(CANin Automation)组织监督开发了CANOpen高层协议。
在 2002年,已经形成欧洲标准 EN50325-4。
CANOpen的最大优点之一就是实现较为简单。
CANOpen协议是基于 CAN串行总线系统和应用层 CAL的高层协议,也是一种针对于行业的标准化的协议。
CANOpen协议为分布式控制及嵌入式系统的应用提供了必要的实现方法,主要提供:(1)不同 CAN设备间的互操作性、互换性。
(2)标准化、统一的系统通讯模式。
(3)设备描述方式和网络功能。
(4)网络节点功能的任意扩展。
CANOpen协议以通讯规范 CiA DS-301为基础,规定了一系列的设备规范,如 CiA DSP-401,CiA DSP-404等,从而提供了配置通讯参数和数据的方王俊波:博士研究生本工作得到国家自然科学基金重点项目(60334010),国家自然科学基金项目(60474047)高等学校博士学科点专项基金项目(20030561013)以及广东省自然科学基金项目(31406)的资助法,规定了设备间的通讯及特定设备间的特定行为(如数字 I/O、模拟 I/O、RS485通讯等),并定义了标准化的应用对象、基本功能以及网络功能。
CANOpen协议采用对象字典(OD)、电子数据文档(EDS)等一系列概念来描述设备和协议的相关信息,还规定了服务数据对象(SDO)、过程数据对象 PDO、网络管理等多种通讯机制。
在本文中,主要是对对象字典、服务数据对象(SDO)、过程数据对象(PDO)进行了简要的分析。
CAN总线以其成本低廉、通信实时性好、纠错能力强等优点而被汽车工业、电力系统变电站自动化、智能大厦等系统广泛采用。
作为一种通信协议,CAN本身并未指出流量控制、节点地址分配、通信建立、设备连接标准等具体的细则。
后来在CAN总线协议的基础上,产生了DeviceNET和CANopen协议标准。
1 CANopen简介1.1 CANopen由来1993年,Bosch公司领导的CAN-BUS协会开始研究CAN-BUS通讯、系统、管理方面的细则,以后逐步完善,由此发展成为CANopen协议,它是CAL(CAN Application Layer)协议基础上开发的,使用了CAL通信和服务协议子集,它在保证网络节点互用性的同时允许节点的功能随意扩展,定义了基于CAN的分布式工业自动化系统的应用标准以及CAN应用层通信标准。
CANopen协议是一个开放性的协议,对于开发者来说它是完全免费的。
CANopen在发布后不久就获得了广泛的承认,后来,有CiA(CAN in Automation)协会管理、维护、和发展。
到2001年,CANopen协议已经成为全欧洲的嵌入式网络标准。
1.2 CANopen协议剖析1.2.1 网络模型CANopen协议的物理层和数据链路层延用了CAL(CAN Application Layer)协议标准,一个网段上最多支持127个节点,采用CAN 收发器芯片,支持CAN2.0和CAN2.0B帧格式收发。
并在CiA DS303-1指出了电缆和接点标准,在CiA DS-304中指出了接点保护的规范,即总线要有安全开关、光电隔离、紧急开关、电源保护等。
CANopen把CAN的11位标识符分成2部分,及4位功能码和7个操作数据类型,如图1所示。
具体分配如表1所示。
图1 canopen COB-ID表1 CANopen标识符的分配表功能段地址段0000 NMT 系统管理0001 SYNC同步标记0011 PD0(tx)过程数据对象发送包0100 PD0(rx)过程数据对象接收包1011 SDO(tx)服务数据的发送包1100 SD0(rx)服务数据的接收包如果是29位的标识符机制,可以把现有的11标识符的定义映射到29位的COB-ID的高11位,使表中的C0B-ID的范围变的更大。
CiA 303RecommendationPart 2: Representation of SI units and prefixVersion: 1.4.014. August 2006 CAN in Automation (CiA) e. V.HISTORYDate Changes2001-07-01 Publication of Version 1.0 as draft recommendation2004-12-30 Publication of Version 1.3 as draft recommendation- minor editorial changes2006-08-14 Publication of Version 1.4 as draft recommendation- minor editorial changes- completion of the list of SI unitsGeneral information on licensing and patentsCAN in AUTOMATION (CiA) calls attention to the possibility that some of the elements of this CiA specification may be subject of patent rights. CiA shall not be responsible for identifying any or all such patent rights.Because this specification is licensed free of charge, there is no warranty for this specification, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holder and/or other parties provide this specification “as is” without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the correctness and completeness of the specification is with you. Should this specification prove failures, you assume the cost of all necessary servicing, repair or correction.TrademarksCANopen® and CiA® are registered community trademarks of CAN in Automation. The use is restricted for CiA members or owners of CANopen vendor ID. More detailed terms for the use are available from CiA.© CiA 2006All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from CiA at the address below.CAN in Automation e. V.Kontumazgarten 3DE - 90429 Nuremberg, GermanyTel.: +49-911-928819-0Fax: +49-911-928819-79Url: Email: headquarters@CONTENTS1Scope (4)2References (4)2.1Normative references (4)2.2Informative references (4)3Abbreviations and definitions (4)3.1Abbreviations (4)3.2Definitions (4)4Physical units representation (4)4.1Code table for base SI units (4)4.2Code table for supplementary SI units (5)4.3Code table for derived SI units with special names (5)4.4Other units from ISO 1000 (6)4.5Code table for CANopen device, interface and application profile specificunits (7)5Prefix representation (7)5.1Code table for prefixes (7)6Implementation example (8)1 ScopeThis technical report recommends the representation of the international system of units and prefixes in CANopen device, interface and application profiles. The name "Système International d'unités" (International System of Units), with abbreviation SI, was adopted by the 11th conférence générale des poids et mesures in 1960, and is standardized in /SO1000/.2 References2.1 Normative references/ISO2955/ ISO 2955:1983, Information processing - Representation of SI and other units in systems with limited character sets, 2nd edition/ISO1000/ ISO 1000:1983, SI units and recommendations for the use of their multiples and of certain other units2.2 Informative references3 Abbreviations and definitions3.1 AbbreviationsSI International system of units3.2 DefinitionsDefinitions given in /ISO1000/ and /ISO2955/ shall apply to this recommendation as well. Application objects representing physical values shall be described by using objects for prefix, numerator, and denominator. The detailed description is done in CANopen device profiles, interface profiles and application profiles. The values, which shall be used in these objects, are specified in the tables given in chapter 4 and 5.4 Physical units representation4.1 Code table for base SI unitsTable 1 shows the base SI units.Table 1 – Base SI unitsDescription Name of unit International symbol Notation index (hex) dimensionless none dimensionless 00 length metre m 01mass kilogram kg 02time second s 03 electric current ampere A 04 thermodyn. temperature kelvin K 05amount of substance mole mol 06luminous intensity candela cd 07reserved - 08 ... 0F4.2 Code table for supplementary SI unitsTable 2 shows the supplementary SI units.Table 2 – Supplementary SI unitsDescription of unit Name of unit International symbol Notation index (hex) plane angle radian rad 10solid angle steradin sr 11reserved - 12 ... 1F4.3 Code table for derived SI units with special namesTable 3 shows the derived SI units with special names.Table 3 – Derived SI units with special namesDescription Name of unit International symbol Notation index (hex) frequency hertz Hz 20 force newton N 21 pressure, stress pascal Pa 22energy, work, quantity ofjoule J 23 heatpower, radiant flux watt W 24coulomb C 25electric charge, quantity ofelectricityelectric potentialvolt V 26 difference, electromotiveforcecapacitance farad F 27 electric resistance ohm Ω28electric conductance siemens S 29 magnetic flux weber Wb 2A magnetic flux density tesla T 2B inductance henry H 2C celsius temperature degree celsius °C 2D luminous flux lumen lm 2Eilluminance lux lx 2Factivity (of a radionuclide) becquerel Bq 30gray Gy 31absorbed dose, specificenergy (imparted), kermadose equivalent sievert Sv 32catalytic activity katal kat 33reserved - 34 ... 3F4.4 Other units from ISO 1000Table 4 shows the other units provided by /ISO1000/.Table 4 – Other units from ISO 1000Description Name of unit International symbol Notation index (hex) angle grade g(s)* 40angle degree °(s) 41angle minute '(s) 42angle second ''(s) 43volume litre l† 44area are a 45area hectare ha 46time minute min 47time hour h 48time day d 49time year a 4Amass gram g 4Bmass tonne t 4Cpressure bar bar 4Epoise poise P 4Fstokes stokes St 50 electric charge electronvolt eV 51atomic mass unit atomic mass unit u 52astronomic unit astronomic unit AU 53 parsec parsec pc 54 acceleration meter per square second m/s255moment of force, torque newton metre Nm 56 square second square second s257 area square metre m258volume cubic metre m359 dynamic viscosity pascal second Pa⋅s 5A specific heat capacity,joule per kilogram kelvin J/(kg⋅K) 5B specific entropythermal conductivity watt per meter kelvin W/(m⋅K) 5Cjoule per mole kelvin J/(mol⋅K) 5Dmolar heat capacity, molarentropyradiance watt per square meterW/(m2⋅sr) 5Esteradiancatalytic (activity)katal per cubic meter kat/m35F concentrationreserved - 60 ... 9F† The symbol L may be used as an alternative to the symbol l. * (s) indicates that the symbol shall be used in the right superscript position (in the position of an exponent).4.5 Code table for CANopen device, interface and application profile specific units Table 5 shows the CANopen device, interface and application profile specific units.Table 5 – CANopen device, interface and application profile specific unitsName of unit International symbol Notation index (hex)profile-specific - A0 ... FF5 Prefix representation5.1 Code table for prefixesTable 6 shows the prefixes for SI units.Table 6 – Prefixes for SI unitsPrefix Factor Symbol Notation index (hex)reserved - - 13 ... 7F exa 1018 E 12- 1017- 11- 1016- 10peta 1015P 0F- 1014- 0E- 1013- 0Dtera 1012T 0C- 1011- 0B- 1010- 0Agiga 109G 09- 108- 08- 107- 07 mega 106M 06 - 105- 05- 104- 04kilo 103k 03hecto 102h 02deca 101da 01- 100- 00deci 10-1 d FFcenti 10-2 c FEmilli 10-3m FD- 10-4- FC- 10-5- FB micro 10-6µFA - 10-7- F9- 10-8- F8nano 10-9n F7- 10-10- F6Prefix Factor Symbol Notation index (hex) - 10-11- F5pico 10-12p F4- 10-13- F3- 10-14- F2 femto 10-15 f F1- 10-16- F0- 10-17- EFatto 10-18 a EE reserved - - ED to 806 Implementation exampleThe following object definition is a recommended practice to assign SI unit and prefix to an input/output object.In Figure 1 a recommended Value Definition for an object is given.31 24 23 16 15 8 7 0Prefix SI numerator SI denominator Profile-specific MSB LSBFigure 1 – Value DefinitionIn Table 7 the recommended object description for an object is given.Table 7 – Object descriptionIndex <to be defined in device profile>Name <TO BE DEFINED IN DEVICE PROFILE>Object Code VARData Type Unsigned32Category <to be defined in device profile>In Table 8 the recommended entry description for an object is given.Table 8 – Entry descriptionSub-index 00hAccess rwPDO Mapping No or OptionalValue Range <to be defined in device profile>Default Value <to be defined in device profile>Figure 2 shows an example for a velocity sensor. The value is given in km/h.31 24 23 16 15 8 7 003h01h48h reserved (00h) MSB LSBFigure 2 – Example for a velocity sensor。