Configuring, Monitoring, Analyzing, Testing and Developing of CANopen Networks

CANopen Magic
Minimize Tool Costs

Web Pages
on CANopen Magic
by ESAcademy

Minimizing Tool Costs for Development,
Test, Configuration and Maintenance
of CANopen Applications

Article / White Paper by PEAK System Technik about PCANopen Magic

On one hand newcomers to CANopen are overwhelmed by the vast variety of software and hardware tools available that help with the development of CANopen nodes. On the other hand they also quickly realize that depending on the supplier these tools can come at a hefty price – and that additional options or products are required for the different tasks of development, test, configuration and maintenance of CANopen applications.

A possible explanation is that the typical supplier is in the CAN business for several years and the support for a higher-layer protocol becomes an option for the existing product or product line, thus requiring the customer to buy some of the “classic” products plus the options or add-ons for CANopen.

With PCANopen Magic there is now a different kind of tool: an affordable stand-alone all-in-one CANopen tool that covers all the basic needs for a CANopen development – from development via test to in-the-field maintenance. PCANopen Magic supports all PEAK PC CAN interfaces and the SYSTEC USB module.

PCANopen Magic Main Window

Development

Typical tasks during CANopen product development include tracing/monitoring the CANopen network traffic and stimulating nodes with both process and service data. PCANopen Magic provides a CANopen aware trace display that interprets messages such as SDO (Service Data Objects) accesses or NMT (Network Management) services. Figure 2 shows a screen shot of a typical trace display. In this case the SDO uploads requesting to read the Object Dictionary entry [1008,00] from node 65 (0x41) are clearly visible, including all segments (a total of 20 bytes were at that Object Dictionary entry, requiring a segmented transfer of the data).

The other required feature during development is the stimulation of either SDOs or PDOs (Process Data Objects), which are both supported by PCANopen Magic. SDO accesses to the Object Dictionary can be made by simply specifying the Index and Subindex of the Object Dictionary entry to be addressed. No EDS (Electronic Data Sheets) are required and any Object Dictionary entry can be accessed.

The maximum data length for a single Object Dictionary entry is virtually unlimited and entries can be read from or written to a file. This is especially helpful for developing and testing CANopen devices with boot-loaders.

 

Development Test, Production Test

The functionality required during the extensive test of a CANopen product can be quite different from the functionality used during development. Here the number one feature required is programmability of test sequences. Several sequences of test messages or accesses must be executed, sometimes over-and-over with slight variations.

In PCANopen Magic programmability is realized via the proven “command line executable”. A command line executable allows an easy integration into a variety of other tools. The simplest of all is using a command prompt batch file which allows specifying an unlimited variety of suitable sequences to be executed. Command sequences can be stored in ASCII command files that can be passed to the command line version as follows:

C:\tstpcomagic @test65.cmd

“PCOMagic” is the command line version and “test41.cmd” is a command file testing node 65. An example for the contents of such a command file would be the following listing.

HARDWARE(PEAKPARALLEL,0x378,7,EPP,125)
NMT(0,PREOPERATIONAL)
SDODOWNLOAD(65,0x6200,1,0x55)
SDODOWNLOAD(65,0x6200,1,0xAA)
SDODOWNLOAD(65,0x6200,1,0x55)
SDODOWNLOAD(65,0x6200,1,0xAA)

In this case the command file initializes the CAN interface and sends the Network Management Master message that sends all nodes into the Pre-operational state. SDO Downloads are write accesses to Object Dictionary entries of a specific node. In this example a blinking pattern gets written to the Object Dictionary entry of node 65 that sets digital outputs.


Configuration

For the configuration of a single or multiple CANopen nodes many sequences of SDO accesses need to be executed. Although PCANopen Magic is not really meant for the configuration of entire plug-and play networks, it is suitable for configuration of single nodes.

Once again the “command line executable” can be used to create command files with configuration sequences that need to be executed frequently. Figure 3 shows a screen shot of the command window (this was running on Windows 2000) in which PCANopen Magic was started with the command file “init41.cmd” that initializes node 41.

Maintenance

Like all other tasks above, in-the-field maintenance also has some specific needs. One of them being a network scan: detect which nodes are connected and what their current status is.

PCANopen Magic features a “Network Overview” window that not only shows a table of all detected nodes, it also displays all the essential information for each node found. For each node found, the columns can display the node ID, the current NMT status, the device type, the error register and the entire identification record (vendor ID, product ID, version, serial number).

During a field test such a scan can quickly reveal if all required nodes are present. And once again additional checks and tests can be performed by either stimulating single PDOs and SDOs or by 
executing test sequences based on the command line version.

Figure 4 shows a screen shot of the Network Overview window. In this example a total of 3 nodes were found on the network.

Summary

Designed to be an entry-level tool for debugging and testing CANopen networks, PCANopen Magic supports all the major functions required during the ENTIRE product life-time cycle - from development to in-the-field maintenance.


Go to ESAcademy's web pages

Related Web Pages
Do you want or need to know more about CANopen?
How about some reading?
www.CANopenBook.com
MicroCANopen Plus is a small footprint implementation of CANopen, source code included.
www.MicroCANopen.com 
Upcoming Events