Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
1
Fieldbus Networks WorkshopBECKHOFF
Fieldbus System Details• Ethernet• Profibus• DeviceNet• Sercos
2
Fieldbus Networks WorkshopBECKHOFF
Industrial Ethernet: Overview
10... 50ms (not deterministic, single frames can be delayed much longer) Typical Cycle times
No. Prioritised Ethernet will come, but cannot be mixed with standard ethernet devices
Priorities
CRCError Detection
Ethernet: up to 1500 Bytes; process data lenght depends on protocol usedFrame Length
100m between node and hub/switchNetwork expansion
Depends on protocolNode Hierarchy
UTP/STP/POF: star topology (hubs or switches)Topology
Shielded and unshielded twisted pair, Plastic Fibre Optics (PMMA); 10/100 Mbit/s10 Mbit coax-cable is hardly in use any more
Transmission Media, Baudrate
Ethernet: physical Node Address; IP: IP-Address; TCP/UDP: port-AddressAddressing
CSMA/CD Medium Access Control Method
Has been in use for controller – controller communication for years. New: use as fieldbus replacement.
Background
3
Fieldbus Networks WorkshopBECKHOFF
Ethernet: Overview
Ethernet transmits pakets of 46-1500 data bytesTransmission Media (10MBit/s)
• Koax cable for bus topology (10Base5 “Thick Cable”, 10Base2 “Cheapernet”); • Fibre Optics (10BaseF) • Shielded twisted pair (STP) or unshielded twisted pair (UTP) 10BaseT for star topology
Header: Physical Addresses:• 22Bit Manufacturer ID (OUI: Organizationally Unique Identifier) and 24Bit Serial Number• further: Protocol-Info, Address type (Peer to Peer, Broad-, Multicast etc.)
Media Access Method: CSMA/CD• Advantage: no need to make each Node known to the network • Disadvantage: behavior is non deterministic• Pakets „die“, if media access failed 15 times in a row
4
Fieldbus Networks WorkshopBECKHOFF
Switched Ethernet Topology•Switched Ethernet (full-duplex) avoids collisions•But: still non deterministic, as switches need paket queues
Small Controller
I/O I/OENET
Modular I/O Rack
Soft PLC
Block I/O
PC w/HMI
PLC
I/OENET
I/O
Modular PLC
Block I/O
Device
ENetSwitch 10/100M Ethernet
ENET
I/O I/O
Robot
Device
Device
PC w/Config Sw
Block I/O
PC w/HMI
Block I/O
ENetSwitch
10/100M Ethernet 10/100M Ethernet
5
Fieldbus Networks WorkshopBECKHOFF
UDP-Hdr.(IP-Port)
UDP-Data
8 Bytes
TCP/IP Stack: Overview•TCP/IP (or UDP/IP) is embedded in Ethernet Packet•Structure supports Exchange of protocol layers
Ethernet-Header(MAC-ID)
46...1500 Bytes Ethernet-Data CRC
IP-Header(IP-Address)
IP-Data
TCP-Header(IP-Port)
TCP-Data
22 Bytes
08-0
0
PRO
T20 Bytes
20 Bytes
6
Fieldbus Networks WorkshopBECKHOFF
Internet Protocol (IP): Overview• Datagram with 20 Byte Header• Unsecured Data transport from a source to a destination address• Header: Addresses, Header-Checksum, Protocol infos,Time to Live, Fragmentation infos etc.• Supports Routing between networks• IP-Addresses: Network-and Host address
• Address resolutionwith ARP
version Hdr Len Service Type Total Length16bit Identification Flags 13bit Fragment Offset
8bit Time to Live 8bit Protocol 16bit Header Checksum32bit Source IP address
32bit Destination IP addressOptions (if any), padding
IP Datagramm Data (up to 65535 Bytes)
IP Header and Data CRC0800DASA
20 B
ytes
Ethernet
7
Fieldbus Networks WorkshopBECKHOFF
User Datagram Protocol (UDP): OverviewSimple datagram-oriented data transport, carried in IP dataNon-guaranteed delivery of data
• Packets may be delivered out of order or may not be delivered at all!
Less overhead than TCPNeeded for broadcast and multicast applicationsGood for request / response type protocols
• SNMP• TFTP• DHCP / BOOTP
16bit source port number
UDP data (theoretically up to 65507 Bytes,
typically restricted by the implementation)
UDP Header and DataIP-HDR (PROT=17)
8 By
tes 16bit destination port number
16bit UDP length 16bit UDP checksum
IP Header and Data CRC0800DASA
IP
8
Fieldbus Networks WorkshopBECKHOFF
Transmission Control Protocol (TCP): OverviewConnection oriented data transport, carried in IP data• Point to point between exactly two host ports
Reliable: Transfers are acknowledged, Order of sequential packets maintained
Data transferred as a stream of bytesGood for protocols needing to move streams of data
• HTTP,FTP,SMTP
Only works with unicast IP addresses• No broadcast or multicast
16bit source port number
TCP data (theoretically up to 65495 Bytes,
typically restricted by the implementation)
TCP Header and DataIP-HDR (PROT=06)
20 B
ytes
16bit destination port number
16bit TCP checksum 16bit urgent pointer
IP Header and Data CRC0800DASA
IP
32bit sequence number32bit acknowledgement number
16bit window sizeHDR LEN flags(reserved)
9
Fieldbus Networks WorkshopBECKHOFF
TCP: Connection
Establish: Three way handshake between two hosts• Host 1 sends SYN (synchronize) to host 2• Host 2 sends ACK to host 1 along with its own SYN • Host 1 sends ACK to host 2
Terminate: Four way handshake• Host 1 sends FIN (final) to host 2• Host 2 send ACK to host 1• Host 2 (in a separate message) sends FIN to host 1• Host 1 sends ACK to host 2
-> it takes some time to establish/terminate a connection!
10
Fieldbus Networks WorkshopBECKHOFF
ARP: Address Resolution Protocol TCP Address: Port Number
IPAddress
EthernetAddress: MAC-ID
MAC-ID ?
If no entry in ARP Cache
Send ARP Requestwith IP Address and MAC ID
FF FF FF FF FF FF
Communication starts
Node answers with MAC-IDand both MAC-ID and IP-Address
Number are entered in ARP Cache
11
Fieldbus Networks WorkshopBECKHOFF
IP Address Assignment Several Possibilities:
1. Setting by Local Software (PC) or Configuration Tool
2. DHCP (Dynamic Host Configuration Protocol) – requires configuration of DHCP Server
3. BootP (Bootstrap Protocol) – requires BootP Server
4. ARP –s (adds entry in ARP cache, can be used to assign IP-Adress to MAC-ID via network)
5. DIP-Switch (on field devices, typically only for LSB)
12
Fieldbus Networks WorkshopBECKHOFF
Ethernet: ProfiNetProfiNet:
• Access to Profibus Networks viaEthernet
• Protokoll: RPC (Remote ProcedureCalls) via TCP/IP or UDP/IP
• DCOM-based • DCOM will not be advanced by
Microsoft (Source: VSLive Conf.)• DCOM is not Internet-compatibel
(e.g. Firewall )• Microsofts new developments are
base on HTTP and TCP/IP, SOAP (Simple Object Access Protocol: XML based description)
• ProfiNet is not (yet): Profibus on Ethernet
• But: Real Time ProfiNet will come
13
Fieldbus Networks WorkshopBECKHOFF
Ethernet: IDA•Initially „Kuka and Friends“ + Jetter•Kuka meanwhile pulled out•Has selected NDDS (RTI) as Middleware, uses TCP/IP und UDP/IP•Therefore NDDS-User Schneider joined IDA•5/2000: Jetter drops VentureCom DCX and moves to NDDS •So far white papers and devicemodel finished•No final protocol solution published, no products available yet.
14
Fieldbus Networks WorkshopBECKHOFF
Control and Information Protocol (CIP)
Ethernet: Ethernet IP•ODVA und ControlNet International•CIP (Control and Information Protocol) on TCP/IP and UDP/IP•No data concerning real time capability available•Sample Code available•First devices are entering marketplace
SemiDevices
PneuValve
ACDrives
PositionCntrllrs
OtherProfiles
Application Object Library
Application LayerExplicit, I/O, Routing
DeviceNetDLL
Transport
ControlNetDLL
TransportFuture
encapsulation
UPD TCP
IP
DeviceNetPhysical
Layer
ControlNetPhysical
Layer
EthernetPhysical
LayerFuture
ATM, FirewireUSB, Blue Tooth
ApplicationLayer
UserLayer
Transportand Data Link
Layer
PhysicalLayer
15
Fieldbus Networks WorkshopBECKHOFF
+ + : Memorandum Of Understanding
• IAONA (Europe + US together) becomes umbrella organisation for Industrial Ethernet
• IDA and Ethernet/IP are recognized by IAONA as de facto standards
• other groups are invited to join
• areas not covered yet („white spots“) are tackled jointly (Joint Work Groups)
• therefore: new structure of IAONA
IAONA: Industrial Automation Open Networking Alliance
16
Fieldbus Networks WorkshopBECKHOFF
IAONA: Industrial Automation Open Networking Alliance
Technical Steering Committee
Board IAONA US Board IAONA Europe
Member IAONA US Member IAONA Europe
Joint Technical Workgroup
Chairman Joint Technical Workgroup
Chairman Joint Technical Workgroup
Chairman
2 2
PNO? FF? OMAC?
29 members 129 members
TSC tasks:
•Installs Workgroups
•Publishes Standards
•Coordinates work of the Workgroups
TSC Chairman: Peter Klüger, KukaDeputy chairman: Martin Rostan, Beckhoff
17
Fieldbus Networks WorkshopBECKHOFF
Ethernet: Modbus TCP• Serial Modbus Protocol onTCP/IP
• Master/Slave (Polling)• Few Services, easy toimplement
• Wide spread use• Only for moderate RealTime Requirements
Transaction ID
Query message from Master
Protocol IDLengthUnit ID
Modbus fct code
Data
Transaction IDProtocol ID
LengthUnit ID
Modbus fct code
Data
Response message from Slave
18
Fieldbus Networks WorkshopBECKHOFF
Beckhoff ADSAutomation Device Specification: • Ethernet TCP/IP for networking of control system• Not just on TCP/IP or UDP/IP: available on most field bus systems as well
PLC PLC NC Fieldbus
VB OPC DLL Ethernet
ADS Router
PLC PLC NC Fieldbus
VB OPC DLL Ethernet
ADS Router
PLC PLC NC Fieldbus
VB OPC DLL Ethernet
ADS Router
Bus Controller Bus Controller
ADS Communication Path
LAN
Fiel
dbus
PC Control System PC Control System PC Control System
19
Fieldbus Networks WorkshopBECKHOFF
ADS Message RouterCommunicates locally, viaCOM Interface, TCP/IP orFieldbusAddresses:• Clients in public Networks
via TCP/IP• Local Networks• Clients in local Networks• Fieldbusses• Coupler in Feldbus systems• Server processes
text
User Interface
Visual C++Program
ADS DLLADS
PLCControl
ADS
SystemManager
ADS
TwinCAT ADS Message Router
PLCServer
ADS
NCServer
ADS
I/O Mapper
ADS
I/O Level
TCP/IP
Fiel
dbus
A
Fiel
dbus
B
Fiel
dbus
C
Fiel
dbus
D
Fiel
dbus
E
20
Fieldbus Networks WorkshopBECKHOFF
ADS Protocol
ADS Data
UDP Header and DataIP-HDR)
16 B
ytes
IP Header and Data CRC0800DASA
IP
Index OffsetIndex Group
ADS Port: Target Location of DataAMS Net ID: Addresses the Device
UDP Data or TCP DataUDP or TCP Hdr
• Client / Server-Principle on TCP or UDP
• Services:
–Synchronous read/write
–asynchronous read/write
–connect (with defined Cycle Time)
–notification on change (with minimal Cycle Time)
21
Fieldbus Networks WorkshopBECKHOFF
ModbusModbus
Ethernet: Multi-Protocol DevicesBeckhoff Ethernet I/O Devicessupport all relevant Protocols –if possible even in parallel!
EthernetEthernet
ARPARP IPIP RARPRARP
ICMPICMPOSPFOSPF
TCPTCP UDPUDP
FTPFTP HTTPHTTPBOOTPBOOTPDHCPDHCPDNSDNS
“CIP”“CIP”
SNMPSNMP
IGMPIGMPIGRPIGRP
ProfiNetProfiNetADSADS
22
Fieldbus Networks WorkshopBECKHOFF
Beckhoff and Ethernet at work: Microsoft Headquarter Munich
23
Fieldbus Networks WorkshopBECKHOFF
Microsoft Headquarter Munich: Details
•11 Buildings•44 Floors, 27000 m²
•11 Building Controller•164 Bus Controller (BC9000)•12000 digital I/O Points•2100 analogue I/O Points
•User Interface: Web Browser•Protocol: ADS on UDP/IP
Terminal rail 1
Terminal rail 1
Terminal rail 1
Terminal rail 1
Terminal rail 4
Terminal rail 4
Terminal rail 4
Terminal rail 4
Building 1 Building 2
Building Computer
3. Floor
2. Floor
1. Floor
Ground Floor
24
Fieldbus Networks WorkshopBECKHOFF
0
10
20
30
40
50
60
70
80
90
100
5 10 15 20 25 30No of Nodes
Cyc
le T
ime
[ms]
Ethernet: Cycle Times
Modbus TCP: Node Response within 10..20 ms, Cycle Times 40..60 ms
Beckhoff ADS/UDP: Node Response within 1..4 ms, Cycle Times 15..25 ms
• Ethernet Cycle Time is hardly predictable.
• Depends on software runtimes (UDP + TCP) andtiming behavior of „Master“ (COTS Technology)
• 100 Mbit Switched Ethernet: almost independent of no. of nodes and of no. of bytes.
25
Fieldbus Networks WorkshopBECKHOFF
Ethernet: Conclusions • high baudrate is not always equal to high performance• standardisation of Industrial Ethernet is not finished yet• interoperability is not guaranteed yet• its either COTS technology or hard real time • infrastructure costs (industrial components) stillsignificantly higher than with standard fieldbus systems
Therefore: Ethernet is no ideal replacement for standard fieldbus systems (yet), but a nice alternative for applications with:
- existing Ethernet infrastucture- low real time requirements
26
Fieldbus Networks WorkshopBECKHOFF
Profibus DP: Overview
1...3 msTypical Cycle times
2Priorities
CRC. Hamming Distance: 4 (3 Bits out of 32 (246) x 8 may change)Error Detection
0...246 Bytes. Typical: 1...32 BytesFrame Length
100 m (12 Mbaud), 200 m (1,5 Mbaud), 1200 m (93,75 kBaud). With 3 repeaters: values times 4 (segment – repeater – seg – rep – seg – rep – seg)
Network expansion
Typical: 1 Master, up to 31 slaves. With repeater: up to 126 nodes. Several masters possible.
Node Hierarchy
Electrical: bus (line) with terminating resistors; FO: ringTopology
RS485: shielded twisted pair, fibre optics (plastic); 9,6 kbit/s....12 Mbit/sTransmission Media, Baudrate
Node Addressing. Frame contains transmitter and receiver addressAddressing
Polling. If more than one master present, masters use additional token passing method
Medium Access Control Method
Profibus Sensor/Actuator derivative, initially developed by SiemensBackground
27
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Topology
Termination
Termination
2 3 30 31
62 61 33 32
Termination
Repeater
Repeater
* Note: Repeaters do not have a station address, but theycount towards the max. number of stations in each segment
Station 1
®
PROCESS FIELD BUS
28
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Termination
VP
B
A
DGND
first station
390 Ω
220 Ω
390 Ω
Bus Terminationlast station
Bus TerminationVP
B
A
DGND
Data Line B
Data Line A
B BA AStation 2 Station 3
390 Ω
220 Ω
390 Ω
®
PROCESS FIELD BUS
110 nH
110 nH
110 nH
110 nH
29
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Shielding/Grounding
data cable
ground cable, potential equalization
Slave Slave
Master
ground rail
data cable
ground rail ground rail
®
PROCESS FIELD BUS
Screen grounding clamp
Grounding rail close to cable lead-through
Recommended Practise
30
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Monomaster System
DP-Master (Class 1) Monomaster Systems achieve the shortest bus cycle timeThey consist of:
- 1 DP-Master (Class 1)- 1 to max. 125 DP-Slaves- DP-Master (Class 2) - optional
Distributed Inputs and Outputs
DP - Slaves
PROFIBUS-DP
PLC
®
PROCESS FIELD BUS
31
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Multi Master SystemSeveral DP-Masters
may access a DP-Slave with read functionsPROFIBUS-DP Multimaster systems consist of:
- multiple Masters (Class 1 or 2)- 1 to max. 124 DP-Slaves- max. 126 devices on the same busDP-Master
(Class 2)
DP-Master(Class 1)
DP-Master(Class 1)
distributed inputs and outputs distributed inputs and outputs
PROFIBUS-PDP - Slaves
PLC
PROFIBUS - DP
PC
CNC
®
PROCESS FIELD BUS
32
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Multi Master Media Access
®
PROCESS FIELD BUS
PROFIBUS
Active Stations, Master Devices
Passive Stations, Slave Devices, get polled, no direct slave to slave communication
PLCPLCPC
pollingpollingpollingpolling
33
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Protocol Classes
®
PROCESS FIELD BUS
Slave to Slave Communication (via Master), Equidistance (Motion Control)
DPV2
Alarm and acyclic Services (e.g. Parameter data)
DPV1
Cyclic Process Data CommunicationDPV0
34
Fieldbus Networks WorkshopBECKHOFF
TSYN = 33 Tbit
Request
Response
TRDY
min TSDR
max TSDR
Legend: TRDY = Ready TimeTSDR = Station Response Time, typically 11 TBit
TSYN = Synchronization Time, typically 22 TBit
Master Slave
Time
Request Telegram
Response Telegram
Profibus-DP: Timing
®
PROCESS FIELD BUS
35
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Calculation of Cycle TimeTMC = ( TSYN + TID1 + TSDR + Header + I x 11TBit + 0 x 11TBit ) x Slaves
TMC = Message Cycle Time in Bit TimesTID1 = Idle Time at the Master = typically 75 TBitTSDR = Station Delay Time at the Slave = typically 11TBitHeader = Telegram Overhead in Request and Response Frame = 198 TBitI = Number of Input Data Bytes per SlaveO = Number of Output Data Bytes per SlaveSlaves = Number of Slaves
PROFIBUS-DP System consisting of 1 Master and 20 Slaves eachwith 2 Byte Input and 2 Byte Output Data.TMC = ( 33 + 75 + 11 + 198 + 22 + 22 ) x 20 = 7220 TBit7220 TBit (1.5 MBaud) = (TBit = 0.66 µs) = 4.8 ms7220 TBit (12 MBaud) = (TBit = 0.83 ns) = 0.6 ms
In practice, a safety margin of approx 10 to 20% should be added for bus administration,diagnostic messages and retries (after bit errors).
Example:
®
PROCESS FIELD BUS
36
Fieldbus Networks WorkshopBECKHOFF®
PROCESS FIELD BUS
Profibus: Cycle Times
0
5
10
15
20
25
30
35
40
5 10 15 20 25 30No of Nodes
Cyc
le T
ime
[ms]
12 MBaud, 2+2 Bytes12 MBaud, 6+6 Bytes12 MBaud, 20+20 Bytes1,5 MBaud, 2+2 Bytes1,5 MBaud, 6+6 Bytes1,5 MBaud, 20+20 Bytes500 kBaud, 2+2 Bytes500 kBaud, 6+6 Bytes500 kBaud, 20+20 Bytes
37
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Troubleshooting
®
PROCESS FIELD BUS
Simple test for eliminating the most common wiring errors:
• Data cable crossed over
• Open circuit of one of the data cables
• Open circuit of the cable shield
• Short circuit between the data cables
• Short circuit between data cables and cable shield
• Additional bus terminating resistors inserted unintentionally
38
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Troubleshooting
®
PROCESS FIELD BUS
Test each segment after installing cables and attaching bus connectors, but:
- bus connectors must not be connected to Profibus devices- bus terminating resistors must be removed or disabled
Test equipment: 2 test connectors DB9, 1 Ohmmeter
• Connector 1 with double pole single throw switch; moving contact connected to shield (case) of the test connector. Fixed contacts connected to pin 3 (data wire B) and pin 8 (data wire A).
• Connector 2 used to connect the Ohmmeter to the bus
39
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Troubleshooting
®
PROCESS FIELD BUS
Wiring Test Setup
Ω
Test Connector 1 Test Connector 2
Bus Connector Bus Connector
screen screen
8 3 38
RS 485 Segment
B
A
Bus Connectors of further stations
40
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Troubleshooting
®
PROCESS FIELD BUS
Test Step 1:
TC1: first connect pin 3 and shield
TC2: measure resistance R between pin 3 and shield
If R < 10 Ω: Data B and shield connection o.k.If R = infinity: Data B or shield open circuit
Then disconnect pin 3 and shield at TC1
Resistance R now has to be infinite. If not: short circuit between data B and shield or
Data A and Data B swapped over
Ω
Test Connector 1 Test Connector 2
Bus Connector Bus Connector
screen screen
8 3 38
A B A B
41
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Troubleshooting
®
PROCESS FIELD BUS
Test Step 2:
TC1: connect pin 8 and shield
TC2: measure resistance R between pin 8 and shield
If R < 10 Ω: Data A and shield connection o.k. If R = infinity: Data A or shield open circuit
Then disconnect pin 8 and shield at TC1
Resistance R now has to be infiniteIf not: short circuit between data B and shield or
Data A and Data B crossed over
Ω
Test Connector 1 Test Connector 2
Bus Connector Bus Connector
screen screen
8 3 38
A B A B
42
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Troubleshooting
®
PROCESS FIELD BUS
Test Step 3: Bus terminating resistors
TC1: switch position is not important
TC2: measure resistance R between pin 3 and pin 8
If R = infinite: o.k., if no terminating Resistors connectedIf R = 220..230 Ω: 1 Terminating Resistor connectedIf R = 110..120 Ω: 2 Terminating Resistors connectedIf R = <110 Ω: too many Terminating Resistors
Ω
Test Connector 1 Test Connector 2
Bus Connector Bus Connector
screen screen
8 3 38
A B A B
43
Fieldbus Networks WorkshopBECKHOFF
Profibus-DP: Installation Guidelines (RS485)
®
PROCESS FIELD BUS
inside control cabinet: in separate cable conduits or cable ways without minimum spacing requirementsoutside control cabinets: In seperate cable runs spaced at least 10cm (4‘‘) apart
- DC and AC voltages > 400 V (unshielded)- Telephone cables- For areas with explosion hazard
in separate cable conduit or cable way without minimum spacing requirements
- DC voltages from 60V... 400V (unshielded)- AC voltages from 25V... 400V (unshielded)
in the same cable conduit or cable way.- Bus signals, e.g. PROFIBUS- Data signals for PC´s, programming devices,printers etc.- Screened analog inputs- Unscreened DC voltages (<= 60V)- Screened process signals (<= 25 V)- Unscreened AC voltages (<= 25V)- Coaxial cables for monitors
must be laid...Profibus cables and cables for...
44
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Overview
5...15 msTypical Cycle times
2048Priorities
CRC, Frame Check, Bus Monitoring, Bit Stuffing, Acknowledge Check. Hamming Distance: 6 (5 Bits out of 83 may change)
Error Detection
0...8 Bytes. Longer process images are sent using segmented transferFrame Length
100 m (500 kBaud), 250 m (250 kBaud), 500 m (125 kBaud). Use of repeatersdoes not lead to longer networks, as propagation delay is the limit (not damping)
Network expansion
Typical: 1 Master, up to 63 slaves. Several masters possible (rarely used)Node Hierarchy
Electrical: bus (line) with terminating resistorsTopology
ISO 11898: shielded twisted pair; 125, 250, 500 kBit/sTransmission Media, Baudrate
Frame Addressing (CAN Identifier). Predefined Master-Slave Connection Set links Node Adresses (MAC-ID) with CAN Identifiers
Addressing
CSMA/CAMedium Access Control Method
CAN based Sensor actor bus system, initially developed by Allen BradleyBackground
45
Fieldbus Networks WorkshopBECKHOFF
DeviceNet (CAN): Dominant and Recessive BitsV+
bus-line
S1 S2 S3
device 1 device 2 device 3
V+ -> 1-> 0
State TableS1 0 1 0 1 0 1 0 1 0 - level is dominantS2 0 0 1 1 0 0 1 1 1 - level is recessiveS3 0 0 0 0 1 1 1 1
Bus Level 0 0 0 0 0 0 0 1
46
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: CAN Arbitration with CSMA/CA
node 1 listening only
node 2 listening only
node 3
bus-level
Node 3 wins arbitration and transmits his data.
S RO Identifier T Control DataF 10 9 8 7 6 5 4 3 2 1 0 R Field Field1
0
1
0
1
0
1
0
47
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Topology
PS
Trunk Line withTerminatingResistors + (short) Drop Lines
Drop Line„Zero Drop“
node 1 . . . . . . . . node n
CAN Bus Line 120 Ω120 ΩCAN_H
CAN_L
Basic CAN Topology: ISO 11898
48
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Dropline Daisy-Chaining & Branching
Dropline
Tap
plug-in device connector
TapTrunk
Use inside Control Panelswhere multiple devices are clustered together
Branching Limitations20 ft max to node farthest from tapsum of cable-feet goes against dropline
budget
49
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Propagation Delay limits Network Length
CAN-Controller 1 CAN-Controller n
opto- opto- . . . . . . opto- opto-coupler coupler coupler coupler
transceiver 1 transceiver n
~ 50 ns
~ 100...150 ns
~ 40 ns
~ 5,5 ns/m
CAN Arbitration requires Propagation delay < Bit Time
50
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Drop Line + Multidrop Limitations
Bit Rate
500kbit/s250kbit/s125kbit/s
Trunk Length
(without Drops)
100m250m500m
SingleDrop
Length<5m
<10m<20m
TrunkLength
(without Drops)
66m120m310m
Trunk line
Dro
p lin
e
Trunk line
Drop line
Multiport Tap
Drop Lengths
<25m<50m
<100m
SingleDrop
Length
<1,2m<2,4m<4,8m
Trunk/Drop Topology Multiport Tap TopologyΣ
51
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: CAN Error Detection and Recovery
1. Local or global error detected.2. An Error Flag will be transmitted (globalisation of error).3. In case of local error this Error Flag will proceed an
overlapping Error Flag followed by the Error Delimiter.4. The message will be discarded by each node.5. The Error Counters of every bus node are incremented.6. The message transmission will be repeated
automatically.
52
Fieldbus Networks WorkshopBECKHOFF
transmitter data data 8 bit 3 repetition
receiver 1 6 bit
receiver 2 6 bit
bus-level
The receiver 2 detects an error and makes it public to the other nodes.
DeviceNet: Globalisation of Local Errors
53
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Why Local Errors?
Disturbance
Disturbance
Threshold AThreshold B
Threshold
Sampling Point ASampling Point B
Sampling Point
1. Different Sampling Points in different Nodes
2. Different Switching Thresholds in different Nodes
3. Dispersion during Propagation along the Bus Line
54
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Error Counters and Error States
Error Active
Error Passive
REC
<= 1
27an
dTE
C <=
127RE
C >
127
or
TEC
> 12
7
TEC > 255
Reset and Configuration
Reset, Configurationand Reception of
128x11 recessiveBits
REC: Receive Error CounterTEC: Transmit Error Counter
Bus Off
Too manyErrors: Bus Off
55
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Multimaster and Multicast
I/O 1
PLC1 MMIPLC2
DRIVE1
DRIVE2
DRIVE3
#1
#2
• Transaction #1 - position reference from I/O Rack #1 is broadcastedto PLC1, PLC2, and the MMI at the same time• Transaction #2 - speed command is sent to all three drives at the same time• But: 99% of all DeviceNet Networks are single Master / single Cast („Group 2 Only“- Networks, where Slaves communicate with Master only)
56
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Polling
PLC
I/O 1 I/O 2 I/O 31,4,... 2,5,..
3,6,..
• The simplest and most understood; “polling”• The PLC or scanner is the master and I/O devices are the slaves
• The slaves speak only when spoken to• Only one master per network (“single master”)
• Most (>95%) of all DeviceNet installations work this way• Deterministic behavior, easy to configure• But: less efficient use of bandwidth than other options
57
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Polling Procedure with AB ScannerPo
ll R
eque
st N
ode
1
Poll
Req
uest
Nod
e 2
Poll
Req
uest
Nod
e 3
Poll
Req
uest
Nod
e 4
Poll
Req
uest
Nod
e 5
Poll
Req
uest
Nod
e 6
Poll
Res
pons
e N
ode
1
Poll
Req
uest
Nod
e 7
Poll
Req
uest
Nod
e 8
Poll
Res
pons
e N
ode
2
Poll
Res
pons
e N
ode
4
Poll
Res
pons
e N
ode
6
Poll
Res
pons
e N
ode
5
Poll
Res
pons
e N
ode
3
Poll
Res
pons
e N
ode
7
Poll
Res
pons
e N
ode
8
Poll
Req
uest
Nod
e 1
Poll
Req
uest
Nod
e 2
Poll
Req
uest
Nod
e 3
Poll
Req
uest
Nod
e 4
Interscan DelayScanner first sends all Poll Requests
Interscan delay is the time the scanner module will wait between thelast poll message request and the start of the next scan cycle.
Background poll ratio sets the frequency of poll messages to adevice in relation to the number of I/O scans. For example, if theratio is set at 10, that device will be polled once every 10 scans.
It is not possible to set a specific cycle time.
58
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Cyclic Data Production
PLC
I/O 1 I/O 2 I/O 3
every 500 ms
every 2000 ms
every 25 ms
• Devices report data on a user-configured time increment basis (input or output)• Cyclic Data Production is more efficient for applications with slowly changingI/O (analog)
• Network traffic is reduced• Performance is repeatable
• Can be used in Master/Slave, Peer-to-Peer, or Multimaster environments• More configuration effort than polling but better performance when the minimum required update rate for individual I/O devices can be identified
59
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Change of State (COS)
PLC
I/O 1 I/O 2 I/O 3
#2
#1#3
• Rather than a master going through a polling list (scanning), devices report data (input or output) on a change-of-state basis as the events happen• Change of State is more efficient for discrete applications• Network traffic is significantly reduced, performance is greatly improved
• Background heartbeat for device supervision (Network Management)• Can be used in Master/Slave, Peer-to-Peer, or Multimaster environments• Bandwidth analysis in system test phase required• in DeviceNet Change of State is always combined with Cyclic
60
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Calculation of Cycle TimesTMC = (I x 8 + (NRQT x TTH) + O x 8 + (NRST x TTH)) x Slaves x 100%/BL
TMC = Message Cycle Time in Bit TimesI = Number of Input Data Bytes per SlaveNRQS = No. of Request Telegrams (I=1..8:NRQS=1; 9…14:2; 15…21:3; 22…28:4 etc.)TTH = Telegram Header= 50 Tbit (including 3 Stuff Bits)O = Number of Output Data Bytes per Slave NRQS = No. of Response T. (O=1..8:NRQS=1; 9…14:2; 15…21:3; 22…28:4 etc.) Slaves = Number of SlavesBL = Busload; typical: up to 80% (for polling only)
DeviceNet System consisting of 1 Master and 20 Slaves eachwith 2 Byte Input and 2 Byte Output Data, 80% BusloadTMC = (2x8 + 50 + 2x8 + 50) x 20 x 100%/80% = 3300 TBit3300TBit (500kBaud) = (TBit = 2 µs) = 6.6 ms 3300TBit (125kBaud) = (TBit = 8 µs) = 26.4 ms
Example:
61
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Cycle Times I (Polling)
0
20
40
60
80
100
120
140
160
5 10 15 20 25 30No of Nodes
Cyc
le T
ime
[ms]
500 kBaud, 2+2 Bytes500 kBaud, 6+6 Bytes500kBaud, 20+20 Bytes250 kBaud, 2+2 Bytes250 kBaud, 6+6 Bytes250 kBaud, 20+20 Bytes125 kBaud, 2+2 Bytes125 kBaud, 6+6 Bytes125 kBaud, 20+20 Bytes
80% Busload
62
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Cycle Times II (Polling, 500 kBaud)
0
5
10
15
20
25
30
35
40
5 10 15 20 25 30No of Nodes
Cyc
le T
ime
[ms]
500 kBaud, 2+2 Bytes500 kBaud, 6+6 Bytes500kBaud, 20+20 Bytes
80% Busload
63
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Cycle Times III
0
5
10
15
20
25
30
35
40
45
0 5 10 15 20 25 30 35 40 45 50
No of I/O Bytes per Slave
Cyc
le T
ime
[ms]
500 kBaud, 10 Nodes, 80% Busload
64
Fieldbus Networks WorkshopBECKHOFF
Network Wiring Design
Network Wiring Design Affects…• Maximum communication baudrate• Network power distribution
Network Wiring Design Goals• Control total trunk length• Control cumulative drop length
(the total length of all drop lines)
65
Fieldbus Networks WorkshopBECKHOFF
Network Wiring Design (continued)
Important Points:• Network trunk lines may be constructed with thick, thin or
a combination of think and thin cable according to the tables in the DeviceNet Specification – typically thin is sufficient
• The trunk line must be terminated at each end• Two terminators, no more and no less• DeviceNet differs from many other networks in that it
requires network termination for proper operation,regardless of cable length
66
Fieldbus Networks WorkshopBECKHOFF
Network Wiring Design (continued)
… More Important Points:• The trunkline-dropline topology guidelines must be
followed faithfully• Bending the rules will usually cause more problems
than it solves• Building trunks with thin cable has a significant impact on
network power design• Thin cable has a higher DC resistance and will
adversely affect voltage drop in the power system
67
Fieldbus Networks WorkshopBECKHOFF
Network Power
Network power is a new concept to most controlsystems designers• 24Vdc is supplied in the network cable
• Powers simple devices• Powers the isolated network interface in larger devices
Power System Design Goals• Deliver 11Vdc minimum at each device• Limit common mode voltage to < 5v
• Voltage drop in DC common line
68
Fieldbus Networks WorkshopBECKHOFF
Network Power (continued)
Power System Design Process• Determine maximum current for each device• Place one or more power supplies on the network to
ensure that:• The voltage drop in the cable between a power supply
and each station it supplies does not exceed 5Vdc• The current does not exceed the cable/connector limit
• The DeviceNet Specification provides an easy table-lookup method for power system design
69
Fieldbus Networks WorkshopBECKHOFF
Network Power (continued)
Important Points:• Use the maximum inrush current specification for each
device for power calculations• Minimum requirements must be guaranteed when
power is applied• Use multiple power supplies with care
• You must guarantee that the power supply common does not vary by more than 5V between any two pointsin the network
70
Fieldbus Networks WorkshopBECKHOFF
Grounding
Network Grounding Guidelines• Connect the DC power supply common wire and the shield
to a low-impedance ground at the power supply• If multiple power supplies are present, ground at only
the power supply closest to the middle of the network• Location of ground affects common mode voltage
• All splices and taps in the network must connect the shield as well as the signal and power lines
71
Fieldbus Networks WorkshopBECKHOFF
DeviceNet: Shielding/Grounding
data cableShield grounded only at one location
Slave Slave
Master
ground rail ground rail ground railR-C
Optional R-C Circuit for HF grounding
72
Fieldbus Networks WorkshopBECKHOFF
Testing
General Test Parameters• Do not perform these tests while the system is operating
(no communication)!• All devices installed• All power supplies turned on• Perform these tests in sequence
• Some tests assume that previous tests were successful
73
Fieldbus Networks WorkshopBECKHOFF
Testing (continued)
Ω
120 Ω
120 Ω
Network Termination & Signal Wires• Check the resistance from CANH to CANL at each device
• If the value is > 60 ohms, there could be a break in one of the signal wires or missing network terminator(s)
• If the value is < 50 ohms look for:- a short between the network wires, - extra terminating resistor(s), - faulty node transceiver(s)
Depending on the type of Ohmmeter it may be necessary to disconnect the nodes for this test!
74
Fieldbus Networks WorkshopBECKHOFF
Testing (continued)
Shield• Connect a DC ammeter (16 amps max) from DC common
to the shield at the opposite end of the network from thepower supply• There should be significant current flow• If there is no current, the shield is broken or the network
is improperly grounded • If the power supply is in the middle of the network, do
this test at each end• This test can also be performed at the end of each drop
if practical
75
Fieldbus Networks WorkshopBECKHOFF
Testing (continued)
Grounding• Break the shield at a few points in the network and insert a
DC ammeter• If there is current flow, the shield is connected to DC
common or ground in more than one place (ground loop)
76
Fieldbus Networks WorkshopBECKHOFF
Testing (continued)
Network Power - Minimum supply voltage• Measure the supply voltage at each device
• It should be > 11Vdc• If not, check for faulty or loose connectors and verify
power system design calculations by measuring current flow in each section of cable with an ampmeter
77
Fieldbus Networks WorkshopBECKHOFF
Testing (continued)
Network Power - Common Mode Voltage • Shield must be continuous and have no current flow in it
(tested previously)• Measure and record the voltage between the shield and
DC common at each device• The maximum difference should be < 5V between any
two devices
78
Fieldbus Networks WorkshopBECKHOFF
Testing (continued)
MAC ID/ Baud Rate Settings• The Network Status LED is an excellent diagnostic tool for
this purpose• The LED should be flashing green on all devices
• Solid RED indicates a communication fault (possibly incorrect baud rate) or a duplicate MAC ID (station address)
• Use a network configuration tool to perform a "network who" to verify that all stations are connected and capableof communicating
79
Fieldbus Networks WorkshopBECKHOFF
Diagnosing Faults
Common network problems• Faulty devices• Opens & shorts in the network wiring
• Faulty connectors or cable• Electrical interference
• Incorrect grounding or broken shield• Signal distortion & attenuation
• Incorrect termination• Failure to adhere to topology guidelines• Faulty connectors or loose terminal blocks
80
Fieldbus Networks WorkshopBECKHOFF
Diagnosing Faults
Problems specific to DeviceNet • Missing terminators • Excessive common mode voltage
• Excess current or cable length• Faulty connectors
• Low power supply voltage• Excess current or cable length• Faulty connectors
• Excessive signal propagation delay• Excess cable length
81
Fieldbus Networks WorkshopBECKHOFF
Diagnosing Faults (continued)
Low-tech Approach:• Disconnect parts of the network and watch where the fault
goes• Does not work well for problems such as excessive
common mode voltage, ground loops, electrical interference and signal distortion because disconnecting part of the network frequently solves the problem
• If the network was previously operating, ask the question "what has changed?”
82
Fieldbus Networks WorkshopBECKHOFF
Diagnosing Faults (continued)
Using an Oscilloscope:• Can be misleading since many perfectly good differential
signals look perfectly awful when viewed individually• Most network problems your are tempted to diagnose with
an oscilloscope are intermittent• Unless you are able to trigger your scope on the bad
signal you will probably spend your time looking at goodsignals
83
Fieldbus Networks WorkshopBECKHOFF
Diagnosing Faults (continued)
Your Brain is Your Best Diagnostic Tool:• Be a detective, record symptoms in detail
• Your notes are invaluable if you enlist the help of others• Look for patterns in the symptoms
• Do intermittent problems occur when other un-related equipment is in use?
• Do some nodes communicate correctly? What is the difference between the functioning nodes and the others? (proximity to the power supply, to the terminator, to the scanner)
84
Fieldbus Networks WorkshopBECKHOFF
DeviceNet Troubleshooting: Conclusion
The vast majority of DeviceNet network problems are user created by:• Failing to follow cable system design rules
• Missing terminators• Excessive trunk/drop length• Improper topology
• Failing to follow power system design rules• Excessive common mode voltage
85
Fieldbus Networks WorkshopBECKHOFF
SERCOS: Overview
0,5...2 ms, cycle times of 0,0628 ms possibleTypical Cycle times
1Priorities
CRC. Hamming Distance: 4Error Detection
Cyclic Drive Telegram: typical 4 Bytes, maximal 32 BytesFrame Length
Max. 40 m between two nodesNetwork expansion
1 Master, up to 253 slavesNode Hierarchy
RingTopology
1000 µm Plastic Optical Fibre (PMMA:Polymethylmethacrylate); 2 or 4 Mbaud, coming soon: 8 and 16 MBaud
Transmission Media, Baudrate
Node AddressingAddressing
Time Slicing MethodMedium Access Control Method
Fibre Optic Network, originally developed for Drive ControlBackground
86
Fieldbus Networks WorkshopBECKHOFF
SERCOS: Medium Access Control via Time Slicing
• Master calculates a time window for each slave
• In the initialization phase this timing parameter is configured on the slave
• Each Slave has an adjustable address(independent of its position within the ring)
• The Master cyclically sends a synchronization telegram “MST”
• Communication is collision free due to the fixed timeslices and synchronized communication
87
Fieldbus Networks WorkshopBECKHOFF
SERCOS: Communication Principle
88
Fieldbus Networks WorkshopBECKHOFF
SERCOS: Telegram Structure
89
Fieldbus Networks WorkshopBECKHOFF
SERCOS: Startup PhasesThe optical Ring is checked
OK
OK
Master identifies all Slaves
Initialisation of the SlavesTiming parameters are readCalculate Time Slice parametersDownload parameters
Everything operational
Timing is activated, further Parametrisation
10 times MST
All Slaves respond with Drive Telegram
All Values ok
Slaves check parameters
Phase 0 Reset Phase
Phase 1
Phase 2
Phase 3
Phase 4
Ring identification
Initialisation Phase(+Parameterisation)
Parametrisation Phase
Operational
OK
OK
90
Fieldbus Networks WorkshopBECKHOFF
SERCOS: Calculation of Cycle TimeTMC = TMST+TMDTH+2TJit+(TATH+TJit+(7+I+0)x9,6 +TMDTS ) x SlavesTMC = Message Cycle Time in Bit TimesTMST = Master Sync Telegram Time = 56,4 TBitTMDTH = Master Data Telegram Header = 44,8 TBitTJit = Jitter Time btw. two messages = 16TBit@16MBaud;8@8; typ.20@4; 40@2 TATH = Slave Telegram Header = 16TBitTMDTS = Master Data Telegram Slave Header = 38,4 TBitI = Number of Input Data Bytes per SlaveO = Number of Output Data Bytes per SlaveSlaves = Number of Slaves
SERCOS System consisting of 1 Master and 20 Slaves eachwith 2 Byte Input and 2 Byte Output Data, 4MBaudTMC = 56,4 + 44,8 + 40 + (16 + 20 + (7+2+2)x9,6 + 38,4) x 20 = 3741 TBit3741TBit (4 MBaud) = (TBit = 0.25 µs) = 0.94 ms3653 TBit (16 MBaud) = (TBit = 62.5 ns) = 0.23 ms
In practice, time for data access from PLC/NC to the master should be added (typ. 0.3ms)
Example:
91
Fieldbus Networks WorkshopBECKHOFF
SERCOS: Cycle Times
0
1
2
3
4
5
6
7
8
5 10 15 20 25 30No of Slaves
Cyc
le T
ime
[ms]
16MBaud, 2+2Bytes
16MBaud, 6+6 Bytes16MBaud, 20+20 Bytes
4MBaud, 2+2Bytes4MBaud, 6+6 Bytes
4MBaud, 20+20Bytes2MBaud, 2+2Bytes
2MBaud, 6+6 Bytes2MBaud, 20+20Bytes
including 0.3 ms Master Access Time
92
Fieldbus Networks WorkshopBECKHOFF
SERCOS: Cycle Times
120
80
40
20
10
52
3210,50,250,1250,0628
Nodes per
SERCOS interface
Fibre Optic - Ring
Datarate 16 MBit/s
Position/Velocity Control Telegram
SERCOS interface Cycle time in ms
Datenrate 4 MBit/s
Position/Velocity Control Telegram
93
Fieldbus Networks WorkshopBECKHOFF
SERCOS: FC750x Mastercard Facts
Baudrate 2 / 4 / 8 / 16 MBit/s
Max. No of Slaves 254 Nodes
Software support TwinCAT I/O … NCI, not without TwinCAT!
Synchronization TwinCAT Real Time
Minimal Cycle time 62,5 µs
All settings via TwinCAT
FC750x does not need an interrupt!
94
Fieldbus Networks WorkshopBECKHOFF
SERCOS: BK7500 Bus Coupler Facts
Baudrate 2 / 4 / 8 / 16 Mbit/s
Max. No of Devices 254 Nodes
Max. number of bytes 32 bytes input / 32 bytes output for the cyclic interface (depending on the master)
Minimal Cycle time 62,5 µs; if cycle time shorterthan K-Bus update, olddata is repeated
Settings Node AddressDistance to next node (Tx Intensity)Baud Rate
95
Fieldbus Networks WorkshopBECKHOFF
CANopen: Overview
5...15 msTypical Cycle times
2048Priorities
CRC, Frame Check, Bus Monitoring, Bit Stuffing, Acknowledge Check. Hamming Distance: 6 (5 Bits out of 83 may change)
Error Detection
0...8 Bytes. Longer process images are sent using different telegrams (PDOs)Frame Length
100 m (500 kBaud), 250 m (250 kBaud), 500 m (125 kBaud). Use of repeatersdoes not lead to longer networks, as propagation delay is the limit (not damping)
Network expansion
Typical: 1 Master, up to 63 slaves. Several masters possible (rarely used)Node Hierarchy
Electrical: bus (line) with terminating resistorsTopology
ISO 11898: shielded twisted pair; 10, 20, 50, 100, 125, 250, 500, 800, 1000 kBit/sTransmission Media, Baudrate
Frame Addressing (CAN Identifier). Predefined Master-Slave Connection Set links Node Adresses (MAC-ID) with CAN Identifiers
Addressing
CSMA/CA. Medium Access Control Method
CAN Protocol defined by CAN in Automation. Used in General Automation Applications (I/Os, Drives, etc) and in Embedded Applications
Background
CANopen
96
Fieldbus Networks WorkshopBECKHOFF
CANopen: Device Model
Protocol Stack
PDO ProtocolSDO ProtocolSync ProtocolTime Protocol
Emergency ProtocolNMT Protocol
Heartbeat Protocoletc.
Object Dictionary
Data TypesCommunication Objects
Application ObjectsProprietary Objects
ApplicationSoftware
Device ProfileImplementation
ProprietarySoftwareRoutines
I/OCAN
• All Parameters and Application Objects are organized in an object dictionary
• Access to these objects via service data objects (SDO) and process data objects (PDO)
CANopen
97
Fieldbus Networks WorkshopBECKHOFF
CANopen: Process Data Object (PDO)
Other node
PDO_1 consumerPDO_1 consumer
PDO_1 producer
PDO_1DataID
Producer/Consumer: PDO makes use of CAN broadcast mechanism
• PDOs contain real time I/O data. Contents is described in PDO Mapping Object
• Each PDO has one producer and one to many consumers
• PDO equivalent in DeviceNet: I/O messages (or implicit messaging)
CANopen
98
Fieldbus Networks WorkshopBECKHOFF
CANopen: PDO SchedulingPDO Trans-mission Type Internal
event1. Event- or Timer-driven producer
consumer(s)
Remote Frame2. Remotely
requested producerconsumer(s)
Sync3. Synchronous
transmission(cyclic, acyclic)
producerconsumer(s)
CANopen
99
Fieldbus Networks WorkshopBECKHOFF
CANopen: PDO Synchronisation
time
Sync SyncCommunication_Cycle_Period
Actuation based on COMMAND at next SYNC
CommandMessages
ActualMessages
Samples takenat SYNC for
actual message
synchronous window
length(s)CommandMessages
ActualMessages
• SYNC telegram acts as trigger for input reading and output validation
CANopen
100
Fieldbus Networks WorkshopBECKHOFF
CANopen: PDO Mapping
6TTTh TTh Object A
6ZZZh ZZh Object G
6YYYh YYh Object F
6XXXh XXh Object E
6WWWh WWh Object D
6VVVh VVh Object C
6UUUh UUh Object B
Object Dictionary
Object B Object DObject APDO_1
Index Sub Object contents01h
02h
03h
1ZZZh
1ZZZh
1ZZZh
6TTTh TTh 8
6UUUh UUh 8
6WWWWh WWh 16Map
ping
Obj
ect
Appl
icat
ion
Obj
ect
PDO-Length: 32 Bit
The PDO Mapping Entry in the Object Dictionary allows one to determine which Application Data is mapped in the PDOs
Beckhoff CANopen Bus Couplers generate a Default Mapping autononomously
CANopen
101
Fieldbus Networks WorkshopBECKHOFF
CANopen: Variable PDO Mapping
6TTTh TTh Object A
6ZZZh ZZh Object G
6YYYh YYh Object F
6XXXh XXh Object E
6WWWh WWh Object D
6VVVh VVh Object C
6UUUh UUh Object B
Object Dictionary
Object G Object EObject APDO_1
Index Sub Object contents01h
02h
03h
1ZZZh
1ZZZh
1ZZZh
6TTTh TTh 8
6ZZZh ZZh 16
6XXXh XXh 8Map
ping
Obj
ect
Appl
icat
ion
Obj
ect
Variable PDO Mapping allows one to select which Application Data is mapped in the PDOs
CANopen
102
Fieldbus Networks WorkshopBECKHOFF
CANopen: Service Data Objects (SDO)
SDO Server
Node n-1 OD
ODNode n OD
SDO Client
Peer-to-Peer Communication
DataID 1DataID 2
• SDOs are used to read or write data to the servers object dictionary
• Typically used acyclically, but may be used for (slow changing) process data as well
CANopen
103
Fieldbus Networks WorkshopBECKHOFF
CANopen: Object Dictionary Access via SDO
Index Subindex Description Value
Object Dictionary
Byte 0 Byte 1-3: Multiplexor Byte 4-7: Data
Command 16-bit-Index 8-bit 1-4 byte parameterSpecifier Subindex data
• The SDO contains the address information for the object dictionary: index and subindex
• SDO equivalent in DeviceNet: Explicit Messaging
CANopen
104
Fieldbus Networks WorkshopBECKHOFF
CANopen: Predefined PDO Identifiers
MasterRPDO_1_MRPDO_2_M
TPDO_1_MTPDO_2_M
RPDO_3_MRPDO_4_M
TPDO_3_MTPDO_4_M
Slave XTPDO_1_XTPDO_2_X
RPDO_1_XRPDO_2_XSlave YTPDO_1_YTPDO_2_Y
RPDO_1_YRPDO_2_Y
• Nodes derive Identifier set from their node ID
• with these identifiers Master/Slave connections are established
CANopen
105
Fieldbus Networks WorkshopBECKHOFF
CANopen: PDO Linking• If devices shall communicate directly (without a relaying master), Identifiers have to be adapted (configured)
• This is as well the case if several nodes shall listen to the same PDO
TPDO_1_YTPDO_2_YRPDP_1_YRPDO_2_YRPDO_3_Y
RPD
O_1
_XR
PDO
_2_X
TPD
O_1
_XTP
DO
_2_X
Device X
RPDO_1_ZRPDO_2_ZRPDO_3_ZTPDO_1_ZTPDO_2_Z
Device Z Device Y
CANopen
106
Fieldbus Networks WorkshopBECKHOFF
CANopen: Feature List
Medium Access (CAN Arbitration) + Topology: see DeviceNet !
Up to 512 Transmit-PDOs and up to 512 Receive-PDOs
Asynchronous and synchronous PDO transmission
One Default-Server-SDO, up to 127 Server-SDOs
Up to 128 Client-SDOs
Boot-up Message and Heartbeat Message
Emergency and SDO Abort Message
Time-stamp message
NMT Slave state machine
CANopen
107
Fieldbus Networks WorkshopBECKHOFF
Lightbus: Overview
1..2 ms (there are applications with 67 µs)Typical Cycle times
CDL concept allows one to distinguish 8 prioritiesPriorities
CRCError Detection
4 Bytes Process DataFrame Length
POF: 40m between two slaves; 300m with HCS FibresNetwork expansion
1 Master, up to 254 slavesNode Hierarchy
RingTopology
Plastic Fibre Optics (PMMA); 2,5 MBit/sTransmission Media, Baudrate
Node AddressingAddressing
Master/Slave (Polling) Medium Access Control Method
Developed by Beckhoff in 1989. Still one of the fastest systems aroundBackground
Lightbus
108
Fieldbus Networks WorkshopBECKHOFF
M1400Lightbus module, 32 x digital I/O
M2400Lightbus module, 16 x digital I/O,max. 4 x analog outputs
M3000Absolut Encoder with Lightbus interface,24 Bit, 4096 steps/revolution
M3120Lightbus module, 4 channelIncremental Encoder interface
M63xxOperating panels with Lightbus interface
BK2000Lightbus Coupler,Bus Terminals
BC2000Lightbus Controller withintegrated IEC 61131-3
AX20xx-B200Compact digitalservo drive withLightbus interface
TwinCATSoftware-PLC/NC
FC2001/02PCI inter-face card
C1220ISA inter-face card
C1300VME inter-face card
C1120S5 inter-face card
Lightbus: System Overview
Lightbus
109
Fieldbus Networks WorkshopBECKHOFF
Lightbus: Topologyfiber optic ring with 45m (150 ft) distance between nodes
online fiber optic media diagnosticserror location indicationsyncronization commandsNO address switch settinglogical addressing possiblevarious vendors for encoders, drives, IO devices
Lightbus
110
Fieldbus Networks WorkshopBECKHOFF
Lightbus:Frame Format
deterministic communication in 25µs “frames”
fastest update time 25 µs for 4 interrupt channels
7 different communication cycle times for modules down to 50µs
modules freely configurable in CDL’s (communication description lists) for communication timing
Lightbus