04 - canopen
TRANSCRIPT
-
Industrial CommunicationChapter 4: CANopen
-
CANopen Features
2Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
Introduction
CAN (Control Area Network)Created by Bosch for automotive industryNew concept of non collision Producer / Consumer model
CAN in Automation (CiA)
3Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
CAN in Automation (CiA)Created in 1991 to promote CANPublished standards and Profiles
CANopenDS-301 profile created in 1995
http://www.can-cia.org
-
OSI Layers Used
3 Layers Used
APPLICATIONCiA DS-301 = Communication profile
CAL = CAN Application Layer
4Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
PRESENTATION Not used
SESSION Not used
TRANSPORT Not used
NETWORK Not usedDATALINK CAN 2.0 A and B + ISO 11898PHYSICAL ISO 11898 + DS-102
-
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
Error in the doc !
5Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
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)
-
Bus Length
Depends on the speed
Speed in baud Bus length Length of a junction 1 Mbps 20 m 0,3 m (L. Junction=0,6 m)
6Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
800 Kbps 40 m 3 m (L. Junction =6 m) 500 Kbps 100 m 5 m (L. Junction =10 m) 250 Kbps 250 m 5 m (L. Junction =10 m) 125 Kbps 500 m 5 m (L. Junction =10 m) 50 Kbps 1000 m 60 m (L. Junction =120 m) 20 Kbps 2500 m (with repeater) 150 m (L. Junction =300 m) 10 Kbps 5000 m (with repeater) 300 m (L. Junction =600 m)
-
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
7Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Industrial use 5-pin Mini Style, 5-pin Micro Style, Open Style
Special use 7-pin round connector, 8-pin round connector, 9-pin round
connector, 12-pin round connector, Hand Brid Harting.
-
9-pin SUB D connector
DIN 41652
8Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Pin Signal Description:1: Reserved2: CAN_L = CAN Low bus line (dominant low)3: CAN_GND = CAN Ground4: Reserved5: (CAN_SHLD) = Optional CAN Shield6: (GND) = Optional Ground7: CAN_H = CAN High bus line (dominant high)8: Reserved9: (CAN_V+) = Optional CAN external power supply
-
RJ 45 Connector
Cat 5
Pin Signal Description
9Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Pin Signal Description1: CAN_H = CAN High bus line (dominant high)2: CAN_L = CAN Low bus line (dominant low)3: CAN_GND = Bus ground4: Reserved5: Reserved6: (CAN_SHLD) = Optional CAN Shield7: CAN_GND = Bus ground8 (CAN_V+) = Optional CAN external power supply
-
5-pin Mini Style connector
ANSI/B93.55M-1981
10Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Pin Signal Description:1: (CAN_SHLD) = Optional CAN Shield2:(CAN_V+) = Optional CAN external power supply3:CAN_GND = Bus ground4:CAN_H = CAN High bus line (dominant high)5:CAN_L = CAN Low bus line (dominant low)
Male product end
-
Open Style Connector
Male product end
11Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Pin Signal Description:1:CAN_GND = bus ground2:CAN_L = CAN Low bus line (dominant low)3:(CAN_SHLD) = Optional CAN Shield4:CAN_H = CAN High bus line (dominant high)5:(CAN_V+) = Optional CAN external power supply
-
Link Layer Industrial Applications: CAN 2.0 A (frame identifier on 11 bits)
1 11 6 0 to 64 15 71 111
Arbitrationfield
12Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
CRC fieldCyclic
redundancy check
Start of frame(SOF)
Identifier
RTRRemote
TransmissionRequest bit
Data fielduseful data
(max 8 byte)
CRC delimit.
ACKslot
ACK delimit.
End of frame(EOF)
Control fieldcompatibility& data length
-
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
13Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
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).
-
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.
At frame structure level
14Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
At frame structure level the delimiters CRC Delimiter, ACK Delimiter, End of Frame, Error Delimiter, Overload
Delimiter are integrated to enable the structure to be checked.
At content validity level a Cyclic Redundancy Check (CRC) is used to detect possible transmission errors.
ACK slot this window enables the transmitter to know that his message has been received
correctly by at least one receiver (dominant bit).
-
Robust EMC Behavior
Effects of disturbances are minimizedSeparate GND lineDifferential signal transmission
15Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Short data frames (8 bytes maximum)Data can still be transmitted in environments that are severely electro-
magnetically disturbed Retransmit only the lost data (not the whole telegram)
t
-
Non Destructive Bus Access
Prior messages will always be transmitted
No telegram loss no collision (CSMA-CA)
No retransmission necessary
16Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
No retransmission necessary
Identifier
10 9 8 7 6 5 4 3 2 1 0 Control Field Data Field
CANopen device 1 0 0 0 1 1 0 0 0 0 0 0 1 0
CANopen device 63 0 0 0 1 1 0 1 listing only
Resulting CAN frame 0 0 0 1 1 0 0 0 0 0 0 1 0
SOF
RTR
0 is the dominant value
-
Application Layer
Producer / Consumer ModelFlexible Data TransmissionData Stored in EDS Files
Electronic Data Sheets per deviceCANopen Objects reached thanks to Index and SubIndex
17Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
CANopen Objects reached thanks to Index and SubIndexIndex Objects Description0x0000 Reserved0x0001 0x009F Data Types Area Defines the various types of variables used: bytes, words, signed,
unsigned, etc.0x00A0 0x0FFF Reserved0x1000 0x1FFF Communication Profile Area Describes the objects associated with communication.0x2000 0x5FFF Manufacturer Specific Profile Area Describes the "application" objects specific to the manufacturer.0x6000 0x9FFF Standardised Device Profile Area Describes the "application" objects standardised by CiA.0xA000 0xFFFF Reserved
-
Functions to Set from DS-301
Network administrationmessages are used for starting the bus, assigning identifiers, parameter
setting and NMT (Network Management) monitoring (master-slave model) PDO = Process Data Object (producer-consumer model)
used for high-speed transmission of process data ( 8 bytes) (not time-critical) Explicit Exchange
SFO = Special Function Object predefined messages for managing synchronization, time references, fatal
errors.
-
PDO: 2 parameters
19Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
PDO Mapping ParameterWhich Data to produce / receiveObject from the EDS file
PDO Communication ParametersWhich target identifier (COB-ID): Slave to slave synchronization possibleTransmit / receive modes Inhibit time (time between 2 PDO)
-
Transmission Modes
Synchronous: by receiving a SYNC objectAcyclic:
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:
20Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Cyclic:transmission is triggered periodically aftereach 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
-
Transmission Modes (Cont.)
21Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Be careful with analog values !Flexibility & Performance
Responsiveness
-
Inhibit Time
Used to ensure less prioritized PDO to be produced
22Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
SDO (Service Data Object)
Explicit MessagingClient / Server Method
Close to Modbus request
23Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Used at Bootup For Configuration
-
SFO
SYNC = Synchronization Object
Time Stamp Object
24Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Time Stamp Object
EMCY= Emergency Object
-
SFO: Bus Monitoring
Node Guardingmaster-slave concept (polling), allowing the bus manager to request (remote
request) the status of each station at a configurable time interval.
25Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Heartbeat producer-consumer concept: the status of the station is generated cyclically
at a configurable interval (less bus load & health check between devices possible)
-
Configuration with Unity Pro
26Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
2 Different Tools
Premium: TSX SCP 110 ModuleSycon Software to configure the busUnity Pro to integrate the configuration
27Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
2 Different Tools (Cont.)M340: CANopen Configuration Tool
Embedded inside UnityV2 Modules bring more functionalities (BMXP3420x0.2)
28Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
Embedded Devices
Included Devices
29Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Additionnal DevicesAdded thanks to the Hardware Catalog tool
-
Device Configuration
I/O Objects IODDT generation
30Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
Device Configuration
Channel FunctionRepresent a set of default configuration for a specific deviceCan be added / modify in the Hardware catalogue manager
31Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
Device Configuration
PDO ConfigurationDefault PDO activated from the selected device functionVariables can be added / removed in each PDOPDO can be activated / deactivatedTransmission types can be changed
32Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
Device Configuration
Config tabChange the device parameters that will be send to the device during bootup
33Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
Master Configuration
Mapping (Inputs / Outputs Words)Needs to be adapted to the correct size!
Bus ParametersBaudrate, inhibit time, SYNC, etc
34Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
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
35Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Test the communication Modify PDO parameters and observe the result Modify the mapping and the configuration send
-
Explicit Exchange
SDO Executed Through Function BlocksADDM: used to define the CANopen address of the targeted slaveREAD_VAR: to send a SDO read object request.WRITE_VAR: to send a SDO write object request.
36Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
SDO Online Test
-
ADDM FB
IN:String variable: r.m.c.e
OutConverted table of words, to be used in the others FB
37Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
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
-
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
38Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
NUM: subindex and index of the objectNB: number of consecutive objects to read
OUTRECP: 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..)
-
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
39Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
NUM: subindex and index of the objectEMIS: source table to write from the PLC
IN/OUTGEST: table of 4 words to manage the communication block (errors,
timeout, length, etc..)
-
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
40Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Implementing SDO write request with WRITE_VAR to change a configuration parameter (comm loss fallback behaviour)
Test the application
-
CANopen Application Management
Devices Function Blocks LibraryTesysMotion & DrivesEtc
41Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
MFB Library
Library to manage Drives
42Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
MFB Library
Commonly Used
43Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
Compatible with AXIS
CANopen AXISAxis linked to compatible devices onlySchneider drives and on CANopen only with MFB function
44Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
-
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
45Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
Test the application
-
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
46Industrial Communication Course with Unity Pro - CANopenSchneider Electric Vietnam | Truong Dinh Chau
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