Peak CANopen User manual

CANopen Firmware
for PCAN-MicroMod
User Manual

CANopen Firmware for PCAN-MicroMod
Products taken into account
Product Name Model Item Number
CANopen Firmware for PCAN-MicroMod
Last update
May 19, 2005
Initial release
Windows® and MS-DOS are registered trademarks of Microsoft Corporation in the
United States and other countries.
All other product names mentioned herein may be the trademarks or registered
trademarks of their respective companies. Furthermore, "™" and "®" are not
mentioned in each case in this manual.
© 2005 PEAK-System Technik GmbH
PEAK-System Technik GmbH
Otto-Röhm-Straße 69
D-64293 Darmstadt
Germany
Phone: +49 (0)6151-8173-20
Fax: +49 (0)6151-8173-29
www.peak-system.com
info@peak-system.com
2

CANopen Firmware for PCAN-MicroMod
Contents
1Outline and Introduction 4
1.1 About the CANopen Implementation 5
1.2 Scope of Delivery 5
1.3 Hardware and Software Requirements 6
1.4 Terminology and Abbreviations 6
2Product and Firmware Selection 11
2.1 Device Summary 11
2.2 Loading the Firmware into a MicroMod 12
2.3 Processing Times and Performance 13
3Hardware Features 15
3.1 Status and Error LEDs 15
3.2 Boot Mode Selection with Solder Bridges 15
3.3 Assignment of Bit Rate and Node ID 16
3.4 Status Info on Serial Port 17
4CANopen Implementation 19
4.1 Product Identification 20
4.2 Default Connection Set 21
4.3 Default PDO Mapping 22
4.4 Input Processing 23
4.5 Output Processing 24
4.6 Heartbeat Production and Consumption 25
4.7 Storing Parameters 25
Appendix A Object Dictionary Reference 27
A.1 Overview 27
A.2 Communication Profile Entries 29
A.3 Device Profile Entries 43
3

CANopen Firmware for PCAN-MicroMod
1Outline and Introduction
CANopen is a popular industrial communication standard used in
many embedded networking applications such as mobile machi-
nery, industrial automation, medical equipment and many more.
The standards including all the device and application profiles are
maintained by the CiA, the CAN in Automation User’s and Manufac-
turer’s Group.
One of the main reasons for the popularity of CANopen is its flexi-
bility towards customization. CANopen provides a set of standar-
dized communication functions of which only a little percentage is
mandatory. When designing a network for a specific application,
engineers and designers can choose which functions are needed
and can even add custom functionality where required.
Nevertheless, the standardized CANopen device and application
profiles available still enable off-the-shelf, plug-and-play usage of
CANopen devices. System designers that need to add standardized
sensors or actuators such as generic I/Os, encoders, drives and
motors can choose from a wide variety of products from numerous
manufacturers.
Although this user manual explains all the CANopen features imple-
mented by the software provided, it still assumes that the reader
has some basic knowledge about Controller Area Network (CAN)
and CANopen. If in doubt, the CAN and CANopen specifications or
books like “Embedded Networking with CAN and CANopen”
(www.canopenbook.com) should be consulted.
Note: This user manual only contains information about the
CANopen firmware to be used with PCAN-MicroMod. For
detailed information about the hardware please refer to the
extra manual.
4

CANopen Firmware for PCAN-MicroMod
1.1 About the CANopen Implementation
The PCAN-MicroMod I/O modules fall into the category of off-the-
shelf CANopen generic I/O devices. The CANopen software package
for these modules implements the CANopen standard DS301
“Application Layer and Communication Profile” version 4.02 and
specifically the device profile DS401 – “Device Profile for Generic I/O
Modules” version 2.1. By loading the appropriate firmware into the
modules, they can be directly used as standardized CANopen
generic I/O modules.
The EDS files (Electronic Data Sheet) provided along with the firm-
ware were tested with their corresponding module for CANopen
conformance using the official CANopen conformance tests.
1.2 Scope of Delivery
The CANopen firmware package is license free for all users of
PCAN-MicroMod and can be downloaded from
www.peak-system.com.
The ZIP file available online contains the latest version of the
firmware (Fujitsu hex file format), the EDS files, and the user
manual in PDF format. When the ZIP file is unpacked, one directory
will be created for each product version. An additional “DOC”
directory contains the latest user manual.
Directory Name Contents
0_MicroMod Firmware and EDS for generic MicroMod device
1_Digital_1 Firmware and EDS for motherboard Digital 1
2_Digital_2 Firmware and EDS for motherboard Digital 2
3_Analog_1 Firmware and EDS for motherboard Analog 1
4_Mix_1 Firmware and EDS for motherboard Mix 1
5_Mix_2 Firmware and EDS for motherboard Mix 2
DOC User manuals
5

CANopen Firmware for PCAN-MicroMod
1.3 Hardware and Software Requirements
The CANopen firmware is loaded into a PCAN-MicroMod using the
PCAN-MicroMod Evaluation Board. With the flash programming
utility, the hex files provided can be programmed.
In order to configure a MicroMod a generic CANopen Configuration
Tool with access to the CAN bus is required. We recommend the
software package PCANopen Magic Pro (www.canopenmagic.com)
with a PCAN-USB interface.
1.4 Terminology and Abbreviations
The following CANopen terms and abbreviations are used in this
manual without further explanation. Please refer to the CANopen
standards DS301, DS302 and DS401 or books like “Embedded
Networking with CAN and CANopen” for further explanation.
[xxxxh,yyh]
This syntax is used to indicate an Object Dictionary entry using
hexadecimal values. The first number ‘xxxx’ represents the Index
and ‘yy’ the Subindex.
Bit Rate
The default bit rates supported by many CANopen nodes are
1000 kbps, 800 kbps, 500 kbps, 250 kbps, 125 kbps and 50 kbps. The
Bit Rate can be changed using the [1F50h,03h] Object Dictionary
entry.
Boot up Message
After any reset, a CANopen node transmits its boot-up message.
The message (CAN) identifier used is 700h plus the node’s Node ID
number. The boot up message contains one data byte which is zero.
CANopen Manager
In a CANopen network the optional CANopen Manager typically
includes a NMT Master and a Configuration Manager. The NMT
Master is responsible for generating the NMT Master Message and
starting or stopping the network. The Configuration Manager keeps
6

CANopen Firmware for PCAN-MicroMod
track of all nodes connected and ensures that the connected nodes
are configured correctly.
Change-Of-State (COS)
Generic I/O modules typically monitor their inputs for changes.
CANopen nodes can be configured to only transmit this input data,
if a change was detected.
Connection Object Identifier, COB-ID
The COB-ID specifies the CAN message details used for a specific
connection. These include a (CAN) Message Identifier and typically
an enable/disable bit.
Default Connection Set
The default connection set determines which (CAN) Message
Identifier is used for which purpose in a CANopen network.
Typically (CAN) Message Identifiers are assigned using a base
identifier (such as 180h for TPDO1) and adding the Node ID to that
base identifier.
Emergency, EMCY
CANopen emergency messages have a default (CAN) Message
Identifier of 80h plus the Node ID of the node generating the
emergency. Emergency messages contain a CANopen specified
emergency code, the error register [1001h,00h] and a manufacturer
specific emergency code.
Event Time
For TPDOs the Event Time specifies the periodic time at which
TPDOs get transmitted. The Event Time is specified in multiples of
milliseconds and typically only used if the Transmission Type is set
to 255d/FFh.
Heartbeat Producer and Consumer
In CANopen the recommended function to monitor the health of
network nodes is to use the heartbeat mechanism. Each CANopen
node can individually produce a heartbeat message, using the
(CAN) Message Identifier 0700h plus the node’s Node ID. The
message contains a single byte representing the current NMT state
of the node (like Pre-Operational, Operational, Stopped). The
Heartbeat Producer time [1017h,00h] is specified in multiples of
7

CANopen Firmware for PCAN-MicroMod
milliseconds. CANopen nodes may have zero, one, or multiple
Heartbeat Consumers [1016h,xxh] that can be configured to monitor
heartbeats from other nodes. If a node looses a heartbeat
monitored, it typically transmits an emergency message and goes
back into the Pre-Operational NMT state.
Inhibit Time
For TPDOs that implement a COS detection, the Inhibit Time is used
to prevent back-to-back transmission of input data that changes
frequently. The Inhibit Time is selected in multiples of 100s of
microseconds and specifies how long a CANopen node must wait
before it may transmit a TPDO again. Note that many CANopen
implementations do not offer such a high resolution and the Inhibit
Time might get rounded up to milliseconds.
Index
An Object Dictionary entry is selected using a 16-bit Index and an 8-
bit Subindex.
Layer Setting Services (LSS)
A CANopen standard defining how layer services like bit rate and
Node ID can be changed during operation.
Manager / Master
In CANopen there are several Master and Manager services,
typically combined into the ‘CANopen Manager’.
Message Identifier
Any communication technology used for CANopen (default is CAN –
Controller Area Network) must be able to assign a Message
Identifier to any message transferred. CAN uses the default of an
11-bit Message Identifier. The Default Connection Set selects how
these Message Identifiers are used.
Network Management (NMT)
Each CANopen node internally implements an NMT Slave state
machine with the major states being Pre-Operational (used to
configure devices), Operational (actively producing and consuming
PDOs) and Stopped (limiting communication to Heartbeats). The
NMT Master Message is used to command nodes to switch their
NMT States.
8

CANopen Firmware for PCAN-MicroMod
NMT Master Message
The NMT Master (often integrated into the CANopen Manager) uses
the NMT Master Message to switch the NMT State of individual or
all nodes. The (CAN) Message Identifier of the NMT Master
Message is 0 (zero) with 2 data bytes.
Node ID
In any CANopen network each CANopen node must have a unique
Node ID in the range of 1 to 127. The Node ID can be changed using
the [1F50h,03h] Object Dictionary entry.
Object Dictionary, OD
Each CANopen node internally structures its data (configuration and
process data) into an Object Dictionary, similar to a look-up table.
Each entry can be identified by a 16-bit Index and an 8-bit Subindex.
The CANopen standards specify which entry is used for which
purpose. A configuration tool or CANopen Manager can access the
OD of any node using SDO communication.
PDO Communication Parameters
The PDO Communication Parameters include COB-ID, transmission
Type, Inhibit Time and Event Time. They specify the (CAN) Message
Identifier used and for Transmit PDOs the trigger events selected.
PDO Mapping Parameters
The PDO Mapping Parameters select the contents of a PDO. One or
multiple variables from the Object Dictionary can be combined into
a PDO.
Process Data Object, PDO
These (CAN) messages are used for communicating process data.
Receive Process Data Object, RPDO
Each CANopen node typically can transmit and receive PDOs. To
better distinguish between the services, the terms RPDOs and
TPDOs are used. Note that a TPDO of one node is a RPDO for all
other nodes that consume this PDO.
Service Data Object, SDO
These (CAN) messages are used for communicating
service/configuration data.
9

CANopen Firmware for PCAN-MicroMod
Subindex
An Object Dictionary entry is selected using a 16-bit Index and an 8-
bit Subindex.
Synchronized Communication
In synchronized communication mode (one of the Transmission
Types supported by CANopen), RPDO data received is not
immediately applied to the outputs, it is only applied after the SYNC
message was received. Synchronized TPDO data gets transmitted
right after the SYNC message is received.
Transmission Type
For each PDO the transmission Type can be selected as it is one of
the PDO Communication Parameters. The default transmission Type
is 255/FFh selecting Device Profile specific communication. In the
case of DS401 Generic I/O this means that both Event Time and
Inhibit Time are used.
Transmit Process Data Object, TPDO
Each CANopen node typically can transmit and receive PDOs. To
better distinguish between the services, the terms RPDOs and
TPDOs are used. Note that a TPDO of one node is a RPDO for all
other nodes that consume this PDO.
10

CANopen Firmware for PCAN-MicroMod
2Product and Firmware
Selection
All CANopen firmware versions for PCAN-MicroMod use the same
code basis and thus have very similar features. The main difference
is that the number of I/O channels made available matches the
hardware layout of the various motherboards.
2.1 Device Summary
The generic firmware version (device 0) is a superset, as it
implements the maximum number of I/O channels supported. This
version is intended for users that embed a MicroMod into their own
customized hardware.
All other firmware versions provided implement a specific subset
only enabling a limited number of I/O channels.
Digital input and output channels are one bit each. Analog inputs
have a resolution of 10 bits (value range of 0 to 03FFh/1023d) and
analog outputs a resolution of 8 bits (value range of 0 to 0FFh/255d).
The number of channels available with each version is listed in the
following table.
Device Name Number DI Number DO Number AI Number AO
0 MicroMod 8 7 8 4
1 Digital 1 8 4 0 1
2 Digital 2 8 4 0 1
3 Analog 1 8 (shared AI) 0 8 4
4 Mix 1 6 0 4 2
5 Mix 2 2 1 5 2
11

CANopen Firmware for PCAN-MicroMod
2.2 Loading the Firmware into a MicroMod
The hex files provided can be loaded into a MicroMod using the
PCAN-MicroMod Evaluation Board and the Fujitsu Flash 16
programming utility.
Follow these steps to upload the firmware:
1. Make sure that the power plug of the Evaluation Board is
disconnected.
2. Plug the MicroMod to be programmed onto the Evaluation
Board.
3. On the Evaluation Board set the programming jumper S5 to
“Prog” (2-3) to activate the on-chip boot loader.
4. Make sure that the DIP switches 1 and 2 are in the ‘off’
position.
5. Connect the serial connector “RS232” to the COM port of a
PC.
6. Start the Fujitsu Flash 16 programming utility.
7. Re-apply power to the Evaluation Board and press the reset
button to ensure the processor goes properly into the boot
mode.
8. Make the following settings in the Fujitsu Flash 16 utility:
•
•
•
Target Microcontroller: MB90F497/G
Crystal Frequency: 4 MHz
Hex File: one of the hex files implementing CANopen
9. Press the button “Full Operation”. The flash utility converts
the hex file, transfers it to the MicroMod and programs it
into the flash memory. The Flash 16 utility converts the hex
file, transfers it to MicroMod and programs it into the Flash
memory.
10. Once the process is completed, you can power down the
Evaluation Board, remove the MicroMod, and insert it into
the appropriate CANopen target hardware.
12

CANopen Firmware for PCAN-MicroMod
2.3 Processing Times and Performance
The CANopen firmware was optimized to provide the best possible
performance. Nevertheless, it should be noted that in any CANopen
based I/O system the flexible configuration potentially allows
configuring a module in such a way that its performance can vary
considerably.
As a result all timings given here are not ‘true’ worst-case timings.
For example, they can be delayed by higher-priority CAN activity,
such as an NMT Master message.
On a 1 Mbps CAN network, Event, Inhibit or synchronization cycle
times of down to 5 milliseconds may be used with the MicroMod
without any performance penalty. Even shorter times are possible
but their accuracy depends on the overall PDO configuration (how
many PDOs need to be that fast and how long are they).
2.3.1 Digital I/O Performance
Processing of all digital I/O happens on a 500 microsecond timer
basis. For best performance, digital I/O should always be mapped
into the first RPDO/TPDO as that is processed with a higher priority.
Digital outputs get applied to the outputs within one millisecond
after the triggering message was received. This is either the RPDO1
itself or the SYNC message if synchronized communication is used.
With the Change-Of-State (COS) detection a change in the digital
inputs is typically recognized within one millisecond and
immediately triggers the transmission of TPDO if COS
communication is used. However, process data received is
processed at a higher priority, potentially delaying the COS
detection.
2.3.2 Analog I/O Performance
Processing of all analog I/O happens on a 1 millisecond timer basis.
Each millisecond one analog input channel and one analog output
channel are updated. As a result, the overall delay in analog data
processing depends on the number of analog channels used.
13

CANopen Firmware for PCAN-MicroMod
With a system using 8 analog inputs each input is only updated
every 8 milliseconds. The COS and minimal delta detection typically
requires another millisecond to execute and detect potential
changes.
If a system has 4 analog outputs, then the delay in applying new
received values to the outputs can be up to 4 milliseconds.
2.3.3 Background Task and Change Of State
Detection
Processing of change-of-state and analog input delta detection,
heartbeat production and consumption and SDO request processing
is all handled in the main background task. As both CAN Receive
Interrupt and the 500 microsecond Timer Interrupt have a higher
priority, the background task can get interrupted and delayed at any
time.
The PEAK Status Register [1002h,00h] in the Object Dictionary
contains the current average execution time of a single background
loop. In operational mode, this number typically varies from 300 to
600 microseconds.
14

CANopen Firmware for PCAN-MicroMod
3Hardware Features
This chapter summarizes the most important PCAN-MicroMod
hardware features as far as the CANopen implementation is
concerned. For further hardware details like pin assignment and I/O
characteristics, please refer to the PCAN-MicroMod User Manual.
3.1 Status and Error LEDs
CANopen supports two LED indicators as specified by document
DR303 “Indicator Specification”. Concerning the CANopen
Firmware the RUN LED is located directly on the MicroMod. The
ERR LED is related to DO7.
3.2 Boot Mode Selection with Solder
Bridges
PCAN-MicroMod features a total of 5 solder bridges. The CANopen
implementations currently only use the solder bridge ‘4’ as a boot
mode indicator. If solder bridge ‘4’ is closed, after reset, PcAN-
MicroMod starts in a default boot mode using a CAN bit rate of
125 kbit and the CANopen node ID 40h/64d.
A “blinking” LED blinks with a frequency of 200ms.
A “single flash” LED flashes for 200ms and then is off for 1 second.
3.2.1 RUN LED
The RUN LED shows one of the following patterns:
On Node is in NMT state “Operational”
Blinking Node is in NMT state “Pre-operational”
Single Flash Node is in NMT state “Stopped”
15

CANopen Firmware for PCAN-MicroMod
3.2.2 ERR LED
The ERR LED shows one of the following patterns:
Off No Error
On Node is not yet initialized after reset or a fatal error occurred
Double Flash Heartbeat lost
3.3 Assignment of Bit Rate and Node ID
The CAN bit rate and CANopen node ID used cannot be changed by
hardware. They can be changed by writing specific values to an
Object Dictionary entry.
Using a CANopen configuration tool (such as PCANopen Magic),
writes to the Object Dictionary entry [1F50h,03h] can change the bit
rate and node ID.
Writing the 4-byte ASCII string “BPSx” changes the bit rate. ‘x’ must
be replaced with one of the following digits (LSS compatible
values):
Value Bit Rate
6 50 kbps
4 125 kbps
3 250 kbps
2 500 kbps
1 800 kbps
0 1000 kbps
Other bit rates are not supported.
Writing the 4-byte ASCII string “NIxy” changes the node ID. ‘xy’
must be replaced by a 2-digit hexadecimal number specifying the
new node ID, which must be in the range of 01h to 7Fh.
16

CANopen Firmware for PCAN-MicroMod
Note: The new settings will only be activated after the next
reset of the MicroMod.
Figure 1: Example for sending the 'NI' command to a node using
PCANopen Magic Pro
3.4 Status Info on Serial Port
If a MicroMod is used in hardware with serial line drivers (such as
the PCAN-MicroMod Evaluation Board), then some basic status info
can be displayed on a terminal. The communication settings are a
bit rate of 19200 bps, 8 bits, 1 stop bit, no parity.
Information is only sent during initialization and in case of errors.
Information displayed on the terminal includes the CAN bit rate, the
CANopen node ID and the number of input and output channels
used.
In case of a fatal error, an internal error number is displayed.
17

CANopen Firmware for PCAN-MicroMod
The following is a sample output:
PEAK MicroMod CANopenIA V1.01 Rev.204
J0-J4: 0
Regular Operation as MicroMod: 125kbps, node ID 32
Number of I/O: DI 1, DO 1, AI 8, AO 4
Initialization completed!
18

CANopen Firmware for PCAN-MicroMod
4CANopen Implementation
The implementation features the major CANopen services as
standardized in the CiA documents DS301 – “CANopen Application
Layer and Communication Profile” (V4.02) and DS401 – “CANopen
Device Profile for Generic I/O Modules” (V2.1).
In summary, these services are:
One SDO server giving CANopen Managers and configuration
tools access to the internal Object Dictionary (OD)
Heartbeat Producer functionality allowing the devices to produce
their individual heartbeat messages at a configurable rate
Heartbeat Consumer functionality with up to three channels
allowing the monitoring of up to 3 heartbeats
Although not recommended to be used, the Node Guarding
functionality is still implemented in order to be compatible with
legacy devices
Emergency Producer to inform other nodes over major error or
other emergency situations
Re-configuration of Node ID and bit rate during operation
Storage of configuration parameters in non-volatile memory
4 Receive Process Data Objects (RPDO) with dynamic
communication and mapping parameters – RPDO configuration
including CAN message ID used and contents mapped to the
RPDO can be changed during operation
4 Transmit Process Data Objects (TPDO) with dynamic
communication and mapping parameters – TPDO configuration
including CAN message ID used, message trigger mechanisms
and contents mapped to the TPDO can be changed during
operation
19

CANopen Firmware for PCAN-MicroMod
Up to 8 digital input channels with configurable polarity
inversion
Up to 7 digital output channels with configurable polarity
inversion and default output values for error situations
Up to 8 analog input channels with configurable minimal
difference (delta) detection
Up to 4 analog output channels with individual default output
values for error situation
4.1 Product Identification
There are several Object Dictionary (OD) entries implemented that
can be used to identify the PCAN-MicroMod and the specific
CANopen firmware used.
[1000h,00h] Device Type
32-bit device type info, see table below
[1008h,00h] Manufacturer Device Name
4-byte ASCII string, see table below
[1009h,00h] Manufacturer Hardware Version
4-byte ASCII string with the hardware version number
[100Ah,00h] Manufacturer Software Version
4-byte ASCII string with the firmware revision number
[1018h,01h] CANopen vendor ID
32-bit vendor ID of PEAK: 00000175h
[1018h,02h] Product Code
32-bit product code, see table below
[1018h,03h] Revision Number
32-bit revision number
20
Table of contents
Other Peak Computer Hardware manuals

Peak
Peak IPEH-002090 User manual

Peak
Peak PCAN-PCI/104-Express User manual

Peak
Peak PCAN-PC Card Series User manual

Peak
Peak PCAN-PC/104-Plus User manual

Peak
Peak PCAN-Chip USB User manual

Peak
Peak PCAN-PCI/104-Express User manual

Peak
Peak PCAN-MicroMod FD User manual

Peak
Peak PCAN-M.2 User manual

Peak
Peak Rider 2 User manual

Peak
Peak PCAN-miniPCIe FD User manual
Popular Computer Hardware manuals by other brands

US Robotics
US Robotics USR5410 installation guide

Z3 Technology
Z3 Technology FVXK-13A-RPS user guide

miniDSP
miniDSP DDRC-24 user manual

Cypress Semiconductor
Cypress Semiconductor MoBL CY62146ESL Specification sheet

EK-Quantum
EK-Quantum Velocity 2 D-RGB AM4 user manual

Diablotek
Diablotek F8025BU Specifications