CANopen Hands-On Tutorial - Mbed
[Pages:36]Embedded Systems Academy CANopen Hands-On Tutorial
CANopen Hands-On Tutorial
An Introduction to CANopen
using
CANopen Magic ProDS Eval
Presented by Olaf Pfeiffer EMBEDDED SYSTEMS ACADEMY
CANopenHOT July 2005
Slide 1
Prerequisites
All hands-on examples in this tutorial use the program ? CANopen Magic ProDS Eval
This tool allows simulation, configuration, analyzing and testing CANopen networks ? No hardware required ? All CANopen communication is simulated
Download and install from ?
CANopenHOT July 2005
Slide 2
Embedded Systems Academy CANopen Hands-On Tutorial
Our CANopen Book:
Embedded Networking with CAN and CANopen
CANopenHOT July 2005
Slide 3
Published by Annabooks / RTCBooks
3 Parts
? Using CANopen Introductory level up to system integration
? CANopen Engineering Developing CANopen nodes
? CANopen Reference Quick access to all info required by integrators and developers
Contents
1. Physical Settings ? Physical layers ? Message basics
2. Network Nodes ? Unique node IDs ? Default connection set
3. Boot-up, Heartbeat Network Management (NMT) ? Boot-up message ? Heartbeat messages ? NMT state machine ? NMT Master message
CANopenHOT July 2005
Slide 4
4. Object Dictionary ? Organizing the data communicated ? Electronic Data Sheets ? Service Data Objects
5. Process Data Objects (PDO) Communication Parameters ? Message IDs and PDO Linking ? PDO Triggering
6. PDO Mapping Parameters ? PDO Contents
7. Device Configuration File ? Save and Restore Configuration
8. Advanced Features
Embedded Systems Academy CANopen Hands-On Tutorial
CANopen Hands-On Tutorial ? Part 1
Physical Settings
Network physical layer, message basics,
communication bit rates
CANopen is optimized for CAN
CANopen is `open' to be used on a variety of networking technologies ? CANopen on Ethernet - Ethernet- ? CANopen on UART, I2C, LIN -
However, it is optimized to be used on Controller Area Network (CAN) ? Using a maximum of 8 data bytes ? Using message identifiers 0-1023
CANopenHOT July 2005
Slide 6
Embedded Systems Academy CANopen Hands-On Tutorial
CANopen Suitable Physical Layers
High-end PC or Workstation
PC or Workstation
High-end controller, Embedded PC or PLC
16 to 32 bit
Ethernet
8bit
CANopenHOT July 2005
Slide 7
MicroMessaging
Plant Management
Plant Control
Process Control
CAN
Controller Coupler
Sensors Actuators
What's in a single message?
Identifier 11 bits
Data bits (0..8 Bytes)
Control and security 36 bits
CANopenHOT July 2005
Slide 8
In CAN, a single messages is kept short and only contains up to 8 data bytes
Benefits:
? There can be many messages per second (rule over thumb: up to 10,000 per second at 1 Mbit, worst case of 20,000 per second)
? No single message can occupy/block the network for a long time
? Best for small sensors and actuators (I/O modules, encoder, push buttons, temperature,...)
Concept: send less data ? more often
Embedded Systems Academy CANopen Hands-On Tutorial
CANopen Network Speeds
When used on CAN, the specified networking bit rates are
? 10 kbps
? 20 kbps
? 50 kbps
? 125 kbps ? 250 kbps ? 500 kbps
Each of these can be added to the hardware settings of CANopen Magic ProDS Eval
? 800 kbps
? 1000 kbps
CANopenHOT July 2005
Slide 9
NOTE: CANopen Magic ProDS Eval Does not simulate network speed, available bandwidth only depends on the performance of the PC on which the simulation runs
Hands-On: Getting started
Start CANopen Magic ProDS Eval
CANopenHOT July 2005
Slide 10
Select `None' for the hardware and pick any network
? Networks are simulated "virtually" within the program. There is no "live" network traffic
Embedded Systems Academy CANopen Hands-On Tutorial
CANopen Hands-On Tutorial ? Part 2
Network Nodes
Unique Node IDs, message IDs used by nodes
Default Connection Set
Layout with CAN physical layer
Main network trunk with termination resistors ? Drop lines only permissible if bit rate is 500kbps or below
Each node must have a unique node ID ? In the range of 1 to 127
Maximum length depends on network speed ? Example: about 250m with 250kbps
CANopenHOT July 2005
Slide 12
Terminator
Trunk Line
Node Node
Tap Tap
Tap
Node
Drop Line Node
Node
Node
Node
Node
Terminator Tap
Node Node Node
Node
Embedded Systems Academy CANopen Hands-On Tutorial
Hands-On: Network Configuration
From the main menu, select Options ? Configure Network
Or press the Network Configuration tool button
CANopenHOT July 2005
Slide 13
Hands-On: Add nodes to the simulation
In the Network Configuration window, click on the `Add Node" button
Add two digital I/O nodes to the system
CANopenHOT July 2005
Slide 14
1. Node ID `1'
2. Name `Digital I/O'
3. EDS File `Peak Digital 1.eds' from EDS directory
4. Add `2' nodes
5. Choose the simulated product `PCAN MicroMod Digital 1'
6. Click the `OK' button
Embedded Systems Academy CANopen Hands-On Tutorial
Hands-On: Run network simulation
Open Trace window, to see simulated network traffic ? From the main menu, select View ? Trace
To run the simulation, go to the main window and select the simulation tab
Click on `Run' to run the simulation of individual nodes or on the green triangle to run all nodes
Run all nodes
CANopenHOT July 2005
Slide 15
Simulation tab
Hands-On: View first messages
Look at the Trace window Each node produced 2 messages
? Bootup (701h and 702h) ? Emergency Clear (81h and 82h)
CANopenHOT July 2005
Slide 16
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- python dictionaries university of michigan
- python lesson 4 dictionaries
- student database challenge problem
- lecture 13 hash dictionaries
- canopen hands on tutorial mbed
- tkinter guis in python
- python dictionary rxjs ggplot2 python data persistence
- chapter 2 lists arrays and dictionaries
- python dictionaries verbs index