1.0  Overview

This application note is a step-by-step tutorial to introduce the basic process of developing a simple CANoe application. Used as a guide, the focus is to help the beginning user get up the curve quickly. In addition to the tutorial, a short set of helpful CANoe topics is also presented.

2.0  First CANalyzer, Then CANoe

Since CANalyzer is used as a portion of the foundation for CANoe, it is quite beneficial to learn the basic features and operation of CANalyzer first before learning CANoe. The Vector Application Note “Quick Introduction to CANalyzer” (see Section 8, "Additional Resources") is a helpful guide for those also beginning with CANalyzer.

3.0  Creating a CANoe Application

In this step-by-step tutorial, we will develop a simple application to primarily teach the CANoe development process.

3.1   Create a New Directory

1)   Before starting up CANoe, create a new directory called "new1" to contain the new configuration.
Consider locating this directory close to the CANoe application directory.

2)   Start CANoe and use the main menu to go to File New Configuration. A prompt appears to select a template. Choose the one that fits the situation, or if you are not sure, select the default template.

3)   Go to File Save Configuration As. Name the file "new1.cfg" using a path to the new directory name. Then click [OK].

4.0  CANoe Development – Six Step Process

The creation of a new CANoe application involves six key steps.

1)   Create a Database

2)   Create Nodes

3)   Associate the Database

4)   Create Panels

5)   Place the Panels into the CANoe Environment

6)   Create Node Behavior

4.1   Create a Database

4.1.1   Create the Database File

1)   On the CANoe toolbar, click the CANdb++ Editor button (the one with 4 interconnected red nodes) to launch the integrated database tool.

2)   In CANdb++ Editor, go to File Create Database. A prompt appears to select a template. Choose the one that fits the situation, or if you are not sure, select the empty template. For this tutorial, we will select the empty template.
3)   Save the file as a DBC file called "new1.dbc" in the directory just created.

4.1.2   Define the Network

If the empty template is selected, no additional network definitionneed to be defined. However, if one of the other templates is selected, follow these steps to definthe network properties (the properties list is different in each template):

1)   Select 'Networks' from the tree view at the left.

2)   Right-click on ‘new1’ and select Edit Network....

3)   On the Attributes tab, set the attribute values for this network.

4.2   Create the Database Nodes

1)   Select "Network Nodes" from the tree view on the left. Right click on it and select New. Name the first node "AAA". Then, click [OK].

2)   Again, point at 'Network Nodes' in the tree view at the left. Right-click on it and select New. Name the second node "BBB". Then, click [OK].

3)   Save the database via File  Save.

4.3   Creating Database Messages

1)   Select "Messages" in the tree view on the left, right-click on it, and select New.

2)   Name the first message "aaaMsg".

3)   Select CAN Standard (11 bit) in the Type: drop down menu and insert "1AA" as the message Identifier.

4)   Set the DLC (Data Length Code) to 2, for 2 bytes of data in the message.

5)   Select the Transmitters tab and click [Add] to add a transmitter to send our message. Select the network node "AAA" and then click [OK].

Now we need to put signals in our message.

4.3.1   Creating Database Message Content        Create an Input Switch – aaaMsg (switch_1A)

Signals are variables that occupy the data field space of a message. Our input switch signal will indicate whether it is on or off in our first message. To do this, proceed as follows:

1     In the CANdb++ Editor, select “Signals" in the tree view on the left. Right-click on it and select New.

2     For the signal Name, enter "switch_1A".

3     Enter "1" for Length (bit) of the message.

4     For Byte Order, select either "Intel" or "Motorola". (Depends on the micro being used)

5     Select "unsigned" for the Value Type.

6     Make sure to set "Minimum" to 0 and "Maximum" to 1.

7       Now, switch to the Messages tab and click the [Add] button. Select our message (the only one there) and click [OK]. Click [OK] to exit the dialog.

Next, we want our Boolean 0 and 1 to represent the switch being either "on" or "off". To do this,

1)   Select View  Value Tables.

2)   Right-click anywhere on the empty page and select New.