Search tips

apple banana
Find rows that contain at least one of the two words.

+apple +juice
Find rows that contain both words.

+apple macintosh
Find rows that contain the word 'apple', but rank rows higher if they also contain 'macintosh'.

+apple -macintosh
Find rows that contain the word 'apple' but not 'macintosh'.

+apple ~macintosh
Find rows that contain the word 'apple', but if the row also contains the word 'macintosh', rate it lower than if row does not. This is "softer" than a search for '+apple -macintosh', for which the presence of 'macintosh' causes the row not to be returned at all.

+apple +(>turnover >strudel)
Find rows that contain the words 'apple' and 'turnover', or 'apple' and 'strudel' (in any order), but rank 'apple turnover' higher than 'apple strudel'.

Find rows that contain words such as 'apple', 'apples', 'applesauce', or 'applet'.

"some words"
Find rows that contain the exact phrase 'some words' (for example, rows that contain 'some words of wisdom' but not "some noise words").

By continuing to use this site you agree to the use of cookies. For more information and to find out how to change this click here. Accept Cookies
Please enable cookies in your browser for this website.
Advanced search

How to Send a CAN Frame or CAN Signal with CANape

Last updated: 2020-01-28

How can I send a CAN frame or a CAN Signal with CANape?


This can be done through the following steps. In CANape open Tools | Function Editor and define a New Project function.

Example 1:

The following example defines a frame with ID 0x100 and the data bytes filled with 0x01. The frame is sent out on the CAN bus with device ExampleDevice_send.

Function SendExchangeFrame ()
   ExampleDevice_send.SendMessage(0x100, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01); 
   return ;

More details to the function SendMessage() can be found in the CANape help.

Example 2:

The next example shows a function for an existing CAN device ExampleDevice_send with description file (DBC file) in which the signals (SendSignal_01; SendSignal_02) are described. The signals shall be sent out to the CAN bus with a fixed value of 0x10 for SendSignal_01 and 0x20 for SendSignal_02.

Function SendExchangeSignal ()
   ExampleDevice_send.SendSignal_01 = 0x10;
   ExampleDevice_send.SendSignal_02 = 0x20; 
   return ;

Example 3:

A further use case can be a XCP to CAN gateway. The signals channel1 and channel2 from the device XCPSim should be routed to the signals XCPtoCAN_Sig_01 and XCPtoCAN_Sig_02 of the CAN device XCPtoCAN_V01.
Here it is important to have matching data types of the XCP and the CAN signal.

Function XCPtoCAN ()
  XCPtoCAN_V01.XCPtoCAN_Sig_01 = XCPsim.channel1;
  XCPtoCAN_V01.XCPtoCAN_Sig_02 = XCPsim.channel2;

  return ;

As a next step open Start | Measurement Configuration, go to Functions and insert a Measurement function. Then Select your just created Project functions SendExchangeFrame();or SendExchangeSignal() or XCPtoCAN().

Via Measurement mode you can define when the Measurement function is called and thus when the CAN frame is sent. In case of routing from XCP signals to CAN it makes sense to use the same measurement mode that the XCP signal are using.

Article Options
Views: 268