
Getting started with CANoe CANopen Version 1.0 02/05/2004 Application Note AN-ION-1-1201 Author(s) Kai Schmidt Restrictions Public Document Abstract This application note describes the main constituents of the CANoe CANopen option in Version 3.0 or higher. How to get started is also described in principle. Table of Contents 1.0 Overview .......................................................................................................................................................................... 1 2.0 CANoe.............................................................................................................................................................................. 1 2.1 Hook DLL .........................................................................................................................................................1 2.2 CANopen NodeLayer DLL ...............................................................................................................................2 2.3 CANopen Scanner ...........................................................................................................................................2 3.0 ProCANopen .................................................................................................................................................................... 3 4.0 Sample Project Creation .................................................................................................................................................. 3 4.1 Principal Mode of Operation ............................................................................................................................3 4.2 Development of a CANopen Network..............................................................................................................4 4.2.1 Phase 1: Project planning of the Network........................................................................................................4 4.2.1.1 Specification of the Network Structure.............................................................................................................4 4.2.1.2 Configuration of the Network ...........................................................................................................................5 4.2.2 Phase 2: Generation ........................................................................................................................................6 4.2.2.1 Batch Controlled Generation............................................................................................................................6 4.2.2.2 Generation with PCO2CANoe .........................................................................................................................7 4.2.3 Phase 3: Simulation .........................................................................................................................................7 5.0 Contacts ........................................................................................................................................................................... 8 1.0 Overview In this application note, the essential components and enhancements of the CANopen option are described with respect to the basic tool CANoe. Using an exemplary project, the procedures for and particularities of working with the CANoe CANopen option will be described. Emphasis is on the ProCANopen and CANoe tools. 2.0 CANoe The main task of CANoe in connection with the CANopen option is the simulation and comfortable analysis of CANopen networks. For this, the basic software contains the following enhancements, among others. 2.1 Hook DLL The hook DLL enables a CANopen-specific, textual display of the received data in the CANoe trace window. The trace window can thus be configured freely by users (see ). Copyright © 2004 - Vector Informatik GmbH 1 Getting started with CANoe CANopen Figure 1: Trace Window of the CANoe Environment 2.2 CANopen NodeLayer DLL With the CANopen NodeLayer DLL, the simulation of CANopen nodes (in the form of CAPL programs) is simplified. The DLL is configured via CAPL functions and enhances the nodes in the simulation setup with the following functionality: • Management of the complete object directory CAPL Node in • SDO and PDO support Simulation Setup Window • Network and configuration management CANopen Nodelayer DLL CAN Bus Figure 2: CANopen NodeLayer 2.3 CANopen Scanner The CANopen scanner can be added to the CANoe measurement setup. It evaluates the received CAN messages and displays the active nodes on the network. Figure 3: CANopen Scanner Application Note AN-ION-1-1201 2 Getting started with CANoe CANopen 3.0 ProCANopen The scope of delivery of the CANopen option also includes the project planning tool ProCANopen. Using this tool, CANopen networks can be created and managed. In addition, direct access to the object directory of CANopen nodes connected to the network is possible. The interface between the network project planning in ProCANopen on the one hand and the simulation in CANoe on the other hand is formed by the generators listed below, which are a part of ProCANopen. • CANopen CAPL generator • CANopen Panel generator • CANopen CIF generator 4.0 Sample Project Creation In a few steps, the operating concept and procedure for project creation using the CANopen option shall be explained. 4.1 Principal Mode of Operation Phase Work Procedure Produced Files ProCANopen Defining the Network Design PhasePhase 1: 1: Project Project Planning Planning CAN Database DCF-Files Configuring the Network PhasePhase 2: 2: Generation Generation Generation Process CAN Database + CAPL-Generation Environment variables CAPL-Files Panel-Generation Redesigning the Network Panels CIF-Generation CIF-File CANoe Phase 3: Simulation Phase 3: Simulation Simulation and Analysis Import of the Network Figure 4: Process of Network Development Application Note AN-ION-1-1201 3 Getting started with CANoe CANopen In the development of a CANopen network with the CANoe CANopen option, in phase 1 the design and subsequent configuration of the network occurs in ProCANopen. Here, the required network nodes are added step by step. The corresponding EDS files must be present for this. The configuration of the network, for example, the set-up of a NMT master, occurs dialog-based. On the basis of the data generated in phase 1, all files required for simulation are generated automatically during the generation process (phase 2): • CAPL Programs: For each network node, a CAPL program is generated that supports the functionality previously defined in ProCANopen. • Panels: During the simulation in CANoe, panels form the interface to users. They serve to control the simulated devices and to display process factors. For a quick simulation start with the CAPL programs created by the CAPL generator, node-specific panels are created by the panel generator automatically. • CIF File: The CIF file can be imported for easy and quick project creation in the CANoe simulation environment. When simulation in CANoe is complete, errors or weaknesses detected during simulation can be corrected, and passed through the process a second time to be checked. 4.2 Development of a CANopen Network The following basic conditions are specified for the exemplary development of the CANopen network: A network should be developed that includes a CANopen master and 2 CANopen slaves. The master should monitor the slaves during ongoing operation via "node guarding." The slaves represent two I/O devices with set-up communication relationships. Whether and how the slaves are configured by the master on "boot-up" should not be important for this example. 4.2.1 Phase 1: Project planning of the Network Open CANoe simulation tool and then start ProCANopen. Note: using the CANopen toolbar, ProCANopen can be started directly from the CANoe environment. 4.2.1.1 Specification of the Network Structure After right-clicking on the node contained in the network, a context-sensitive menu appears from which you select the "Configuration" command in order to open the configuration dialog for the selected network node. On this dialog, make the following settings to set up the CANopen master: Dialog element Description "Name“ input box Entry of the node name "Node-ID“ input box Entry of a network-wide unique node number for the node. "Device type..." button Opens a dialog on which all available devices are listed in the form of EDS files. Here, select a master device -- for example "mcs2011m.eds" by Schleicher -- and then close the device selection with the "OK" button. Close the configuration of the master by clicking the "OK" button. Then add two additional nodes to the network using the command "Edit | New node." These network nodes represent two CANopen slaves that can be configured in a manner similar to that of the CANopen master. For assigning the device, use two I/O devices with digital inputs and outputs (e.g. "RIOK8IO.eds" by Schleicher). Your project should now look like the one shown in Figure 3. Application Note AN-ION-1-1201 4 Getting started with CANoe CANopen Figure 5: Project Structure Save the project using the command "File | Save." 4.2.1.2 Configuration of the Network In the following steps, the configuration of your CANopen network occurs. First, set up the node monitoring mechanism "node guarding" for the CANopen master. To do this, right-click on the master device and select the "Device access" command from the context-sensitive menu that appears. On the
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages8 Page
-
File Size-