Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intro to CANopen Networks E. Zivi Nov 6, 2014 References: 1.A CAN Physical Layer Discussion Microchip Application Note AN00228a 2.Controller Area Network.

Similar presentations


Presentation on theme: "Intro to CANopen Networks E. Zivi Nov 6, 2014 References: 1.A CAN Physical Layer Discussion Microchip Application Note AN00228a 2.Controller Area Network."— Presentation transcript:

1 Intro to CANopen Networks E. Zivi Nov 6, 2014 References: 1.A CAN Physical Layer Discussion Microchip Application Note AN00228a 2.Controller Area Network (CAN) Implementation Guide Analog Devices Application Note AN-1123 3.Controller Area Network, CANPRES Version 2.0, Siemens Microelectronics, Inc., October 98 4.http://www.kvaser.com/en/about-can/the-can-protocol.htmlhttp://www.kvaser.com/en/about-can/the-can-protocol.html 5.CAN physical layer ref: http://www.can-cia.org/index.php?id=systemdesign-can-physicallayerhttp://www.can-cia.org/index.php?id=systemdesign-can-physicallayer 6.Controller Area Network Physical Layer Requirements, TI SLLA270–January 2008 7.CAN Tutorial, http://www.computer-solutions.co.uk/download/Peak/CAN-Tutorial.pdfhttp://www.computer-solutions.co.uk/download/Peak/CAN-Tutorial.pdf 8.CANopen Introduction, ref: http://www.canopensolutions.com/english/about_canopen/about_canopen.shtmlhttp://www.canopensolutions.com/english/about_canopen/about_canopen.shtml 1.Embedded Networking with CAN and CANopen, by Pfeiffer, Ayre and Keydel 2.CANopen Implementation: Applications to Industrial Networks, by Farsi and Barbosa 3.CAN in Automation, http://www.can-cia.org/http://www.can-cia.org/

2 Recall CAN & ISO/OSI Reference Model 2

3 CAN in Automation (CiA) CANopen & ISO / OSI Reference Models 3 High level CAN Protocols implement Application layer and skip the four intervening layers ISO 11898 CAN Data Link Layer ISO 11898 CAN Physical Layer Application CiA 301 CANopen Application Layer & Communication Profile CiA 302 CANopen Framework for CANopen Managers & Programmable Devices CiA 4xx Device Profiles CiA 401 Generic I/O Profile CiA 402 Motion Control Profile IEC 61131-3 Programmable Devices Profile Not Implemented by CAN or CANopen

4 CAN &CANopen Protocol Layers Application Layer Device profile for generic I /O modules (CiA 401, V3.0) Device profile drives and motion control (CiA 402, V2.0)... Interface and device profile for IEC 61131- 3 programmable devices (CiA 405, V2.0)... CANopen application layer and communication profile (CiA 301, V4.1, EN 50325-4) CANopen framework for CANopen managers and programmable CANopen devices (CiA 302, V3.4) CAN data link layer (ISO 11898:2003) CAN physical layer (ISO 11898:2003) CAN Bus We’ll investigate CANopen high level protocols after we have a basic understanding of CAN 4

5 CAN Higher Level Protocol Examples 1.CANopen : In the late 1990’s CANopen device profile specifications where established. CANopen includes a.A node addressing scheme b.Communication protocols supporting network management, device monitoring and communication between nodes c.Application layer device profiles 2.SAE J1939 : In 1998, the Society of Automotive Engineers (SAE) published the J1939 application layer protocols on top of CAN for vehicle applications. J1939 based standards include: truck and trailer communication (ISO 11992), agriculture and forestry vehicles (ISO 11783) and marine navigation systems (NMEA 2000). 3.ARINC 825 : Newer commercial aircraft such as the Airbus A380 and the Boeing 787 4.DeviceNet : Allen-Bradley (now Rockwell Automation) created DeviceNet as an application layer protocol on top of CAN in the 1990’s. DeviceNet CONFORMANCE TESTED® products have been certified by the Open DeviceNet Vendors Association (ODVA) to conform to the specification. 5

6 CANopen Attributes 1.Unique node IDs 1.7 bits of 11-bit CAN Message ID is node address 2.4 bits of 11-bit CAN Message ID is CANopen message type 2.Network Management (NMT) including NMT state machine, Boot-up, Heartbeat 3.Service Data Objects (SDOs) for network management 4.Process Data Objects (PDOs) for real-time process data 5.Each node contains an Object Dictionary with pre-defined entries for: 1.Node configuration 2.Process data 3.Mapping of process data to PDO messages 6.Electronic Data Sheets to automation network systems integration

7 CANopen Network Management State Machine Network States Available Services Pre- operational Operational Stopped PDO SDO Sync Time- stamp Emcy NMT Error control

8 MicroMod CANopen I/O

9 MicroMod CANopen Preprogrammed I/O MicroMod CANopen Generic I/O Message Implementation Comm Obj Message # of Data Elements Message Data TypeI/O Definitions TPDO 11unsigned byteDigital In 0..7 RPDO 11unsigned byteDigital Out 0..6 TPDO 2410 bits in unsigned intsAnalog In 0..3 RPDO 248 bit duty cycle in unsigned intsPWM Out 0..3 TPDO 3410 bits in unsigned intAnalog In 4..7 Implements subset of DS401 CANopen Generic I/O Specifications. Electronic Data Sheet Configures system.

10 MicroMod CANopen DS-401 Generic Digital I/O TPDO 1 & RPDO 1 Message Mapping Digital Output (7bits) RPDO1 (1 byte) CID: 0100 nnnnnnn2 Data: xbbbbbbb2 Transmit Process Data Object TPDO1 on change of any of 8 digital inputs Update 7 bits of digital output upon Reception of Receive Process Data Object RPDO 1 Digital Input (8 bits) TPDO1 (1 byte) CID: 0011 nnnnnnn2 Data: bbbbbbbb2

11 MicroMod CANopen DS-401 Generic Analog Input TPDO 2 Message Mapping Transmit Process Data Object TPDO 2 on change of any of Analog Inputs 0 thru 3 Resolution = 5V range / (2 10 – 1) TPDO2 Analog Input 3 CID: 0101 nnnnnnn 2 Data: BBBBBBBB 16 (2 bytes) Data transmitted in little endian (Least Significant Byte First) form TPDO3 Provides a second bank of 4 Analog inputs Analog Input 3 10-bit Analog input is backed into 16 bit data words

12 MicroMod CANopen DS-401 Generic Analog (PWM) Output RPDO 2 Message Mapping Receive Process Data Object RPDO 2 changes Duty Cycle of PWM outputs 0 thru 3 Resolution = 1 / (2 8 – 1) RPDO2 PWM Output3 CID: 0101 nnnnnnn 2 Data: BBBBBBBB 16 (2 bytes) Data transmitted in little endian (Least Significant Byte First) form PWM Output3 8-bit PWM duty cycle is packed into every other byte

13 CANopen DS-401 Generic I/O 11-bit Message ID Format Comm Objects4-bit Msg ID7-bit Node IDDS-401 Generic I/O Definitions Msg bits b 10 … b 7 b 10 b9b9 b8b8 b7b7 b6b6 b5b5 b4b4 b3b3 b2b2 b1b1 b0b0 NMT Service0x000 00000000000 SYNC Msg0x080 00010000000 Emergency0x080 0001n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 Time Stamp0x100 00100000000 TPDO 10x180 0011n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 Digital In 0..7 RPDO 10x200 0100n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 Digital Out 0..6 TPDO 20x280 0101n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 Analog In 1..4 RPDO 20x300 0110n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 Analog Out 1..4 TPDO 30x380 0111n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 Analog In 5..8 RPDO 30x400 1000n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 Analog Out 5..8 TPDO 40x480 1001n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 Analog In 8..11 RPDO 40x500 1010n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 Analog Out 8..11 TSDO0x580 1011n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 RSDO0x600 1100n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 Heartbeat0x700 1110n6n6 n5n5 n4n4 n3n3 n2n2 n1n1 n0n0 Constructing DS-401 Generic IO Message IDs 4-bit Msg ID + 7-bit Node ID

14 CANopen Motor Lab Configuration CANopen Magic Node CANopen MicroMod Node L298 Driver Board MotorEncoder Frequency to Voltage Converter Bench Power Supply PWM Power Shaft Rotation Modulated Power Position Pulse Train Analog Voltage Proportional to Motor Speed CAN Messages Graphical User Interface

15 Maxon Motor Tachometer Calibration Angular Velocity (rad. / sec. ) = 37.41 (rad. / sec. / V) × Tachometer Output (V) Tachometer Output is connected to MicroMod input Ain4

16 Maxon Motor Transfer Function Using CAN Lab #3 Procedure

17 CAN Lab #3 CANopen Magic Window Configuration MicroMod Heartbeat, Operational & PWM Duty Cycle (with Function key) messages added Filtered Trace windows added New Process Data visual display


Download ppt "Intro to CANopen Networks E. Zivi Nov 6, 2014 References: 1.A CAN Physical Layer Discussion Microchip Application Note AN00228a 2.Controller Area Network."

Similar presentations


Ads by Google