PEAK-System - CAN Basics & PCAN-Explorer 6 - India2019

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 61

CAN in Theory and Practice

Basics of the CAN Bus Communication


and Use of the PCAN-Explorer 6
for CAN Analysis
PEAK-System: Introduction
Holger Adamiak
Head of Design & Documentation

About Us
▪ Founded in 1999
▪ Located in Darmstadt, Germany
▪ Development for the mobile and
industrial communication sector
▪ Hardware and software with
focus on CAN, CAN FD, and LIN
▪ More than 100 products
▪ About 40 employees
▪ Manufacturing in Germany
▪ Distributors worldwide

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 2
Topic Overview
▪ CAN & CAN FD Basics 2 hours
▪ Elements of CAN frames
▪ Structure of CAN buses
▪ Bit rates, bus load, and bus length
▪ Demonstration of a simple CAN FD bus

▪ PCAN-Explorer 6 4 hours
▪ Establishing connections to CAN and CAN FD buses
▪ Receiving and sending CAN messages
▪ Recording and playback of CAN traffic
▪ Filtering of CAN traffic and trace files
▪ Readable representation of CAN ID and data
▪ Overview of PCAN-Explorer 6 add-ins
▪ Automation with VBScript and macros

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 3
CAN & CAN FD
Basics
CAN Overview
▪ CAN = Controller Area Network

▪ Developed by Bosch for motor vehicles in the 1980s


▪ Since 1992 maintained and promoted by CAN in Automation (CiA)
▪ Standardization 1993: ISO 11898

▪ Connects sensors, actuators, switches, and displays (CAN nodes)


▪ Exchange of process and control data
▪ But no determination of the transferred information
▪ Primary goal: reliable data transfer

▪ The CAN standard provides a basic definition and is therefore versatile


(only two lower layers in ISO/OSI model)

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 5
CAN FD
▪ FD = Flexible Data rate
▪ Since end of 2015 defined in the standard ISO 11898-1
▪ CAN FD nodes also work on classic CAN buses (without FD features)

▪ Raised bit rate for the data part from 1 Mbit/s up to 12 Mbit/s
▪ Raised maximum number of data bytes per frame from 8 to 64

▪ Primary goal: raise data transfer

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 6
CAN Applications
▪ Vehicles Passenger cars, trucks, buses, agricultural vehicles, e-bikes

▪ Aviation Main and sub systems in planes (ARINC 825), sub systems
like lights, seat control, hydraulic

▪ Automation Agriculture, machine control, robotics, medical technology

▪ Traffic and Signal control and monitoring, passenger information


transportation systems systems

▪ Home automation Elevator control systems, automatic climate control,


and energy technology lighting systems

▪ Embedded systems POS systems, slot machines, coffee machines

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 7
CAN Properties
▪ Serial field bus
Data transmission is done bit by bit.

▪ Multi-master architecture
Each CAN node is equal and needs no external control.

▪ Broadcast transmission system


Messages are transmitted to every CAN node of the bus.

▪ Collision avoidance
Message collisions are resolved based on CAN ID priority (low ID, high priority).

▪ Transmission is done
Periodically, event-driven or on request via RTR (Remote Transmission Request).

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 8
CAN Properties
CAN ID
▪ CAN messages are distinguished with IDs
▪ 11 bits (CAN 2.0A, Standard), makes 2048 IDs
▪ 29 bits (CAN 2.0B, Extended), makes about 500 million IDs
▪ Use of an CAN ID by one node only
▪ Prioritization based on the CAN ID

Data Bytes
▪ Maximum 8 data bytes
per CAN message
▪ Minimum 0 data bytes
▪ Maximum 64 data bytes CAN ID Data Bytes
with CAN FD 100h 00 FF 1C

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 9
CAN Frame Structure*

ACK
SOF

DLC
RTR

IDE
r0
Idle ID Data CRC EOF IFS Idle

▪ Idle Unused bus (≥ 0 bits: all 1 recessive)


▪ SOF Start Of Frame (1 bit: 0 dominant)
▪ ID IDentifier (11 bits)
▪ RTR Remote Transmission Request (1 bit)
▪ Control field ▪ IDE IDentifier Extension (1 bit: 0 dominant for Standard frame)
▪ r0 Reserved (1 bit)
▪ DLC Data Length Code (4 bits: 0 to 8; 9 to 15 not allowed)
▪ Data 0 to 8 data bytes
▪ CRC Cyclic Redundant Check sum (16 bits)
▪ ACK ACKnowledge (2 bits: ACK slot 0 dominant, ACK delimiter 1 recessive)
▪ EOF End Of Frame (7 recessive bits: 1111111)
▪ IFS Inter Frame Space (3 recessive bits: 111)

* This illustration shows the structure of a CAN 2.0A “Standard” message frame.
The 18 additional bits of a CAN 2.0B “Extended” ID follow the IDE directly.

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 10
Physical Transmission Types
▪ High-speed CAN (ISO 11898-2)
▪ 2 data lines CAN_High/CAN_Low for differential signal transmission
▪ Bitrates up to 1 Mbit/s
▪ Maximum bus length depends on the bitrate

▪ Low-speed CAN (ISO 11898-3), also “fault-tolerant CAN”


▪ Single-wire CAN (SAE J2411)
▪ “Truck-n-Trailer” CAN (ISO 11992-1)

▪ Conversion to optical waveguide


▪ (Wireless)

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 11
High-speed CAN: Structure

▪ Cable preferably with twisted lines


▪ Cables and CAN connection are not defined in the CAN specification
▪ Termination RTerm = 120 Ω at the CAN bus ends
▪ Reduces line reflection for correct transceiver function
▪ Cable with shield to keep the twisted lines together
▪ Taps no longer than 1 m (approximate single-line structure of the bus)

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 12
High-speed CAN: Structure
But what components are essential for CAN communication?

▪ Connector
▪ CAN bus connection
T C
▪ Pin assignments are recommended
by CiA® 303-1, for example D-Sub, 9 pin

▪ Transceiver
▪ Responsible for transmitting and receiving
▪ Together with the connector and cables,
the transceiver covers the Physical Layer

▪ Controller
▪ The controller is the CAN protocol in silicon
▪ Covers the Data Link Layer of the ISO / OSI model

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 13
High-speed CAN: Signal Levels
U [V]
1 0 1
5

3.5
CAN_High
2.5
CAN_Low
1.5

recessive dominant recessive


0
t

▪ Udiff recessive = 0 V
▪ Udiff dominant = 2 V
▪ Recessive state is also idle state on the CAN bus
▪ With several participants: dominant state superimposes the recessive

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 14
High-speed CAN: Differential Signal
U

Udiff

Udiff

▪ Single Wire: Electromagnetic disturbance influences the signal level


▪ Twisted Pair: ▪ Both signals are influenced in the same way
▪ The electromagnetic disturbance has no effect on the difference
▪ The CAN_High and CAN_Low wires must be next to each other!

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 15
High-speed CAN: Maximum Distances
The maximum distance of CAN nodes Bitrate Max. distance
is limited by the bitrate, because: 1 Mbit/s 40 m
500 kBit/s 110 m
250 kBit/s 240 m
▪ All nodes must receive 125 kBit/s 500 m
the recessive or dominant 50 kBit/s 1.3 km
signal “simultaneously” 20 kBit/s 3.3 km
(propagation speed) 10 kBit/s 6.6 km
▪ On long lines, the voltage 5 kBit/s 13 km
difference Udiff must still be
distinguishable

The listed values have been calculated on the basis


of an idealized system and can differ from reality.

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 16
Error Detection
▪ A CAN network is fault-tolerant
▪ Error Detection Process
1. CAN node detects an error
2. CAN node transmits an error frame
3. All CAN nodes detect an error

▪ CAN node has two error counters


▪ REC: Receive Error Counter
▪ TEC: Transmit Error Counter

▪ Incrementation for a detected error


▪ Different step widths depending on type of error
▪ Threshold is exceeded: retreat from CAN communication

▪ Decrementation on correct CAN message

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 17
Node Error Conditions
▪ Error Active ▪ Normal state
▪ REC and TEC both ≤ 96
▪ “Warning” at REC or TEC > 96 (flag, no change in behavior)
▪ Active Error Frame is transmitted (6 dominant bits)

▪ Error Passive ▪ REC or TEC > 127


▪ Passive Error Frame is transmitted (6 recessive bits)
▪ Error indication on the bus only during self-transmitted CAN frames
▪ Prevents the bus being paralyzed by many Active Error Frames

▪ Bus Off ▪ TEC = 255 (does not apply to REC)


▪ Completely disconnected from the bus
▪ Node again capable of communication only through external
action (e.g. a reset)

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 18
Error Types
▪ Bit error
▪ Physical check of the transmitted bit
▪ Exceptions: arbitration, acknowledge

▪ CRC error
▪ Received and calculated checksum do not match

▪ Format error
▪ Violation of the CAN frame format (e.g. End of Frame)

▪ Acknowledge error
▪ No other participant has detected and confirmed the CAN message as being correct

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 19
CAN FD
Live and in Color
Accessing a CAN Bus

▪ CAN interfaces are used to connect a computer or embedded


application to a CAN or CAN FD bus
▪ PEAK-System offers CAN interfaces for many conventional
PC interfaces like USB, PCI Express, PCI Express Mini, and M.2
▪ The PCAN-USB Pro FD can do this via USB.

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 21
Our first CAN Bus

Computer A 120 Ω Cable 120 Ω Computer B

To create our own CAN bus, what do we need?


1. At least 2 CAN nodes (Acknowledge error)
2. A cable for the connection (PCAN-Cable 1)
3. 120 Ohm termination at both ends (PCAN-Term)
4. CAN nodes using the same bit rate

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 22
Our first CAN Bus: Real Signals
Sensor data like temperatures, status of switches, and controlling
actuators is handled with digital and analog signals. But how to
transmit and receive these signals with CAN messages?

▪ PCAN-MicroMod FD:
▪ Basic hardware component with I/O and CAN FD connection
▪ Digital and analog I/O signals are mapped to CAN messages
▪ Configuration is done with a Windows software via CAN

▪ PCAN-MicroMod FD Evaluation Board:


▪ Board with pick-offs, screw terminals, switches, LEDs,
and potentiometers for testing and development
▪ Voltage supply via USB or power supply unit
▪ Runs as an autonomous CAN node

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 23
Our first CAN Bus: Real Signals

PCAN-MicroMod FD
PCAN-T-Adapter
Evaluation Board

▪ The PCAN-MicroMod FD Evaluation Board is added with a tap


▪ In this example a PCAN-T-Adapter is used
▪ No additional termination

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 24
© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 25
PCAN-Explorer
The PCAN-Explorer from PEAK-System is a professional Windows®
software for the communication with CAN and CAN FD buses.

Use Cases:
▪ Observation and analysis of several CAN buses
▪ Understandable presentation of CAN traffic
▪ Influencing the CAN traffic for control
purposes or simulations

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 26
Organization: Projects
▪ Working with PCAN-Explorer 6 requires a project
▪ Projects contain:
▪ CAN bus connections
▪ Contents of the Transmit window
▪ References to files
(Symbols, transmit lists, traces, macros, Add-in files)
▪ Filters
▪ Folders (to help organize)

▪ Administration in the Project Manager


▪ Files (even opened ones) must be explicitly added
▪ Export of complete projects into packages via
File > Package…

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 27
CAN Connections and Nets
What do you need for displaying CAN messages?
1. Project
2. Connection to a Net

What is a Net?
▪ Net Virtual CAN bus structure in the computer
connecting Clients and CAN interfaces
▪ Client Software application connected to a Net
(like PCAN-Explorer or PCAN-View)

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 28
CAN Connections and Nets
How does it work?
▪ Multiple Clients can be connected with a Net
▪ A Client can be connected with multiple Nets
▪ A Net is connected to no or one CAN interface
Net 2

▪ Transmitted messages are


Client 1 Client 2 Client 3
passed to all Clients and via
the CAN interface to the
Net 1
external CAN bus
▪ Messages received by the
CAN Interface
interface, are received by
all Clients
CAN Bus

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 29
PCAN Nets Configuration Tool
Nets are created and managed with the
PCAN Nets Configuration Tool.

▪ Selection according to installed


drivers and available CAN interfaces
▪ Created Nets can be dragged and
dropped between hardware
▪ Internal: no connection to a
CAN interface (Net parking)
▪ With a Net the bit rate(s) of a
CAN connection are defined
▪ Lock: Net is in use
▪ Changes must be saved!

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 30
CAN Connections
▪ PCAN-Explorer uses Nets for the CAN Connection
▪ Connections are set in the Connections dialog
▪ Multiple Connections are possible
▪ Connections status display:
▪ OK, Error Passive Warning, BUSOFF, OVERRUN, …

▪ Additional options for diagnosis:


▪ Error Frames
▪ Listen Only
▪ Bus Load

▪ Error Frames:
▪ are displayed in the Receive window
▪ are recorded in Trace files
Note: This can cause huge files

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 31
Receive & Transmit
▪ CAN data traffic representation in
sortable receive and transmit lists
▪ Display of messages showing the
bus number, ID, length, data bytes, …

▪ Creation of transmit messages


▪ Manual, periodic, and RTR
message transmission
▪ Transmit message lists can be
saved and loaded

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 32
Tracer
▪ Recording of the whole CAN traffic
▪ Further application of traces:
▪ Play back (also with loop function)
▪ Manual examination with a text editor
▪ Application of filters
▪ Plotter import

▪ Several Tracers with different


filters are possible
▪ Import of third-party traces (*.asc)

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 33
Filters
▪ Filtering for the Receive window and the Tracer
▪ With Tracer: Subsequent filtering is possible
(result occurs in new window)

▪ If using several filter elements,


their order is important
▪ If a filter element applies,
further processing is canceled

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 34
Symbols
Symbols: Introduction
▪ CAN standard: No determination of transmitted data
▪ Symbols convert CAN messages to a readable format

Symbol
ID Signal 1 Signal
Data2 Variable
Coffee100h
Machine Pressure: 5 bar 0ATemperature:
FF CD 12 89 5A C1 70 Water: 1.5 l
120°C

▪ Symbol: Represents the CAN message by its ID


▪ Signals or Variables: Represent the transmitted data

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 36
Symbols
▪ Creating a Symbol file:
▪ Using the PCAN Symbol Editor is recommended
▪ Using the PCAN-Explorer 6 text editor but …
… it requires deep knowledge
… it's easy to make a mistake

▪ Format versions:
▪ Current version: 6.0
▪ PCAN-Explorer 6 can read all
formats, even 3.0
▪ Version conversion can be done
with the PCAN Symbol Editor

▪ Configuration is saved in
Symbol files (*.sym, text file)

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 37
Symbols
▪ A Symbol represents the CAN message by its ID
▪ Name: A name is assigned to the CAN ID
▪ Symbol Type: ▪ Standard CAN with 11 bits ID
▪ Extended CAN with 29 bits ID
▪ J1939 PG Special type for the J1939 Add-in
▪ FD Standard CAN FD with 11 bits ID
▪ FD Extended CAN FD with 29 bits ID

▪ Direction: ▪ Send Symbol is only interpreted in the Transmit list


▪ Receive Symbol is only interpreted in the Receive list
▪ Bi-Directional Symbol definition for flexible use

▪ Data Length: Select the amount of data bytes. If the data length
differs from the CAN message, the Symbol won’t apply
▪ Send Period: Set the cycle time for transmitting.

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 38
Signals & Variables
▪ Signals & Variables represent the CAN data
▪ Signals can be used in several Symbols
▪ Variables are used in only one Symbol
▪ A Symbol can contain several Signals or Variables

▪ The CAN data is divided into the carried information


▪ Only data that is associated to a Signal or a Variable is displayed
▪ Data types:
▪ Unsigned positive integers
▪ Signed positive and negative integers
▪ Bit 1 bit, Boolean, switch, etc.
▪ Char 1 byte, interpreted as an ASCII character
▪ String several bytes, character string (control codes are shown as dots)
▪ Float floating point number with 32 bits
▪ Double floating point number with 64 bits

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 39
Signals & Variables
▪ Factor & Offset
▪ At reception: physical value = (raw value * factor) + offset
▪ At transmission: raw value = (physical value - offset) / factor

▪ Unit indicator: °C, V, Volts, rpm, Apples, Pears


▪ Output Format:
▪ Decimal: values from 0 to 9
▪ Hexadecimal: values from 0 to F
▪ Binary: values 0 or 1

▪ Note: How to set the number of decimal places for float values?
▪ Global Symbol option: Custom Decimal Places
▪ Local Signal/Variable option: Custom Decimal Places
▪ Globally within PCAN-Explorer: Tools > Options > General > Float values

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 40
Applying the Symbol File
1. Add the Symbol file to your Project
2. Apply it to a Connection

▪ A changed Symbol file must be re-applied


▪ Only one active Symbol file per Connection

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 41
Locations of Interpreted CAN Data
▪ Receive window
▪ “Symbol” column is filled
▪ “Data” is interpreted
▪ Tip for view customization: Tools > Options > Receive/Transmit > Receive List

▪ Transmit window:
▪ Window for new message shows Symbols to be selected
▪ Subsequent change of data by double-clicking on “Data” field

▪ Trace:
▪ Symbol name is displayed directly
▪ Popup for variables when pointing with mouse on data

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 42
Signals in PCAN-Explorer 6
Signals and Variables from the Symbols definitions are
both handled as Signals in the PCAN-Explorer.

▪ Listed in the Project Manager > Project Items


▪ Physical (adjusted) magnitudes
▪ The general exchange medium in the PCAN-Explorer
▪ Signal values can be displayed in the Watch window

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 43
CANdb Import Add-in

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 44
CANdb Import Add-in
▪ CANdb is a file format from the company
“Vector Informatik” (*.dbc)
▪ Description of a CAN network
▪ PCAN-Explorer uses relevant information
analog to Symbols

Usage:
▪ Direct work with DBC file,
handling like Symbol files
▪ Conversion to a Symbol file is
possible with PCAN Symbol Editor

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 45
J1939 Add-in

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 46
J1939: General Information
▪ Standard is maintained by the
Society of Automotive Engineers (SAE J1939)
▪ Transfer of information between ECUs
in commercial vehicles
▪ Relies on CAN and covers different OSI layers
▪ 29-bit CAN IDs (CAN 2.0B)
▪ Usually 8 data bytes
▪ Transport protocol for up to 1785 data bytes

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 47
J1939 Add-in
▪ Select your Connection
▪ Properties > CAN section: Change the Protocol to J1939

▪ Symbols file J1939Default.sym is loaded and applied


▪ Settings for address claiming in the Connection properties
▪ Claiming via “Claim Address” in Connections window

▪ Note: Use of another Symbol file is possible:


J1939Template.sym in the Library for own adaptations

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 48
J1939 Add-in: Symbol File Specifics
▪ Type: J1939PG
▪ DLC: up to 1785 Bytes
▪ Multipacket: true
Enables the transmission of large CAN messages even with DLC = 8

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 49
Plotter Add-in

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 50
Plotter Add-in
The free Line Writer Add-in is a simple line writer for up to 4 Signals.
The Plotter Add-in is used for recording and enhanced graphical
representation of multiple Signal courses.

▪ Requires an active Symbol file


▪ Data access and exchange via Signals
▪ Recording and presentation of as
many Signals as desired
▪ Independent configuration dialog
▪ Not in the PE6 Properties window
▪ Wide range of formatting options for Signals,
layout, and presentation
▪ Changes of properties are instantly visible

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 51
Plotter Add-in
▪ Recording can be start, paused, and stopped
▪ Starting a recording does not erase prior recordings
▪ Erase all recordings with right-click > Clear all Data

▪ Cursor display for plot measurement


▪ Import of a trace file with all Signals (requires Symbol file)
▪ Export of the recording to a CSV file
Note: This contains only the Signal data, not the CAN messages

▪ The Plot Viewer, an independent software for the presentation of


recordings (*.plt), is available free of charge

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 52
Instruments Panel Add-in

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 53
Instruments Panel Add-in
The Instruments Panel Add-in is used for the representation
of digital and analog Signals via graphical instruments for an
easy simulation of complex CAN applications.

▪ Requires an active Symbol file


▪ Data access and exchange via Signals:
▪ Value of display instruments are set by Signals
▪ Signal values can be set by control instruments
▪ A Signal's change at an instrument generates a
transmit message (configured in the properties)

▪ Switching between
▪ Design mode: for layout and configuration
▪ Run mode: for instruments panel application

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 54
Instruments Panel Add-in
▪ Freely composable panel with instruments for
value indication and manipulation:
▪ Gauge meters, bar graphs, LEDs, and Trend diagrams
▪ Potentiometers, sliders, switches, and buttons
▪ Signal-dependent display of Bitmap Lists

▪ Many design options:


▪ Colors for instrument background and border
▪ Text font, size, and color
▪ Shapes and images
▪ And many more

▪ Representation of different Scenes on


the same panel during runtime
▪ Optional full-screen mode (F11)

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 55
Automation
via Scripting
Automation Possibilities of the PE6
▪ Standard Macro:
▪ Proprietary simple instruction set
▪ Rapid implementation of reception and transmission tasks
▪ Limited functionality
▪ Only Symbols are accessible, not Signals

▪ VBScript:
▪ Comprehensive implementation of VBScript
▪ Accessing COM objects of the PE6
▪ More effort needed at programming

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 57
Standard Macro: Instructions
▪ Transmit:
▪ Send Bus CAN_ID Length Data_bytes

▪ Receive:
▪ WaitMsg, WaitId, WaitData

▪ Outputs:
▪ In the Macro Status window: Print
▪ On the Macro tab of the Output window: PrintToOutputWindow

▪ ExecuteCommand PE6_Command
For Commands see Help topic: Reference > PCAN-Explorer Commands

▪ For further Instructions see Help topic:


Reference > Standard Macros > Standard Macro Instructions

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 58
VBScript: Creation & Application
▪ VBScript frame:
Sub Macro_name()
|
End Sub

▪ A VBS Macro file can contain


multiple macros
▪ All elements of the object model
can be accessed via VBScript
▪ Saving, access, and starting is
similar to Standard Macros

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 59
Further Information
▪ Visit our website for product information and our latest catalog

▪ Questions and feedback on training content:


▪ training@peak-system.com

▪ Our YouTube channel with video tutorials:


▪ https://www.youtube.com/user/peaksystemtechnik

▪ Stay up to date via Twitter or our news


▪ News at our start page: https://www.peak-system.com/?&L=1
▪ Twitter: https://twitter.com/PEAK_System

▪ Contact our support team:


▪ support@peak-system.com
▪ www.peak-system.com/forum/

© 2019 PEAK-System - India 2019 - CAN in Theory and Practice - Last Update: 2019-07-03 60
Thank you
for your attention.
For questions and suggestions for
improvement, I am at your
disposal.

You might also like