Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Chapter 4: CANopen
CANopen Features
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
Introduction
CAN (Control Area Network)
Created by Bosch for automotive industry New concept of non collision Producer / Consumer model
CANopen
DS-301 profile created in 1995
http://www.can-cia.org
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
APPLICATION
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
Physical Layer
Twisted differential pair :
1 pair : CAN_H & CAN_L 2 pairs: CAN_H & CAN_L & Power Supply
Characteristic line impedance :120 ohms nominal Line termination :120 ohms at both ends of the line Wire resistance : 70 milli-ohms/metre nominal Topology :Bus type with the shortest possible tap links Maximum Number of Devices = 127 (1 Master + 126 Slaves)
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau 5
Bus Length
Depends on the speed
Speed in baud
1 Mbps 800 Kbps 500 Kbps 250 Kbps 125 Kbps 50 Kbps 20 Kbps 10 Kbps 20 m 40 m 100 m 250 m 500 m 1000 m 2500 m (with repeater) 5000 m (with repeater)
Bus length
Length of a junction
0,3 m (L. Junction=0,6 m) 3 m (L. Junction =6 m) 5 m (L. Junction =10 m) 5 m (L. Junction =10 m) 5 m (L. Junction =10 m) 60 m (L. Junction =120 m) 150 m (L. Junction =300 m) 300 m (L. Junction =600 m)
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
Physical Connections
3 Categories (DR-303-1)
General use
9-pin SUB D connector DIN 41652, multi-pole connector (ribbon cable to 9-pin SUB-D), RJ10 and RJ45
Industrial use
7-pin round connector, 8-pin round connector, 9-pin round connector, 12-pin round connector, Hand Brid Harting.
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
Pin Signal Description: 1: Reserved 2: CAN_L = CAN Low bus line (dominant low) 3: CAN_GND = CAN Ground 4: Reserved 5: (CAN_SHLD) = Optional CAN Shield 6: (GND) = Optional Ground 7: CAN_H = CAN High bus line (dominant high) 8: Reserved 9: (CAN_V+) = Optional CAN external power supply
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
RJ 45 Connector
Cat 5
Pin Signal Description 1: CAN_H = CAN High bus line (dominant high) 2: CAN_L = CAN Low bus line (dominant low) 3: CAN_GND = Bus ground 4: Reserved 5: Reserved 6: (CAN_SHLD) = Optional CAN Shield 7: CAN_GND = Bus ground 8 (CAN_V+) = Optional CAN external power supply
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
10
Pin Signal Description: 1:CAN_GND = bus ground 2:CAN_L = CAN Low bus line (dominant low) 3:(CAN_SHLD) = Optional CAN Shield 4:CAN_H = CAN High bus line (dominant high) 5:(CAN_V+) = Optional CAN external power supply
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
11
Link Layer
Industrial Applications: CAN 2.0 A (frame identifier on 11 bits)
Arbitration field
11
0 to 64
15
1 11
Identifier
ACK slot
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
12
4 Types Of Frames
Data Frame
transport data from a producer to consumers without any guarantee that it will be processed.
Remote Frame
sent by a client to a server to request transmission of a data frame (the identifier will have the same value as that of the request).
Error Frame
transmitted when a station detects the presence of errors on the bus.
Overload Frame
sent to ask for an additional time lapse between successive frames (data or request).
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
13
Protection Mechanisms
Very Reliable Hamming Distance = 6 At bit level
when 5 identical bits are transmitted, an additional "stuffing" bit with the opposite value is introduced intentionally. This bit is tested and eliminated by the receiver.
ACK slot
this window enables the transmitter to know that his message has been received correctly by at least one receiver (dominant bit).
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
14
t
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
15
Control Field
Data Field
listing only 0 0 0 0 1 0
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
16
Application Layer
Producer / Consumer Model Flexible Data Transmission Data Stored in EDS Files
Electronic Data Sheets per device CANopen Objects reached thanks to Index and SubIndex
Index
0x0000 0x0001 0x009F
Objects Reserved Data Types Area Reserved Communication Profile Area Manufacturer Specific Profile Area Standardised Device Profile Area Reserved
Description
Defines the various types of variables used: bytes, words, signed, unsigned, etc.
0x00A0 0x0FFF 0x1000 0x1FFF 0x2000 0x5FFF 0x6000 0x9FFF 0xA000 0xFFFF
Describes the objects associated with communication. Describes the "application" objects specific to the manufacturer. Describes the "application" objects standardised by CiA.
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
17
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
18
PDO: 2 parameters
Transmission Modes
Synchronous: by receiving a SYNC object
Acyclic: transmission is pre-triggered by a "Remote Transmission request" transmission is pre-triggered by the occurrence of a "Specific event" object in the device profile (most of the time, change of state) Cyclic: transmission is triggered periodically after each 1, 2 or up to 240 SYNC objects
Asynchronous:
transmission is triggered by a "Remote Transmission request" transmission is pre-triggered by the occurrence of a "Specific event" object in the device profile
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
20
<1 ms for 256 digital I/Os at 1Mbit/s 5 ms for 128 analog I/Os at 1Mbit/s
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau 21
Inhibit Time
Used to ensure less prioritized PDO to be produced
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
22
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
23
SFO
SYNC = Synchronization Object
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
24
Heartbeat
producer-consumer concept: the status of the station is generated cyclically at a configurable interval (less bus load & health check between devices possible)
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
25
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
26
2 Different Tools
Premium: TSX SCP 110 Module
Sycon Software to configure the bus Unity Pro to integrate the configuration
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
27
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
28
Embedded Devices
Included Devices
Additionnal Devices
Added thanks to the Hardware Catalog tool
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
29
Device Configuration
I/O Objects
IODDT generation
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
30
Device Configuration
Channel Function
Represent a set of default configuration for a specific device Can be added / modify in the Hardware catalogue manager
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
31
Device Configuration
PDO Configuration
Default PDO activated from the selected device function Variables can be added / removed in each PDO PDO can be activated / deactivated Transmission types can be changed
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
32
Device Configuration
Config tab
Change the device parameters that will be send to the device during bootup
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
33
Master Configuration
Mapping (Inputs / Outputs Words)
Needs to be adapted to the correct size!
Bus Parameters
Baudrate, inhibit time, SYNC, etc
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
34
Exercise
Add & Configure a CANopen Device (3-20) Create a new configuration Add a new device (Tesys U) and configure it Configure the master Test the communication Modify PDO parameters and observe the result Modify the mapping and the configuration send
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
35
Explicit Exchange
SDO Executed Through Function Blocks
ADDM: used to define the CANopen address of the targeted slave READ_VAR: to send a SDO read object request. WRITE_VAR: to send a SDO write object request.
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
36
ADDM FB
IN:
String variable: r.m.c.e
Out
Converted table of words, to be used in the others FB
r.m.c.e
r = the rack number where the CANopen module is located, m = the slot number of the CANopen module, c = the channel used e = the equipment address (slave address) of the target
0.0.2.e
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
37
READ_VAR FB
IN:
ADR: to be linked to the output of the ADDM block. OBJ: defining object to read (for CANopen: SDO) NUM: subindex and index of the object NB: number of consecutive objects to read
OUT
RECP: reception zone of the block, delivering the value read (table of words)
IN/OUT
GEST: table of 4 words to manage the communication block (errors, timeout, length, etc..)
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
38
WRITE_VAR FB
IN:
ADR: to be linked to the output of the ADDM block. OBJ: defining object to read (for CANopen: SDO) NUM: subindex and index of the object EMIS: source table to write from the PLC
IN/OUT
GEST: table of 4 words to manage the communication block (errors, timeout, length, etc..)
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
39
Exercise
Acyclic Requests SDO (3-27) Monitor the faults of the device Sending SDO using the debug tool to read fault code Sending SDO using the READ_VAR to read fault code Implementing SDO write request with WRITE_VAR to change a configuration parameter (comm loss fallback behaviour) Test the application
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
40
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
41
MFB Library
Library to manage Drives
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
42
MFB Library
Commonly Used
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
43
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
44
Exercise
Manage a Drive with MFB (3-37) Insert the ATV71 inside the configuration Configure the ATV71 using the display Insert MFB functions Test the application
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
45
CANopen
Main Features Reminder:
up to 20m at 1Mbit/s, 1000m w/o repeaters at 50kbit/s high performances < 1ms at 1Mbit/s (1) 5ms polling at 1Mbit/s (2) up to 127 devices (up to 64 per segment) max. 8 byte per telegram, but multiple telegrams per node very robust EMI behavior: separate ground in the wire + short data frames make it reliable excellent error detection (HD=6) communication adaptability and flexibility (PDO) non-destructive bus access
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau
46