CAPLQuickstart 2019
CAPLQuickstart 2019
V0.1 | 2019-04-17
Agenda
2
Before Getting Started
Difference between CANalyzer and CANoe
Diagnostics CANalyzer
Analysis
Ethernet
MOST
FlexRay
LIN
CAN
3
Before Getting Started
CANoe Interaction Layer
4
Before Getting Started
CAPL Support
5
Agenda
6
Visual Sequencer (GUI Based Programming)
General
u The Visual Sequencer allows you to create automated command sequences with the purpose of
> Stimulating the network
> Controlling applications
u In order to structure the individual steps, loops and conditional command blocks can be used, such as
> if, else if, end if
u Each sequence is shown in a separate window, and can be edited at any time, even while a
measurement is running.
7
Visual Sequencer (GUI Based Programming)
Features
8
Visual Sequencer (GUI Based Programming)
See Sample Configuration: CAN System Demo (CANsystemdemo.cfg)
9
Agenda
10
Brief Introduction to CAPL
General
Functional blocks based on CAPL (Communication Access Programming Language) can be created to
program
u Network node modules
u Special evaluation programs for individual applications
11
Brief Introduction to CAPL
CANoe
12
Brief Introduction to CAPL
CANalyzer
13
Brief Introduction to CAPL
CAPL Browser
Editor
Symbols and
Browser Tree Functions
(List of Events)
Compiler Messages
14
Brief Introduction to CAPL
Compiling
u In order to generate an executable program file from a CAPL program, the program must be compiled
with the CAPL compiler:
When you double-click the error description, the cursor in the Text Editor automatically jumps to the
point in the source code, where the error originated.
15
Brief Introduction to CAPL
Examining a CAPL Program
CAPL is a procedural language in which the execution of program blocks is controlled by events. These
program blocks are referred to as event procedures.
17
Brief Introduction to CAPL
Important Event Handlers (CAN)
on Start
{
u Start of measurement write ("Start of CANoe");
}
on message 0x123
{
u Message received write ("CAN Message 123");
}
on signal sigTemp
u Signal change {
write ("Signal Temperature");
}
on timer tmrCycle
u Time event {
write ("within cycle");
}
on key 'a'
u Key press {
write ("Key >a< pressed");
}
18
Brief Introduction to CAPL
On Key Procedures
19
Brief Introduction to CAPL
Data Types for CAN
20
Brief Introduction to CAPL
Variables in CAPL
u CAPL code:
int i = 100; // Declaration and initialization of an integer STATIC VARIABLES!!
char ch = 'a'; // Declaration and initialization of a character
float x; // Declaration of a floating point number
u Results:
21
Brief Introduction to CAPL
String Format Specifiers
Specifier Description
"%ld","%d" decimal display
"%lx","%x" hexadecimal display
"%lX","%X" hexadecimal display (upper case)
"%lu","%u" unsigned display
"%lo","%o" octal display
"%s" display a string
"%g","%f" floating point display. e.g. %5.3f means, 5 digits in total (decimal point inclusive)
and 3 digits after the decimal point. 5 is the minimum of digits in this case.
"%c" display a character
"%%" display %-character
"%I64d","%lld" decimal display of a 64 bit value
"%I64x","%llx” hexadecimal display of a 64 bit value
"%I64X","%llX hexadecimal display of a 64 bit value (upper case)
"
"%I64u","%llu" unsigned display of a 64 bit value
"%I64o","%llo" octal display of a 64 bit value
22
Brief Introduction to CAPL
Operators
* / Multiplication, division -
> >= Greater than; greater than or equal to returns TRUE or FALSE
>> << Bit shift to right or left 1 << 3 // yields 8 (0001 → 1000)
23
Agenda
24
Panel Creation and CAPL
Creating a Panel
u A signal can be mapped to each display or control as simple as drag and drop
u CANalyzer display only controls for signals
25
Panel Creation and CAPL
Creating System Variables
26
Agenda
27
Additional Information
Online Help File
28
Agenda
29
Contact Information
Looking for more information?
My contact info:
> Shawn.Kaschner@vector.com
30
Your questions are welcome!
Author:
Kaschner, Shawn
Vector North America
© 2019. Vector North America Inc. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.1 | 2019-04-17