Sie sind auf Seite 1von 46

Industrial Communication

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

CAN in Automation (CiA)


Created in 1991 to promote CAN Published standards and Profiles

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

OSI Layers Used


3 Layers Used
CiA DS-301 = Communication profile CAL = CAN Application Layer PRESENTATION SESSION TRANSPORT NETWORK DATALINK PHYSICAL Not used Not used Not used Not used CAN 2.0 A and B + ISO 11898 ISO 11898 + DS-102
4

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

Error in the doc !

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

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.

Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau

9-pin SUB D connector


DIN 41652

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

5-pin Mini Style connector


ANSI/B93.55M-1981

Male product end


Pin Signal Description: 1: (CAN_SHLD) = Optional CAN Shield 2:(CAN_V+) = Optional CAN external power supply 3:CAN_GND = Bus ground 4:CAN_H = CAN High bus line (dominant high) 5:CAN_L = CAN Low bus line (dominant low)

Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau

10

Open Style Connector

Male product end

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

Start of frame (SOF)

RTR Remote Transmission Request bit

Data field useful data (max 8 byte)

CRC ACK delimit. delimit.

Identifier

Control field compatibility & data length

CRC field Cyclic redundancy check

ACK slot

End of frame (EOF)

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.

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).

Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau

14

Robust EMC Behavior


Effects of disturbances are minimized
Separate GND line Differential signal transmission

Short data frames (8 bytes maximum)


Data can still be transmitted in environments that are severely electromagnetically disturbed Retransmit only the lost data (not the whole telegram)

t
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau

15

Non Destructive Bus Access


Prior messages will always be transmitted No telegram loss no collision (CSMA-CA) No retransmission necessary
S O F CANopen device 1 CANopen device 63 Resulting CAN frame 0 0 0 Identifier 10 0 0 0 9 0 0 0 8 1 1 1 7 1 1 1 6 0 0 0 5 0 1 0 4 0 3 0 2 0 1 0 0 1 R T R 0

Control Field

Data Field

listing only 0 0 0 0 1 0

0 is the dominant value

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

Functions to Set from DS-301


Network administration
messages 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) Implicit Exchange

SDO = Service Data Object (client-server model)


transmission of parameter setting data (with segmentation can be > 8 bytes) (not time-critical) Explicit Exchange

SFO = Special Function Object


predefined messages for managing synchronization, time references, fatal errors.

Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau

18

PDO: 2 parameters

PDO Mapping Parameter


Which Data to produce / receive Object from the EDS file

PDO Communication Parameters


Which target identifier (COB-ID): Slave to slave synchronization possible Transmit / receive modes Inhibit time (time between 2 PDO)
Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau 19

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

Transmission Modes (Cont.)

Be careful with analog values ! Flexibility & Performance


Responsiveness

<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

SDO (Service Data Object)


Explicit Messaging Client / Server Method
Close to Modbus request

Used at Bootup For Configuration

Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau

23

SFO
SYNC = Synchronization Object

Time Stamp Object

EMCY= Emergency Object

Industrial Communication Course with Unity Pro - CANopen Schneider Electric Vietnam | Truong Dinh Chau

24

SFO: Bus Monitoring


Node Guarding
master-slave concept (polling), allowing the bus manager to request (remote request) the status of each station at a configurable time interval.

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

Configuration with Unity Pro

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

2 Different Tools (Cont.)


M340: CANopen Configuration Tool
Embedded inside Unity V2 Modules bring more functionalities (BMXP3420x0.2)

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.

SDO Online Test

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

CANopen Application Management


Devices Function Blocks Library
Tesys Motion & Drives Etc

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

Compatible with AXIS


CANopen AXIS
Axis linked to compatible devices only Schneider drives and on CANopen only with MFB function

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

Das könnte Ihnen auch gefallen