18.01.2013 Views

Analysis of the SAE J1708 protocol - IDT

Analysis of the SAE J1708 protocol - IDT

Analysis of the SAE J1708 protocol - IDT

SHOW MORE
SHOW LESS

Transform your PDFs into Flipbooks and boost your revenue!

Leverage SEO-optimized Flipbooks, powerful backlinks, and multimedia content to professionally showcase your products and significantly increase your reach.

Volvo Construction Equipment AB<br />

Component Division<br />

<strong>Analysis</strong> <strong>of</strong> <strong>the</strong> <strong>SAE</strong> <strong>J1708</strong> <strong>protocol</strong><br />

Raine Saastamoinen<br />

Bachelor <strong>the</strong>sis report<br />

May - Juli 2008<br />

School <strong>of</strong> Innovation Design and Engineering<br />

Mälardalen University, Västerås, Sweden<br />

Supervisor and Examiner: Johan Stärner<br />

Supervisors at company: Nils-Erik Bånkestad and Jarmo Talvén


“ Engineers does’nt buy solutions <strong>the</strong>y create <strong>the</strong>m”<br />

LeCroy comersial<br />

2


Abstract<br />

Component Division at Volvo Construction Equipment, develops electronic control units<br />

(ECU) to be used in entrepreneur machines. In an operating vehicle <strong>the</strong>re are several ECU’s<br />

communicating with each o<strong>the</strong>r to make everything work as a complete. There are two main<br />

network <strong>protocol</strong>s in use to solve different communication needs. One <strong>of</strong> <strong>the</strong>m is using <strong>the</strong><br />

<strong>SAE</strong> <strong>J1708</strong> physical layer <strong>protocol</strong> in transmitting <strong>of</strong> <strong>the</strong> actual bits when exchanging<br />

information. Manufacturing <strong>of</strong> <strong>the</strong> units are made by external suppliers.Up to date, <strong>the</strong>re is a<br />

lack <strong>of</strong> good tools, to verify that delivered components conforms to <strong>the</strong> <strong>J1708</strong> specifications.<br />

WaveRunner 104 MXi, is an advanced digital oscilloscope with scripting possibilities. It has<br />

been used in this <strong>the</strong>sis work to find out, whe<strong>the</strong>r suitable or not to solve this problem. This<br />

<strong>the</strong>sis shows that analysis is possible and most important <strong>of</strong> all, in future potential <strong>of</strong> being a<br />

great tool for verification.<br />

3


Acknowledgements<br />

Thanks to my supervisors Nils-Erik Bånkestad and Jarmo Talvén at VCE Component Division<br />

for pr<strong>of</strong>essional guidance. Pushing me in <strong>the</strong> right direction when stumbeling into difficulties<br />

(especially after that important meeting <strong>the</strong> very first week). My supervisor at Mälardalen<br />

University, Johan Stärner, a friendly pr<strong>of</strong>essional for support and important advices. Despite<br />

having summer vacation, taking time to read and comment my report. Annika Nerén and<br />

Peter Sävström for aid and patience shown in <strong>the</strong> laboratory environment. Magnus Åkesson,<br />

always giving a helping hand when needed and for having many good ideás. Also special<br />

thanks to Mikael Back, making this opportunity possible, to finish my studies at this<br />

interesting and challenging company. Toni Riutta for being a god friend with <strong>the</strong> heart at<br />

right place, I wish you all <strong>the</strong> best.<br />

A special thought to my family and belowed ones. Being <strong>the</strong>re, listening, supporting,<br />

encouraging and all to help me to <strong>the</strong> finishing line.<br />

And last but not <strong>the</strong> least to all <strong>the</strong> people at location, showing that, despite all serious work<br />

dealt with, <strong>the</strong>re is always room for laughter. Surrounded by a great atmosphere it has been a<br />

delightful experince to work here.<br />

Thank you all!<br />

Raine Saastamoinen<br />

4


Contents<br />

1 Introduction …….….….…………………………………………………….……………..6<br />

2 Background ...……………………………………………………………….……………..6<br />

3 Problem formulation.……………………………………………………….…………..….7<br />

4 Thesis outline……………………………………………………………….…………..….8<br />

5 The <strong>SAE</strong> <strong>J1708</strong> <strong>protocol</strong>………………………………………………….…………..……8<br />

6 TheWaveRunner 104 MXi DSO ..……………………………………….…………..…….8<br />

6.1 WaveScan, an advanced search and analysis tool……. .………….…………..……..11<br />

6.2 LabNotebook ..………………………………………………………………..……..12<br />

6.3 Custom DSO…. . ……………………………………………………………….……13<br />

7 Requirements on analysis…….……………………………………………………….…..13<br />

7.1 Voltage levels on <strong>the</strong> bus..………….………………………………………………...14<br />

7.1.1 Bus state levels..……....………………………………………………………….14<br />

7.1.2 Bits and voltage differences ……………………………………………………..15<br />

7.2 Single bits………………………………………………………………………….…15<br />

7.2.1 Verify bit time….…………………………………………………………….…..15<br />

7.2.2 Low-to-high delay…. ……………………………………………………….…..15<br />

7.2.3 High-to-low delay .. ….. ………………………………………….....……….…..15<br />

7.2.4 Higher frequecies………………………………………...……………………….15<br />

7.3 Characters……………….……………………………………………… ……….…..16<br />

7.3.1 Interpretation………………. …………………………………… ………….…..16<br />

7.3.2 Character time duration………………………………………….………….……16<br />

7.4 Messages………………………….…………………………………………….……16<br />

7.4.1 Idle state…………………………………………………………………….……16<br />

7.4.2 Inter byte delays…………………………………………………………….……16<br />

7.4.3 Message lengths ………………. ………………………………………….…….17<br />

7.5 Fur<strong>the</strong>r analysis……………………. .……………………………………….………17<br />

7.5.1 Unknown-zone…………………..……………………………………….………17<br />

7.5.2 Traffic load on bus………………… ………………..….….….………….. ……17<br />

7.5.3 Count collisions………………………………………………………………….17<br />

7.5.4 Monitor communication………………….……………………….. ……………17<br />

7.5.5 Decode messages……………………………………………….. ………………17<br />

8 Method ………………………………………..………. .. ………….. …………………18<br />

8.1 Workplace simulation equipment……….……………. ………….. ………………..18<br />

8.2 Laboratory simulation equipment……….………………. …….. …………………..18<br />

8.3 Measurement to be done for voltage levels. ………... ….. .. …….. ………………..18<br />

8.4 Measurement to be done for single bits .…….…….….……..... ……………………19<br />

8.5 Measurement to be done for characters .……….……..……. ………………………20<br />

8.6 Measurement to be done for messages..…………..………….. ……………………..20<br />

8.7 Measurement to be done for fur<strong>the</strong>r analysis ………. .….….……………………….20<br />

9 Results…………………………………………………….. .……………………………..20<br />

9.1 <strong>Analysis</strong> <strong>of</strong> results …..……………………….. ……………………………………..22<br />

10 Future work/recommendations.. …………….. ………………....………………....……34<br />

11 Summary and conclusions ……..………..…...…..………………………………………36<br />

References…………………………….….…….……………..…...………..……………37<br />

Appendix A… …….…….…….…………………………………………………………38<br />

Technical data……..…………………………………………………………………38<br />

Sample code………………………….….….………………………………………..39<br />

5


1. Introduction<br />

Volvo Construction Equipment (VCE) is one <strong>of</strong> <strong>the</strong> leading manufacturers <strong>of</strong> construction<br />

machines on <strong>the</strong> world market. Wheel-, and backhoe loaders, excavators and articulated<br />

haulers are some <strong>of</strong> <strong>the</strong> products (see fig.1). This big company is divided into several<br />

divisions responsible for specific areas. One <strong>of</strong> <strong>the</strong>m, Component Division has <strong>the</strong> global<br />

responsibility for developing and manufacturing powertrains and electronic systems. This<br />

<strong>the</strong>sis work is made at a department, within Component Division in Eskilstuna. In here<br />

development take place in making new hardware and s<strong>of</strong>tware solutions for <strong>the</strong> electronic<br />

control units (ECU), used by <strong>the</strong> machines. S<strong>of</strong>tware is developed on both platform and<br />

application level. The hardware is devoloped toge<strong>the</strong>r with external suppliers, which by <strong>the</strong><br />

end makes <strong>the</strong> actual manufacturing <strong>of</strong> <strong>the</strong> ECU’s.<br />

Figure 1. Wheel-, and backhoe loaders, excavators, articulated haulers, motor graders and road machinery are<br />

products developed by VCE.<br />

2. Background<br />

First <strong>of</strong> all, a very brief explanation to what an ECU is doing. An ECU, electronic control<br />

unit, is a small embedded computer that has specific behaviour implemented in it to take care<br />

<strong>of</strong> certain parts <strong>of</strong> a vehicle. Engine, transmission, hydraulics, cabin, instrument and so on<br />

have <strong>the</strong>ir own ECU’s. A real-time operating system is in use to schedule and decide on<br />

which task (a small piece <strong>of</strong> program), may execute what and when. Different tasks read<br />

sensor values, o<strong>the</strong>rs make decisions upon that and some make actuators to react accordingly.<br />

The beaty <strong>of</strong> this is having <strong>the</strong> possibility to tune in some small specific details or change <strong>of</strong><br />

characteristics and behaviour <strong>of</strong> a vehicle with changes in s<strong>of</strong>tware (<strong>of</strong> cource with<br />

limitations). The trend is with increasing count <strong>of</strong> modules per vehicle.<br />

In an operating vehicle <strong>the</strong>re are several ECU’s communicating with each o<strong>the</strong>r to make<br />

everything work as a complete. Communication between <strong>the</strong>se autonomous nodes that <strong>the</strong><br />

ECU’s represent, make <strong>the</strong> use <strong>of</strong> network <strong>protocol</strong>s a necessity. There are two main<br />

<strong>protocol</strong>s in use to solve different communication needs. First <strong>the</strong>re is <strong>the</strong> CAN (Controller<br />

Area Network) according to J1939 standard in use for most <strong>of</strong> <strong>the</strong> data communication [8],[9].<br />

With CAN being <strong>the</strong> primary bus, it allows critical interchange at high speeds among <strong>the</strong><br />

connected modules. The second alternative in use is a <strong>protocol</strong> following <strong>the</strong> <strong>SAE</strong> (Society <strong>of</strong><br />

Automotive Engineers) J1587 standard [12],[14]. A ra<strong>the</strong>r old standard, yet <strong>of</strong>fering <strong>the</strong><br />

advantages <strong>of</strong> a proven by use, reliable but ra<strong>the</strong>r slow communication service, used mainly<br />

for secondary or less urgent data exchange in <strong>the</strong> form <strong>of</strong>…<br />

• loading new s<strong>of</strong>tware to <strong>the</strong> platform<br />

• dataset loading<br />

• on-vehicle test<br />

• diagnosis / faultcodes<br />

6


Figure 2: The electronic system<br />

J1587 describes <strong>the</strong> application level in a <strong>protocol</strong> suite according to <strong>the</strong> OSI Model 1 . It<br />

defines format <strong>of</strong> <strong>the</strong> messages and data to be sent that is <strong>of</strong> general value. It describes a<br />

standard to use for...<br />

“ electronic data interchange between microcomputer systems in<br />

heavy-duty vehicle applications” [12].<br />

This application layer <strong>protocol</strong> is to be used toge<strong>the</strong>r with <strong>the</strong> <strong>SAE</strong> <strong>J1708</strong> standard [13][15].<br />

In a <strong>protocol</strong> suite, this one defines <strong>the</strong> data link-, and physical layer.<br />

3. Problem formulation<br />

How well does <strong>the</strong> ECU’s implement <strong>the</strong> recommended practice when data interchanged? The<br />

main objective <strong>of</strong> this <strong>the</strong>sis work is to make measurements and analysis <strong>of</strong> <strong>the</strong> <strong>SAE</strong> <strong>J1708</strong><br />

physical layer <strong>protocol</strong> in use. Up to date <strong>the</strong>re has been a lack <strong>of</strong> good supporting tools to<br />

verify such things easily.VCE having a vision, invested in an advanced digital signal<br />

oscilloscope with scripting possibilities. LeCroy’s WaveRunner 104 MXi has been used in<br />

this <strong>the</strong>sis work to find out, whe<strong>the</strong>r suitable or not to solve <strong>the</strong> aforementioned problem.<br />

1 The OSI Model describes a layered, abstract description for communications and computer<br />

network <strong>protocol</strong> design<br />

7


4. Thesis outline<br />

To solve this <strong>the</strong>sis work, a logical work flow has been identified.<br />

1. First <strong>of</strong> all getting deeper knowledge <strong>of</strong> <strong>the</strong> <strong>SAE</strong> <strong>J1708</strong> <strong>protocol</strong>.<br />

2. Studying <strong>the</strong> WaveRunner 104 MXi oscilloscope with focus on sorting out different<br />

alternatives for measurement and analysis.<br />

3. Establish a specification <strong>of</strong> requirements on what to analyse.<br />

4. Do <strong>the</strong> required measurement needed for analysis.<br />

5. Make analysis <strong>of</strong> ga<strong>the</strong>red material and present results.<br />

5. The <strong>SAE</strong> <strong>J1708</strong> <strong>protocol</strong><br />

One <strong>of</strong> <strong>the</strong> <strong>protocol</strong>s in use is <strong>the</strong> <strong>SAE</strong> <strong>J1708</strong>. A standard that implements a bidirectional,<br />

serial communication link among modules containing microcomputers [13]. Like<br />

aforementioned with an application layer <strong>protocol</strong> on top <strong>of</strong> it, this one defines <strong>the</strong> data link-,<br />

and physical layer and is paired with EIA-485 (also formerly known as RS-485), giving <strong>the</strong><br />

electrical specifications to it [10]. Here <strong>the</strong> primary concerns are <strong>the</strong> actual transmitting <strong>of</strong> <strong>the</strong><br />

bits when ECU’s exchange information on <strong>the</strong> bus. Among o<strong>the</strong>r things <strong>the</strong> standards<br />

describe…<br />

• voltage levels<br />

• timing constraints<br />

• defining format <strong>of</strong> characters<br />

• bus access mechanisms<br />

• error detection and handling<br />

• hardware interface with cables, allowed lengths, number <strong>of</strong> units and so on.<br />

Later in <strong>the</strong> report, when presenting <strong>the</strong> requirements on what to analyse, deeper explanations<br />

will be given to why certain measurement are required in verification <strong>of</strong> correct behaviour.<br />

6. The WaveRunner 104 MXi DSO<br />

The purpose <strong>of</strong> this topic is to give data on <strong>the</strong> WaveRunner 104 MXi digital signal<br />

oscilloscope (hereafter refered as DSO). This quite extensive information, with intensions <strong>of</strong><br />

having <strong>the</strong> reader to get a feeling <strong>of</strong> <strong>the</strong> power <strong>of</strong> this instrument. Many things are ready in <strong>the</strong><br />

DSO to make life simpler to an engineer, but <strong>the</strong> real strength comes with <strong>the</strong> ability to<br />

develop custom solutions with scripts. Following information in here is more or less ga<strong>the</strong>red<br />

from <strong>the</strong> company homesite, product commercials and accessible manuals on this site [1].<br />

“ A single-shot acquisition is a series <strong>of</strong> digitized voltage values sampled on<br />

<strong>the</strong> input signal at a uniform rate. It is also a series <strong>of</strong> measured data values<br />

associated with a single trigger event. The acquisition is typically stopped a<br />

defined number <strong>of</strong> samples after this event occurs: a number determined by<br />

<strong>the</strong> selected trigger delay and measured by <strong>the</strong> timebase.” [2]<br />

The DSO is delivered with windows XP operating system installed, presenting a well known,<br />

easy to use environment. It is possible to attach common peripherals such as mouse and<br />

8


keyboard to use <strong>the</strong> instrument simply as a ordinary computer. If <strong>the</strong> built-in display <strong>of</strong> <strong>the</strong><br />

DSO feels too small, it may be connected to ano<strong>the</strong>r screen. There is three different solutions<br />

when navigating within <strong>the</strong> DSO menus. By a touch sensitive screen, a mouse or simply use<br />

physical buttons and knobs on front panel <strong>of</strong> <strong>the</strong> intrument.<br />

Figure 3. LeCroy WaveRunner 104 MXi [3].<br />

The DSO has 4 input channels in where to connect appropriate probes for measurement.<br />

These are called C1, C2, C3 and C4 when navigating within <strong>the</strong> instrument. O<strong>the</strong>r channels to<br />

display traces and do work on when specific functions applied on are identified as...<br />

Parameters (P1-P8)<br />

Memory channels (M1-M4)<br />

Math channels (F1-F4)<br />

Zooming channels (Z1-Z4)<br />

and (Q1-Q4) used for pass/fail testing<br />

Parameters are measurement tools that determine a wide range <strong>of</strong> waveform properties. Use<br />

<strong>the</strong>m to automatically calculate many attributes captured signals. Some examples could be<br />

rise-time, rms voltage, base, top and peak-to-peak voltage. Result is presented in one <strong>of</strong> <strong>the</strong><br />

specified P1 – P8 traces available. There are completely ready to use parameter modes to<br />

perform maesurement on waveforms in <strong>the</strong> typical amplitude (vertical) and time (horisontal)<br />

domains. Custom parameter groups with possibility to make own choises from <strong>the</strong> built-in<br />

functions to apply and finally by programming in VBScript to add, what ever, new own<br />

custom functionality. Any <strong>of</strong> <strong>the</strong> parameters and <strong>the</strong>ir values may be presented toge<strong>the</strong>r with<br />

statistical values such as <strong>the</strong>ir average, high, min and max values if desired.<br />

Memory channels M1-M4 are <strong>the</strong>re to use when saving acquired waveforms. Easy to recall<br />

when fur<strong>the</strong>r analysis has to be done (a principle used in this <strong>the</strong>sis, more on this later).<br />

The DSO has built-in ma<strong>the</strong>matical functions to apply on acquired waveforms. This to<br />

perform math on <strong>the</strong>m and displaying <strong>the</strong> result in one <strong>of</strong> <strong>the</strong> four math traces F1- F4. The<br />

easy-to-use graphical interface simplifies setup <strong>of</strong> up to two operations on each function trace.<br />

Math traces can be chained toge<strong>the</strong>r to perform math-on-math. If this is not enough, possible<br />

9


to implement own functionality by coding in VBScript, JScript or MATLAB. This makes <strong>the</strong><br />

DSO so powerful.<br />

Although <strong>the</strong> DSO <strong>of</strong>fers a lot <strong>of</strong> functionality in standard mode, VCE have purchased some<br />

additional hardware and s<strong>of</strong>tware options as well. It has been upgraded with…<br />

• More memory added, 512 MB<br />

• A Master <strong>Analysis</strong> Package (XMAP), that includes…<br />

o Advanced Math Package (XMATH). Allowing math on waveforms from<br />

input channels (C1 - C4), memories (M1 - M2) or o<strong>the</strong>r math channels (F1 -<br />

F4)<br />

o Customisation Package (XDEV). If <strong>Analysis</strong>, Custom DSO and plug-in<br />

choosen in instrument menu topics, it is possible to create own graphical user<br />

interfaces (GUI). An interface with buttons connected to macros that activate<br />

some described ActiveX control. If Custom DSO in Basic mode activated. This<br />

will enable easy to use access to own instrument set-ups to be launced with<br />

defined buttons.<br />

o Jitter and Timing <strong>Analysis</strong> Package(JTA2). Enabling math and parameter<br />

selections in Math and Measure menus<br />

• CANbus TDM. An external Trigger, Decoding and Measurement module. With this<br />

module monitor and verify that operation, reliability and performance <strong>of</strong> CAN-nodes<br />

take place as <strong>the</strong>y should. This is adding a set <strong>of</strong> tools for simultaneous testing <strong>of</strong> both<br />

physical-, and data link layer.<br />

• Built-in serial data decoders available in <strong>the</strong> DSO are: CAN, UART, LIN, SPI, I2C,<br />

FlexRay and RS-232.<br />

In <strong>the</strong> bottom line this is an oscilloscope. A digital one making all <strong>the</strong> things expected but also<br />

capable <strong>of</strong> many things beyond that <strong>of</strong> an ordinary oscilloscope. One special feature comes<br />

with <strong>the</strong> rapid signal processing power and large memory when acquiring waveforms.<br />

Waveforms that can be fur<strong>the</strong>r processed with s<strong>of</strong>tware if desired when having JTA2 and/or<br />

XMATH packages installed. This possibility to make additional things to <strong>the</strong> normal<br />

hardware triggers and applying s<strong>of</strong>tware processing on measured waves is one <strong>of</strong> <strong>the</strong> things<br />

that makes this DSO so special.<br />

“The high 10 GS/s maximum sampling rate and<br />

extremely long 25 Mpts memory guarantee you are capturing<br />

all <strong>of</strong> <strong>the</strong> details in your signals.” [3]<br />

The speed is <strong>the</strong>re to get all <strong>the</strong> details. How about <strong>the</strong> quality and how accurate are <strong>the</strong><br />

digitized readings? Following statements makes one realize <strong>the</strong> very high demands that could<br />

be set upon <strong>the</strong> precision <strong>of</strong> <strong>the</strong> measurements.<br />

10


• Let <strong>the</strong> instrument adjust it self to surrounding room temperature.<br />

• Adjust measuring probes with aid <strong>of</strong> a built-in, adjustable calibration signal.<br />

• Deskew whenever need <strong>of</strong> compensating for different lengths <strong>of</strong> cables, probes, or<br />

anything else that might cause timing mismatches between signals.<br />

There exist many alternative settings to choose from when displaying captured signals.<br />

If not happy with <strong>the</strong> standard plot, change colour, change to persistence mode and view in a<br />

3D mode. Possible to change plotting between line or punctuation mode, splitting windows to<br />

separate different channels and if in monochromatic persistence mode, possible to simulate<br />

<strong>the</strong> look <strong>of</strong> sweeps as <strong>the</strong>y were in <strong>the</strong> old analog oscillocopes. Some o<strong>the</strong>r features in short…<br />

• Use <strong>of</strong> cursors to manual measurements, still useful in many cases. Descriptive labels<br />

may be turned on, showing what parts <strong>of</strong> a signal that is measured and how.<br />

• Zooming in and out wanted parts <strong>of</strong> one or more particular channels...<br />

• ...automatically done when applying filtering criterias used by WaveScan s<strong>of</strong>tware. It<br />

can be used to scan and search ei<strong>the</strong>r on saved waveforms or making it during live<br />

acquisitions with highlighting areas when features <strong>of</strong> interest found.<br />

• With ScanHisto, show statistical distribution <strong>of</strong> found events. Find out how values <strong>of</strong><br />

parameters are distributed over many measurements. Once a histogram is defined and<br />

generated, measurements can be performed on <strong>the</strong> histogram itself (see fig.4).<br />

• Fast Fourier Transforms (FFT). For a large class <strong>of</strong> signals, one could gain greater<br />

insight by looking at spectral representation ra<strong>the</strong>r than time description.<br />

• Reporting and documenting results is important. It is made easy with <strong>the</strong> included<br />

LabNotebook s<strong>of</strong>tware.<br />

• The additional XDEV package make it possible to set-up <strong>the</strong> instrument and making<br />

<strong>of</strong> own GUI’s to launch macros that run own ActiveX 2 content.<br />

• If not enough with <strong>the</strong> more than 250 built-in functions covering lots <strong>of</strong> mesurement<br />

needs, <strong>the</strong>n <strong>the</strong> DSO <strong>of</strong>fers scripting possibilities to create own solutions in case<br />

needed (XMATH and/or JTA2 packages required)<br />

Figure 4. Histicons provide a fast, dynamic view <strong>of</strong> parameters and wave shape characteristics [2].<br />

2 ActiveX components is a term used to denote reusable s<strong>of</strong>tware components that are based on Micros<strong>of</strong>t<br />

Component Object Model (COM). ActiveX controls provide encapsulated reusable functionality to programs<br />

and in this case it can be described with Visual Basic to set-up <strong>the</strong> instrument.<br />

11


Some <strong>of</strong> <strong>the</strong> s<strong>of</strong>tware to use with <strong>the</strong> DSO and mentioned above, deserves a closer look. This<br />

is because <strong>the</strong>y enable exciting possibilities for analysis in searching for a solution to this<br />

<strong>the</strong>sis. Remembering that following information is more or less ga<strong>the</strong>red from <strong>the</strong> company<br />

homesite product commercials and accessible manuals in here [1]. Let us start with…<br />

6.1 WaveScan, an advanced search and analysis tool<br />

This s<strong>of</strong>tware is a powerful tool when working with acquisitions and deeper analysis <strong>of</strong><br />

captured waveforms. First WaveScan enables <strong>the</strong> user to trigger on unusual events to capture<br />

and <strong>the</strong>n <strong>of</strong>fering scanning <strong>of</strong> special events <strong>of</strong> interest. Fast processing <strong>of</strong> data, gives<br />

possibility to scan and monitor millions <strong>of</strong> events. Make a selection from available<br />

measurement modes and filters or implement own solutions by coding in VBScript, JScript,<br />

MATLAB or Mathcad. This may be done on any input-, math channel or memory trace.<br />

Search criteria may be selected from several modes such as frequency, pulse width,<br />

amplitude, etc.<br />

“WaveScan provides <strong>the</strong> ability to locate unusual events in<br />

a single capture (i.e., capture and search). It also “scans”<br />

for an event in many acquisitions over a long period <strong>of</strong> time.<br />

Select from more than 20 search modes (frequency, rise<br />

time, runt, duty cycle, etc.), apply a search condition and<br />

begin scanning.” [4]<br />

When using s<strong>of</strong>tware triggering (enabling WaveScan functionality), one must select what kind<br />

<strong>of</strong> action to take on events found…<br />

• None<br />

• Audible Beep<br />

• Stop Acquisition<br />

• Save Waveform(s)<br />

• Pulse AUX Output<br />

• Print (Save) Screen Image<br />

• Save to LabNotebook<br />

Identified events are highlighted and surrounded by a red box. There exist a user selectable<br />

table to be displayed with found features and <strong>the</strong>ir values. All found events are individually<br />

time stamped and indexed in <strong>the</strong> table from which one can select <strong>the</strong>m for fur<strong>the</strong>r<br />

view/analysis.<br />

6.2 LabNotebook<br />

“Since <strong>the</strong> scanning modes are not simply copies <strong>of</strong> <strong>the</strong> hardware triggers,<br />

but "s<strong>of</strong>tware triggers," <strong>the</strong> capability is much greater.” [2]<br />

LabNotebook is <strong>the</strong>re to extend documentation capabilities <strong>of</strong> <strong>the</strong> DSO.<br />

12


“LeCroy's LabNotebook feature extends <strong>the</strong> documentation capabilities <strong>of</strong> your<br />

oscilloscope. It allows you to create an annotated notebook entry containing all<br />

displayed waveforms, <strong>the</strong> setup <strong>of</strong> <strong>the</strong> DSO, and user-supplied annotation.” [2]<br />

These savings can <strong>the</strong>n be converted to pdf, rtf or html and printed or emailed. If <strong>the</strong> default<br />

report layout lack something, configure your own (with own company logo in <strong>the</strong> header!).<br />

All notebook entries are stored in an internal database. Besides storing <strong>the</strong> waveform having<br />

16-bit resolution for integer or floating point data, LabNotebook also stores panel setups (<strong>the</strong><br />

setup <strong>of</strong> <strong>the</strong> DSO) and parameter measurements in <strong>the</strong> database.<br />

“LabNotebook is a unique inter-active measurements database and report<br />

generator that can be <strong>of</strong> inestimable value in <strong>the</strong> day-to-day use <strong>of</strong> your LeCroy<br />

oscilloscope. “ [7]<br />

With <strong>the</strong> flashback feature all data is available for recall at any time. Recall <strong>the</strong> state <strong>of</strong> <strong>the</strong><br />

DSO, including <strong>the</strong> saved waveforms and <strong>the</strong> DSO setup, and proceed with additional<br />

measurements. This makes it easy to continue work where last finished. In case needed,<br />

LabNotebook <strong>of</strong>fers capability to back up <strong>the</strong> database to external media.<br />

6.3 Custom DSO<br />

“The instrument provides powerful capability to add your own parameters,<br />

functions, display algorithms, or o<strong>the</strong>r routines to <strong>the</strong> oscilloscope user interface<br />

without having to leave <strong>the</strong> instrument application environment. You can<br />

customize <strong>the</strong> instrument to your needs by using <strong>the</strong> power <strong>of</strong> programs such as<br />

Excel, Mathcad, and MATLAB, or by scripting in VBS. Whichever method<br />

you use, <strong>the</strong> results appear on <strong>the</strong> instrument's display toge<strong>the</strong>r with <strong>the</strong> signals<br />

that you started with. This ability <strong>of</strong>fers tremendous advantages in solving unique<br />

problems for a large range <strong>of</strong> applications…” [2]<br />

CustomDSO, in its Basic mode, allows creation <strong>of</strong> DSO setups that can be called by <strong>the</strong> touch<br />

<strong>of</strong> a single button. Basic mode may also recall own functionality implemented in VBScripts<br />

that can set up all or part <strong>of</strong> <strong>the</strong> oscilloscope and do many o<strong>the</strong>r things. Ano<strong>the</strong>r more<br />

powerful feature is <strong>the</strong> PlugIn, which allows adding <strong>of</strong> ActiveX controls to a setup. These<br />

controls are powered by routines written in Visual Basic. With ActiveX controls it is possible<br />

to create own graphical user interfaces (GUI:s) to suit desired preferences. [2]<br />

7. Requirements on analysis<br />

The main objective <strong>of</strong> this <strong>the</strong>sis work is to make measurements and analysis <strong>of</strong> <strong>the</strong> <strong>SAE</strong><br />

<strong>J1708</strong> physical layer <strong>protocol</strong> in use. Having thoroughly studies on <strong>the</strong> <strong>protocol</strong>, made it<br />

possible to pinpoint important things to measure. There is a logical structure to work with that<br />

follow from <strong>the</strong> basic voltage levels on <strong>the</strong> bus, interpreting <strong>the</strong> ones and zeros transmitted, to<br />

finally end up with describing complete messages.<br />

13


1. voltage levels<br />

2. bits<br />

3. characters<br />

4. messages<br />

5. fur<strong>the</strong>r analysis<br />

Fur<strong>the</strong>r analysis part was included here as well, although not possible to solve everything.<br />

Mainly because this makes one to think fur<strong>the</strong>r in possible development. At this state, positive<br />

if being able to decide whe<strong>the</strong>r this could be done or not with this instrument in <strong>the</strong> future<br />

(obviously <strong>of</strong> major interest for VCE). Some experimenting here but primary effort put on<br />

measuring and verifying <strong>the</strong> first four levels <strong>of</strong> requirements.<br />

The requirements to measure will be numbered to be refered to later in <strong>the</strong> <strong>the</strong>sis. Also <strong>the</strong><br />

reader should note that enclosed section numbers do reference to <strong>the</strong> specifications given in<br />

<strong>SAE</strong> <strong>J1708</strong> Revised OCT93 and that words in bold face letters are <strong>the</strong>re to highlight important<br />

ones used in <strong>the</strong> standard.<br />

7.1 Voltage levels on <strong>the</strong> bus<br />

7.1.1 Bus state levels<br />

Verify differences for bus state levels greater than or equal to 0,2 V. (4.2).<br />

The information is transmitted on a differential bus e g. a bit is interpreted as in a difference<br />

<strong>of</strong> voltage levels between <strong>the</strong> twisted pair <strong>of</strong> wires. A logical ’1’ when point A is at least 0.2<br />

V more positive than point B. ’0’ when <strong>the</strong> opposite is <strong>the</strong> case, B > A<br />

Figure 5: Points to be measured, A and B, are given by this picture from <strong>the</strong> <strong>SAE</strong> <strong>J1708</strong> Revised Oct93 [13].<br />

14


7.1.2 Bits and voltage differences<br />

Verify that received bits follow differences in voltage levels between <strong>the</strong> wires (point Rx to<br />

be measured in fig.5).<br />

7.2 Single bits<br />

7.2.1 Verify bit time<br />

Verify that <strong>the</strong> duration <strong>of</strong> one bit time, high and low logic levels, do not exceed stated limits<br />

(104,17 µs ± 0,5 %). (6.1)<br />

This specific pulse width complies to 9600 baud, e g. maximum count <strong>of</strong> analog signal<br />

transitions per second given by <strong>the</strong> frequency formula<br />

f = 1/(104,17*10^-6) = 9599,69 Hz.<br />

This frequency, and how content <strong>of</strong> one character is represented, is consistent with standard<br />

universal asynchronous receiver/transmitter (UART) communication. More in 7.3.1<br />

7.2.2 Low-to-high delay<br />

Verify that low-to-high transition delays at <strong>the</strong> receiver do not exceed 10 µs. (A.6).<br />

Active low-to-high transition delay, is a delay on <strong>the</strong> transmitted signal, due to added<br />

capacitance by nodes connected to <strong>the</strong> serial bus. This delay between sending and receiving <strong>of</strong><br />

bits should remain at <strong>the</strong> same value regardless <strong>of</strong> number <strong>of</strong> nodes in <strong>the</strong> system. Upper limit<br />

in <strong>the</strong> recommended practice is a maximum count <strong>of</strong> 20 nodes.<br />

7.2.3 High-to-low delay<br />

Passive high-to-low transition delay. A delay that do increase with <strong>the</strong> load. It should not be<br />

more than 2,3 µs for 20 connected nodes.<br />

Verify high-to-low transition delays within 0,6 – 2,3 µs. (A.5).<br />

7.2.4 Higher frequencies<br />

Verify that measurements, as done in 7.2.1 – 7.2.3, also is valid for higher frequencies used<br />

with standard UART communication in <strong>the</strong> system [16].<br />

15


7.3 Characters.<br />

A character is consistent with standard universal asynchronous receiver/transmitter (UART)<br />

communication. A character shall consist <strong>of</strong> 10 bits. Starting with one low logic level bit,<br />

followed by 8 bits <strong>of</strong> data and ending <strong>the</strong> character with a high logic level bit. A low logic<br />

level bit has <strong>the</strong> opposite level <strong>of</strong> a bus in idle state according to 7.4.1<br />

7.3.1 Interpretation<br />

Verify that a character is interpreted correctly. A logic ’0’ start bit indicating <strong>the</strong> beginnig <strong>of</strong> a<br />

new character. This followed by 8 bits <strong>of</strong> data, least significant bit (LSB) first and by having<br />

<strong>the</strong> most significant bit (MSB), logic level ’1’ ending <strong>the</strong> character. (6.2).<br />

7.3.2 Character time duration<br />

Verify total amount <strong>of</strong> time for one character within 10 * bit time. (6.2).<br />

7.4 Messages.<br />

A message consist <strong>of</strong> 3 – 21 characters in length. A message identifier (MID), followed by<br />

1 - 19 characters <strong>of</strong> data and ending up with a checksum. The total length <strong>of</strong> a message is<br />

limited to 21 characters when vehicle running. If speed = 0 and engine RPM = 0, longer<br />

messages are allowed to be exchanged. (6.3.5).<br />

7.4.1 Idle state<br />

Verify prior sending <strong>of</strong> a new message, that <strong>the</strong> communication link has remained at a high<br />

logic level (e.g no o<strong>the</strong>r message on <strong>the</strong> bus), for a duration <strong>of</strong> at least 12 * bit time. This is<br />

true if <strong>the</strong> transmitting node is able <strong>of</strong> distinguishing a stop bit from o<strong>the</strong>r high-logic, idle line<br />

bits. If not, this should count to 19 * bit time. (5.2).<br />

Accessing <strong>the</strong> bus is made in a random manner. This is based on among o<strong>the</strong>r things, <strong>the</strong><br />

specified priority for that message, resulting in a value called bus access time. This bus<br />

access time tells how long <strong>the</strong> bus should have been in an idle state before a specific message<br />

is allowed accessing <strong>the</strong> communication channel. (5.2.1.1).<br />

7.4.2 Inter byte delays<br />

Verify that delays between characters inside a message, interbyte delay, do not exceed<br />

2 * bit time. (6.3.1).<br />

16


7.4.3 Message lengths<br />

Verify length <strong>of</strong> messages in between 3 – 21 characters when measuring in a system that<br />

simulates a running vehicle.<br />

7.5 Fur<strong>the</strong>r analysis<br />

7.5.1 Unknown-zone<br />

Study duration <strong>of</strong> ’unknown-zone’ prior sending <strong>of</strong> a new message.<br />

Prior transmitting <strong>of</strong> a new message, following requirements must be met:<br />

• The bus must have been in an continuous idle state, for a time duration <strong>of</strong><br />

at least a bus access time specific to this message and<br />

• <strong>the</strong>n finally confirm that immediately prior attemt to send, still having <strong>the</strong> bus<br />

in idle state.<br />

This ’unknown-zone’ is <strong>the</strong> time between meeting all requirements and <strong>the</strong> actual transmitting<br />

<strong>of</strong> <strong>the</strong> first byte. (5.2.1).<br />

7.5.2 Traffic load on bus<br />

Make presentation <strong>of</strong> traffic load on <strong>the</strong> bus.<br />

7.5.3 Count collisions<br />

Make presentation <strong>of</strong> number <strong>of</strong> collisions.<br />

7.5.4 Monitor communication<br />

Make <strong>the</strong> instrument to monitor and notify, or log, events <strong>of</strong> interest not following <strong>the</strong><br />

recommended practice in <strong>the</strong> <strong>SAE</strong> <strong>J1708</strong> standard [13].<br />

7.5.5 Decode messages<br />

Decode messages on <strong>the</strong> bus. If having <strong>the</strong> possibility to decode messages and presenting this<br />

i plain text, one would gain lot <strong>of</strong> useful insight when confirming functionality and behaviour<br />

<strong>of</strong> a system. With aid <strong>of</strong> decoded messages it would be straight forward to find answers to<br />

questions such as…<br />

• If collisions are common, who is most <strong>of</strong>ten involved?<br />

• Does a specific message have right settings in priority?<br />

• What specific bus access time a message has?<br />

17


• How <strong>of</strong>ten do some node access <strong>the</strong> bus?<br />

• Do we have correct checksum count?<br />

8. Method<br />

To start with <strong>the</strong> first measurements to be done with <strong>the</strong> DSO is to get familiar with it.<br />

Learning by doing. At my service <strong>the</strong>re is (in <strong>the</strong> beginning), a single ECU connected thru<br />

devices to a PC. I shall call this ‘test-bench’environment, <strong>the</strong> Workplace simulation<br />

equipment. Access to <strong>the</strong> ‘real-world’ simulation measurements (hereafter Laboratory<br />

simulation equipment) on a complete system in use will be done at a later phase. Both systems<br />

will be used to ga<strong>the</strong>r data to analyse and compare. There are different things accessible from<br />

one and/or both systems when collecting important data to this <strong>the</strong>sis work. One example <strong>of</strong><br />

this could be, having delays in mind, that measures are expected to give different results/data<br />

depending on <strong>the</strong> total number <strong>of</strong> connected ECU’s that do communicate.<br />

8.1 Workplace simulation equipment<br />

This equipment makes it possible to edit and send own messages to a single connected ECU<br />

at <strong>the</strong> o<strong>the</strong>r end. A computer having <strong>the</strong> J1587 Navigator program may communicate by<br />

sending messages having UART format, passing a converter and when reaching connected<br />

ECU, having data interpreted according to <strong>the</strong> physical layer <strong>J1708</strong> <strong>protocol</strong> (<strong>the</strong> UWA in<br />

between is required for serial communication thus converting UART characters to <strong>J1708</strong><br />

standard sent). This is something to remember because measurements made here will differ<br />

from <strong>the</strong> ’real-world’ simulated environment measurements in <strong>the</strong> laboratory. One big<br />

advance <strong>of</strong> this is however that it was possible to solder physically contacts to o<strong>the</strong>rwise<br />

unreachable Tx and Rx on <strong>the</strong> ECU. This made it possible to ga<strong>the</strong>r information and make<br />

fur<strong>the</strong>r conclusions on how to make alternative measurements in a system at operating mode<br />

(without physical Tx and Rx available).<br />

8.2 Laboratory simulation equipment<br />

Here newly developed electronic equipment is tested thouroughly. The ’measurement-rigs’<br />

environment is meant to simulate a complete running vehicle, in my case a wheel loader.<br />

(Wow! It was an exiting experience to see all this, at <strong>the</strong> leading edge <strong>of</strong> technology).<br />

Measurement is done by connecting probes to <strong>the</strong> bus on <strong>the</strong> fly (point A and B, figure 5)<br />

Several connected nodes communicating will have influence on bits <strong>of</strong> information travelling.<br />

There is expected to be transition delays due to added capacitance when several nodes<br />

connected. The added capacitance comes from transmit/receive filters that is in use for electro<br />

magnetic interference (EMI) suppression. This will influence <strong>the</strong> shape <strong>of</strong> square waves to<br />

stretch out and has to do with releasing charge in capacitors.<br />

8.3 Measurement to be done for voltage levels<br />

Work is to be done from <strong>the</strong> basic physical requirements and up, according to <strong>the</strong> analysis<br />

topics. Starting with <strong>the</strong> voltage levels on <strong>the</strong> bus …<br />

18


7.1.1 Measurement to be done both at <strong>the</strong> Workplace and Laboratory environments. Use <strong>of</strong><br />

own settings, chosen from <strong>the</strong> parameter functions in <strong>the</strong> DSO. Functions are for <strong>the</strong><br />

waveforms in <strong>the</strong> typical amplitude (vertical) domains. Acquire longer sequence to<br />

verify same behavior over long time. Sample rate not <strong>of</strong> primary concern.<br />

7.1.2 The vision <strong>of</strong> a powerful tool for verification <strong>of</strong> ECU’s behaviour, has to operate on<br />

<strong>the</strong> only accessible points A and B on <strong>the</strong> bus. The only place to hook probes to, just<br />

to minimize work and time on preparations. The laboratory is in tight scheduled use<br />

and if in future wanting to verify on a vehicle in <strong>the</strong> field, <strong>the</strong>n this criteria must be<br />

met. No mixing with <strong>the</strong> ECU’s prior to measurement. This leads us to difficulties<br />

when trying to measure things where physical access to Rx is a necessity to get exact<br />

answers (1.2, 2.2 and 2.3. switching levels at right differences and transition delays in<br />

mind). This was <strong>the</strong> case for <strong>the</strong> ‘real’ measurements to be done at <strong>the</strong> Laboratory<br />

simulation equipment. The single ECU unit in use at Workplace, however gave<br />

permissions to solder physical attachments to both Tx and Rx. From measurements<br />

made on <strong>the</strong> physically available points, conclusions and ideas can be made for<br />

alternative approximative measurements for verification <strong>of</strong> Laboratory settings.<br />

Never<strong>the</strong>less, measurement made on physically available Tx and Rx at Workplace<br />

with one connected node. Send <strong>the</strong> message 085 127 001 with having a calculated<br />

checksum <strong>of</strong> 043 added by <strong>the</strong> J1587Navigator program. This script gives an easy to<br />

understand waveform to analyse. From this it is possible to measure a lot <strong>of</strong><br />

information. Bit times for ones and zeros, interbyte delays and interpretation <strong>of</strong> a<br />

character. Same answers from complete system in use can to some extent be done with<br />

built-in functionality <strong>of</strong> <strong>the</strong> oscilloscope, namely with WaveScan with proper settings.<br />

8.4 Measurement to be done for single bits.<br />

At <strong>the</strong> Workplace it is straightforward to verify delays between transmitting and receiving.<br />

Set high sample rate to obtain high quality in measurement, though we are talking about<br />

actions that are expected to take place in times around and less than a millionth <strong>of</strong> a<br />

second. In Laboratory, by using WaveScan once again for 7.2.1 but better accuracy<br />

manually for 7.2.2 and 7.2.3. Trig on whatever message on <strong>the</strong> bus and save for analysis.<br />

The Laboratory environment is in heavy use when development <strong>of</strong> new products take<br />

place. Tight scheme and not wanting to interfere with ‘real’ work going on made a change<br />

in strategy. Don’t sit in <strong>the</strong> Laboratory more than just hooking on probes on <strong>the</strong> bus and<br />

acquire waveforms at different sample rates and save <strong>the</strong>m in <strong>the</strong> instrument with <strong>the</strong><br />

LabNotebook feature. Analyse material at o<strong>the</strong>r location in calm.<br />

A short explanation to why not use maximum rates all <strong>the</strong> time. Remembering that…<br />

“The high 10 GS/s maximum sampling rate and<br />

extremely long 25 Mpts memory guarantee you are capturing<br />

all <strong>of</strong> <strong>the</strong> details in your signals.” [3]<br />

…although having memory enough to store this 25 Mpts in 16 bit resolution, be sure <strong>of</strong> that<br />

a samplerate <strong>of</strong> 10 GS/s fills this up in just 2.5 ms. So very high quality samples <strong>of</strong> a<br />

waveform gets only that short trace <strong>of</strong> information. A single character is supposed to be<br />

19


around 10*104,17 µs = 1.04 ms, hence able <strong>of</strong> capturing about two characters. Obviously<br />

thought in sample rates has to be accordingly to how long sequences interested in.<br />

7.2.4 Communication is done at speeds <strong>of</strong> 9600 baud accordingly to <strong>the</strong> standard. There is<br />

although a possibility to speed things up when using <strong>the</strong> same <strong>protocol</strong> while loading<br />

new s<strong>of</strong>tware to an ECU. Making some acquisitions once again at different rates. This<br />

is made in Laboratory and saved with LabNotebook for future analysis.<br />

8.5 Measurement to be done for characters.<br />

7.3.1 For Workplace environment, earlier measurement from 7.1.2 can be used. For<br />

Laboratory, where physical attachements to Tx and Rx are simply not available this<br />

has to be solved with some o<strong>the</strong>r method. This I will present later, revealing that once<br />

again WaveScan <strong>of</strong>fers a quick answer when setting up with search criteria and filters.<br />

7.3.2 Methods used in 7.3.1 works here as well.<br />

8.6 Measurement to be done for messages.<br />

7.4.1 WaveScan feature makes things simpler to an engineer once again.<br />

7.4.2 Measurement to be done at both Workplace and Laboratory. This time with higher<br />

settings in sample rates. Expecting very short delays. Acquisitions made on several<br />

different ECU’s to reveal specifics for each and all.<br />

7.4.3 Make assumptions based on <strong>the</strong> large amount <strong>of</strong> aqcuisitions made when analysing.<br />

More work to be done here if wanting automatic measurement. Conclusions have been<br />

made, returning to this topic later.<br />

8.7 Measurement to be done for fur<strong>the</strong>r analysis.<br />

Most effort to be put into solving earlier stated requirements. Some reflections and<br />

conclusions made at this exciting topic comes later.<br />

9. Results<br />

Following table show a very brief summation <strong>of</strong> what has been possible to view/measure with<br />

<strong>the</strong> DSO at this state. Some values presented toge<strong>the</strong>r with picture numbers in where to find<br />

specific data. Much more measuring and monitoring to make on existing systems before<br />

giving guarantees <strong>of</strong> behaviour. So far everything looks accordingly to <strong>the</strong> specifications.<br />

Custom made scripts should be able solve problems concerning 7.5.1 - 7.5.5. WaveScan<br />

feature <strong>of</strong> <strong>the</strong> DSO, with proper settings, <strong>of</strong>fers a very useful s<strong>of</strong>tware tool in search for some<br />

events <strong>of</strong> interest.<br />

20


Requirement nr Result Comment Figure<br />

7.1.1 Bus state levels X 3.6 - 4.0 V 6-9, 20, 22-26<br />

7.1.2 Bits and voltage differences X 10, 12<br />

7.2.1 Verify bit time X 104 μs 13, 14<br />

7.2.2 Low-to-high delay X 5.61 μs 12<br />

7.2.3 High-to-low delay X 91 ns 15<br />

7.2.4 Higher frequecies X 16-19<br />

7.3.1 Interpretation X 11, 14<br />

7.3.2 Character time duration X 1.0399 ms 11, 14<br />

7.4.1 Idle state X 20<br />

7.4.2 Inter byte delays X 0–104.7 μs 21<br />

7.4.3 Message lengths X 22-26<br />

7.5.1 Unknown-zone ---<br />

7.5.2 Traffic load on bus (X) (WaveScan) 20<br />

7.5.3 Count collisions ---<br />

7.5.4 Monitor communication (X) (WaveScan) 27<br />

7.5.5 Decode messages --- (test <strong>of</strong> script)<br />

Table 1: Results in brief<br />

Having used LabNotebook features <strong>of</strong>fered by <strong>the</strong> DSO throughout <strong>the</strong> work when saving<br />

interesting waveforms, makes it easy to present result. A picture contains so much<br />

information. This method <strong>of</strong> presenting results will be used and commented demand after<br />

ano<strong>the</strong>r. Let us begin with having analysis to be done on bus state levels...<br />

21


9.1 <strong>Analysis</strong> <strong>of</strong> results<br />

Figure 6: Voltage levels on bus, workplace<br />

Voila! This is how things can be presented with this LabNotebook feature <strong>of</strong> <strong>the</strong> DSO.<br />

Display with colours if desired, markers with descriptive labels on what is measured and <strong>the</strong><br />

parameters P1 – P8 with values obtained by DSO parameter functions.<br />

In <strong>the</strong> lower left corner, boxes Z1(yellow) and Z2(blue) indicates that a zoom <strong>of</strong> a trace has<br />

been performed on <strong>the</strong> original waveform to have a closer look at details. Of cource <strong>the</strong><br />

displayed waveforms accordingly to respective colours. The small arrow at <strong>the</strong> lower left <strong>of</strong><br />

<strong>the</strong> grid, just above <strong>the</strong> ‘Measure’ text, indicates that <strong>the</strong> actual trigger that captured <strong>the</strong><br />

original waveform did occure earlier in time. Time is intuitively elapsing from left to right in<br />

<strong>the</strong> picture. From within <strong>the</strong> ‘Z-boxes’ data is given on how <strong>the</strong> displayed waveforms and grid<br />

relate in time (horizontal) and voltage (vertical) scales. In this case 415 μs * 10 grids make it<br />

a total <strong>of</strong> 4150 μs that has ‘ticked’ when leaving <strong>the</strong> left side and reaching <strong>the</strong> opposite side <strong>of</strong><br />

<strong>the</strong> screen. Hence this picture displays at least three characters captured when travelling on<br />

<strong>the</strong> bus. This is how it works. There exists a lot <strong>of</strong> o<strong>the</strong>r built-in features to use. Having in<br />

mind that <strong>the</strong>re is a lot <strong>of</strong> possibilities in customizing looks and functionality if not enough.<br />

What a fantastic Instrument this is!<br />

Please note that ‘Tbase’ and ‘Trigger’ boxes in lower right corner are used when setting up<br />

<strong>the</strong> instrument prior to acquiring desired action. Tbase have settings, most importantly, on<br />

sample rates and thus length <strong>of</strong> captured data in time. Trigger-box, when opened, enables<br />

trigger settings to change. Trigger condition met is <strong>the</strong> thing that starts <strong>the</strong> acquisition <strong>of</strong> data.<br />

Readings inside <strong>the</strong> Tbase-box tells that <strong>the</strong> acquisition was made with 25 M samples per<br />

second and with <strong>the</strong> time/div setting <strong>of</strong> 20 ms, <strong>the</strong> original displayed waveform contained <strong>of</strong><br />

5 M points <strong>of</strong> data. (Be aware <strong>of</strong> following. If working on saved waveform data that has been<br />

uploaded to <strong>the</strong> instrument, <strong>the</strong>n one must not trust on <strong>the</strong> values shown in <strong>the</strong> boxes. These<br />

are <strong>the</strong>n simply content <strong>of</strong> earlier captures done).<br />

That was a lot <strong>of</strong> information from one single picture! Lets continue with <strong>the</strong> work…<br />

22


Figure 7: Voltage levels on bus, laboratory equipment<br />

This capture (fig.7) made on <strong>the</strong> Laboratory equipment with a live system consisting <strong>of</strong><br />

several ECU’s communicating. <strong>Analysis</strong> <strong>of</strong> revealed data tell us that everything is nice. What<br />

is shown here are two channels M2 and M3, by that we know this being saved waveforms<br />

uploaded into DSO memory. In <strong>the</strong> parameter P1 – P4 readings, values are for <strong>the</strong> red trace.<br />

P5 – P8 have data on <strong>the</strong> blue trace. The red trace is point A measured on <strong>the</strong> bus, this<br />

because it toggles at higher voltage levels than <strong>the</strong> blue. The blue one is a probe attached onto<br />

point B. At least possible to make <strong>the</strong>se conclusions just by hooking probes on <strong>the</strong> bus on <strong>the</strong><br />

run. More information shall follow. Before finishing this one.Voltage levels are toggeling<br />

between top and base readings with 4.772 V and 875 mV for <strong>the</strong> measured point A on <strong>the</strong> bus<br />

and 4.097 V – 102 mV at point B (for A and B see fig.5).<br />

Conclusion to make, <strong>the</strong> analysis on this requirement is proven. Measurements to be read in<br />

<strong>the</strong> P1 – P8 values, clearly show that bus state levels according to standards are met.<br />

Next to follow, an additional trace from laboratory environment that spans over a very long<br />

period <strong>of</strong> time. According to M3 data it is a 200 ms * 10 = 2 second long trace. This is made<br />

on a single channel. Because majority <strong>of</strong> <strong>the</strong> values are at high voltage levels, a conclusion <strong>of</strong><br />

that , point A is measured and displayed here. How do we know that? Remembering that <strong>the</strong><br />

bus have to be in an idle state before bus access is allowed. Idle state exist when logical high<br />

level. Those peaks that point down are separate messages exchanged on <strong>the</strong> bus. Also note<br />

that some peaks are longer than o<strong>the</strong>rs, reaching negativ potential at some occations.<br />

According to P6, -384 mV. More on this later…<br />

23


Figure 8: Very long trace from bus A with voltage levels<br />

Below, measurement on communication at point B on <strong>the</strong> bus at Lab. Trace (red) from same<br />

instant as <strong>the</strong> (blue) A bus above.The yellow pillars show histogram – statistical data toge<strong>the</strong>r<br />

with parameter measurements. Note that this looks more stable, <strong>the</strong> peaks are smaller here,<br />

4.8 volts according to P4 : pkpk(M2).<br />

Figure 9: Very long trace from bus B with voltage levels<br />

24


Figure 10: High sample rate acquisition<br />

Workbench measurement having physical connections to Tx and Rx available. This<br />

acquisition (fig.10) is captured at very high sample rate to get <strong>the</strong> details. The memory traces<br />

show a lot <strong>of</strong> information. Besides <strong>the</strong> data needed to verify that receiving bits follow <strong>the</strong><br />

differences between bus state levels >= 0.2 V. Persistence mode with colour on displayed<br />

traces helps to sort out when this change in state for Rx occurs. Manual measurement with<br />

cursors. Value that confirms valid behaviour in <strong>the</strong> M-boxes. Δy = 201 mV.<br />

Figure 11: Measurement with WaveScan<br />

Physical Rx with WaveScan features applied on. Once again a picture that many things can be<br />

read from. This time with annotations included with <strong>the</strong> LabNotebook. WaveScan gives<br />

highlighted areas on features found and table ldx on left hand side. This (fig.11) show all ‘1’<br />

in a message. Values in table measures <strong>the</strong> marked areas in <strong>the</strong> trace, pulse after ano<strong>the</strong>r.<br />

25


Left most marking shown at <strong>the</strong> first row in ldx-table. It is easy to make <strong>the</strong> feature to show<br />

zeros instead, or why not both. With this kind <strong>of</strong> data is also possible to verify requirements in<br />

7.3.1 and 7.3.2<br />

Figure 12: Low-to-high transition delay<br />

Low-to-high transition delay as it looks with physical TX and Rx available at Workbench<br />

environment with one single ECU connected. Applying manual measurement with cursors<br />

show Δx = 5.610 μs in lower right corner. This is well within acceptable 10 μs according to<br />

<strong>the</strong> <strong>SAE</strong> <strong>J1708</strong> standard. Returning to <strong>the</strong> question <strong>of</strong> how to search for an answer at ‘real’<br />

measurement on <strong>the</strong> bus when physical Tx and Rx simply is not <strong>the</strong>re? It is reasonable to get<br />

a very good approximisation when observing <strong>the</strong> fact that, at <strong>the</strong> very instant Tx (yellow)<br />

drops in level, <strong>the</strong> A (blue) shall begin rising. Activate WaveScan with <strong>the</strong> criteria to measure<br />

between base level <strong>of</strong> <strong>the</strong> A bus and when reaching level that is 0.2 V more positive than <strong>the</strong><br />

one on B. This will enable automatic measurement to be performed by <strong>the</strong> WaveScan<br />

s<strong>of</strong>tware. If not accurate enough, stop and make manual measurement with same assumptions.<br />

Figure 13: Bit times and WaveScan<br />

26


Here WaveScan is in use at <strong>the</strong> Laboratory (fig.13). Automatically and quickly presenting<br />

data on bit times from <strong>the</strong> bus. Zoom in and let <strong>the</strong> s<strong>of</strong>tware reveal even better readings if <strong>the</strong><br />

original waveform acquired at high sample rate.<br />

Figure 14: One character<br />

Of cource <strong>the</strong>re is <strong>the</strong> possibility to measure manually, now that <strong>the</strong> interesting features have<br />

been captured. Here one character displayed with highlighted areas. With this kind <strong>of</strong> data it is<br />

also possible to verify requirements 7.2.1, 7.3.1, 7.3.2 and 7.4.2 on ‘real’ systems. Hence<br />

verified from now on that this particular character consist <strong>of</strong>…<br />

• One low level startbit (0)<br />

• 8 data bits to follow ( 1101 1010 ).<br />

• Ended by one stop bit (1), with possibly added time for interbyte delay.<br />

Comparing ldx values 6 and 8 from <strong>the</strong> table, tells us that no interbyte delay noticed. If still<br />

not satisfied make ano<strong>the</strong>r even more detailed acquisition. Manual use <strong>of</strong> cursors to measure<br />

time duration <strong>of</strong> this character gives Δx = 1.0399 ms. According to <strong>the</strong> standard, within<br />

10 * 104,17 µs = 1.0417 ms ± 0.5 %. This is now verified.<br />

27


Figure 15: High-to-low transition delay<br />

High-to-low transition delay as it looks with physical TX and Rx available in <strong>the</strong> Workbech<br />

environment with one single ECU connected. Use <strong>of</strong> very high sample rate. Δx = 91 ns.<br />

This value is expected to grow with connected units. 0.6 - 2.3 µs or below acceptable. The<br />

interested reader should also have noticed <strong>the</strong> numerous alternatives to present waveforms on<br />

<strong>the</strong> screen.<br />

This and following page shall reveal content from measurements done when communicating<br />

at higher baud rates. Traces are shown in following order, 9600, 38 400, 57 600 and finally at<br />

115 200 baud (figures 16, 17, 18 and 19).<br />

Figure 16: 9.600 baud<br />

28


Figure 17: 38.400 baud<br />

Figure 18: 57.600 baud<br />

Figure 19: 115.200 baud<br />

Top and base levels at 38.400 baud are getting shorter. Differences in voltage levels may no<br />

longer be interpreted as <strong>the</strong>y should at rates 57k and 115k. New changes in bus state levels<br />

between A and B happens before <strong>the</strong>y even have <strong>the</strong> state <strong>of</strong> <strong>the</strong> previous one. These traces<br />

were catched when flashing ECU with new s<strong>of</strong>tware in Laboratory. It did not succeed.<br />

Uploading failed, leaving ECU in a corrupted state because some vital data was already saved<br />

in memory before crashing.<br />

29


Figure 20: Idle state times on bus<br />

WaveScan highlighting events from Lab on a trace that spans over 200 ms. Features found<br />

show time for bus in idle state. Sections with peaks are different messages accessing <strong>the</strong> bus<br />

when fulfilling bus access time based on priority <strong>of</strong> <strong>the</strong> message to be sent. Easy to confirm<br />

length <strong>of</strong> messages with use <strong>of</strong> cursors. Table show 9 events, a conclusion that 9 – 1 = 8<br />

complete messages displayed. Once again <strong>the</strong>re is some unit sending messages having peaks<br />

larger than usual. Who could this be?<br />

Figure 21: MID, Message Identifier<br />

30


A closer look at messages 1, 2, 4 and even <strong>the</strong> longer message nr 7 (fig.20). They all show <strong>the</strong><br />

same bit pattern in first character. This message identifier (MID) manually decoded to<br />

(0000 0001) equals to 128, identifies a specific ECU. The zoom at this wave (fig.21) clearly<br />

shows <strong>the</strong> negative overshoot deviating from normal base level. This ECU also differs from<br />

<strong>the</strong> o<strong>the</strong>rs in use by having an interbyte delay. Compare bit times for a usual (1) at row 6 in<br />

table, with a stopbit and delay found at row 10. Interbyte delay <strong>of</strong> this unit counts<br />

approximately, thus obtained with WaveScan, to 104,7 µs.<br />

Next to be presented are several different identified units exchanging data in <strong>the</strong> Laboratory.<br />

An alternative way <strong>of</strong> viewing traces here. Some original waveform loaded into DSO memory<br />

and at <strong>the</strong> same time zoomed in for fur<strong>the</strong>r analysis. Both visualized at <strong>the</strong> same time. I leave<br />

comparison <strong>of</strong> values to <strong>the</strong> interested reader (figures 22, 23, 24, 25 and 26).<br />

Figure 22: Unit to identify<br />

31


Figure 23: Unit to identify<br />

Figure 24: Unit to identify<br />

32


Figure 25: Unit to identify<br />

Figure 26: Unit to identify<br />

33


10. Future work/recommendations<br />

• Use <strong>of</strong> EXCEL to add idle state times in ldx table gained with functionality <strong>of</strong>fered by<br />

WaveScan. It might give easy calculation <strong>of</strong> bus utilization.<br />

• Study use <strong>of</strong> Histograms in more detail to present statistical distribution <strong>of</strong> events.<br />

It might give easy calculation <strong>of</strong> bus utilization.<br />

• Study found collisions closer. Visualised in this capture by having short pulses and<br />

strange wobbeling at top levels in <strong>the</strong> beginning (2:nd pulse width < 72 μs in fig.27 ).<br />

Figure 27: Collision<br />

• Develop a ‘<strong>J1708</strong> DECODER’ with VBScript that monitors and decodes messages in realtime<br />

traffic, highlighting when search criteria met. Fur<strong>the</strong>r development on tested scripts<br />

with promising result. Let’s have a look…<br />

34


Figure 28: VBScript and simulated RX vs. real physical RX<br />

Above, F1-box shows that VBScript is in use having yellow colour in <strong>the</strong> trace. It follows <strong>the</strong><br />

physical ‘<strong>the</strong> real’ Rx information very nice (waveform in green colour).<br />

Figure 29: Simulated RX and WaveScan in laboratory environment<br />

VBScript that simulates <strong>the</strong> missing physical Rx in Laboratory environment. Presented<br />

toge<strong>the</strong>r with WaveScan having appropriate set-up (fig.29). Simulated Rx follows this nice<br />

too (<strong>the</strong> yellow trace follow <strong>the</strong> edges <strong>of</strong> highlighted features that indicate approximative<br />

times <strong>of</strong> changes in state calculated by WaveScan). This is propably good enough for<br />

decoding purposes. No need to follow precisely though use <strong>of</strong> simulated Rx in decoding<br />

35


would be by reading values somewhere in <strong>the</strong> middle <strong>of</strong> pulses… Still much work to be done<br />

especially not knowing how use <strong>of</strong> script slows down acquisitions. A rule <strong>of</strong> thumb states that<br />

sample rates should be minimum 4 * bit rate. Preferably 10 * bit rate to be able to alert on<br />

some transients as well [5],[6]. This would give sample rates 10 * 9600 = 96kS/s. Sample rate<br />

settings <strong>of</strong>fered by <strong>the</strong> DSO range from 250 S/s…100 kS/s, 250kS/s, 500kS/s, 1MS/s,<br />

2,5MS/s…5 GS/s (max. 10 GS/s if 2 channel mode in use). One might also expect trouble<br />

with sychronization issues if dealing with several scripts.<br />

11. Summary and conclusions<br />

The main questions made in <strong>the</strong> problem formulation part <strong>of</strong> this <strong>the</strong>sis was<br />

1. how do delivered ECU’s implement <strong>the</strong> recommended practice when interchanging<br />

data…<br />

2. …and how about <strong>the</strong> WaveRunner 104 MXi, is it capable <strong>of</strong> answering this? If so, show<br />

we<strong>the</strong>r it is a suitable tool or not for verification and analysis<br />

From now on this should stay clear! Measured units do behave accordingly and yes, most<br />

important <strong>of</strong> all, this is a great tool to use. By <strong>of</strong>fering that much, easy to use, built-in<br />

functionality to apply on measurements, makes it a great joy to work with this instrument.<br />

We<strong>the</strong>r performing live monitoring <strong>of</strong> communication or analyzing parts <strong>of</strong> saved acquisition<br />

data.<br />

Document and share results in an easy way with <strong>the</strong> LabNotebook feature <strong>of</strong> <strong>the</strong> DSO. Create<br />

reports and annotate captures if desired. Launch prepared set-up’s to get started quickly with<br />

measurements. Load/save own settings having different functions activated when measuring<br />

or analysing data. This feature makes it possible for a person less involved to make some<br />

measuring as well.<br />

WaveScan <strong>of</strong>fers easy to use functionality to quickly find many events <strong>of</strong> interest or monitor<br />

and alert when something deviates from <strong>the</strong> expected. It might not always deliver exact values<br />

but never<strong>the</strong>less capable <strong>of</strong> finding events that may be fur<strong>the</strong>r analysed manually in detail. A<br />

tip! Use lower sample rates when searching (faster processing when limiting <strong>the</strong> amount <strong>of</strong><br />

data), when or if found features <strong>of</strong> interest, make a quick analysis and perform ano<strong>the</strong>r<br />

acquisition, this time with higher sample rate settings to get all <strong>the</strong> details.<br />

And finally, custom functionality <strong>of</strong>fered by scripting. Only imagination, processing speed<br />

and memory put limit on what is possible to solve. Concerning this <strong>the</strong>sis work, additional<br />

information/achievements would be <strong>of</strong>fered if able to make monitoring and decoding <strong>of</strong><br />

ongoing communication. With decoded messages it would be straightforward to confirm<br />

stated behavior <strong>of</strong> a complete system in use, and this only by connecting probes to a running<br />

system. This would make it possible to measure on an operating machine out on <strong>the</strong> field. It<br />

seems possible to solve complicated problems by adding custom functionality with fur<strong>the</strong>r<br />

development <strong>of</strong> scripts. The possibility to insert scripting in <strong>the</strong> processing chain <strong>of</strong> <strong>the</strong> DSO,<br />

gives immense power to this fantastic instrument.<br />

To all <strong>the</strong> involved people at <strong>the</strong> VCE Component Division I would say, ‘Congratulations to<br />

money well invested!’<br />

36


References<br />

[1] http://www.lecroy.com<br />

[2] LeCroy, Xi Series Oscilloscopes Operator´s Manual, LeCroy Technical Reference Manual, pages 49-,<br />

109-, 147-, 160-, 167-, 227-, Feb. 2008,<br />

http://www.lecroy.com/tm/library/manuals/WRXi/OperatorsManual/WRXi_OM_REVB.PDF<br />

[3] LeCroy, WaveRunner Mxi Datasheet, LeCroy Corporation, page 2,<br />

http://www.lecroy.com/tm/products/scopes/MType/WaveRunner_MXi/WRMXi.pdf<br />

[4] LeCroy, WaveScan Datasheet, LeCroy Corporation,<br />

http://www.lecroy.com/tm/products/Utilities/WaveScan/wavescan.pdf<br />

[5] LeCroy, How Fast Must I Sample?, LeCroy Application Brief, No.LAB429,<br />

http://www.lecroy.com/tm/library/LABs/PDF/LAB429.pdf<br />

[6] LeCroy, Electronics And DSO Applications, LeCroy Technical Writing,<br />

http://www.lecroy.com/tm/library/AppNotes/HighSpeedElectronics/<br />

[7]LeCroy, LabNotebook, LeCroy Application Brief, No.LAB_WM823A,<br />

http://www.lecroy.com/tm/Library/LABs/PDF/LAB_WM823A.pdf<br />

[8] http://sv.wikipedia.org/wiki/Controller_Area_Network<br />

[9] http://en.wikipedia.org/wiki/J1939<br />

[10] http://en.wikipedia.org/wiki/RS485<br />

[11] http://www.wikipedia.org<br />

[12] Society <strong>of</strong> Automotive Engineers (<strong>SAE</strong>) J1587 Recommended Practice, rev February 2002<br />

http://www.sae.org<br />

[13] Society <strong>of</strong> Automotive Engineers (<strong>SAE</strong>) <strong>J1708</strong> Recommended Practice, rev October 1993<br />

http://www.sae.org<br />

[14] http://en.wikipedia.org/wiki/J1587<br />

[15] http://en.wikipedia.org/wiki/<strong>J1708</strong><br />

[16] http://sv.wikipedia.org/wiki/UART<br />

37


Appendix A<br />

Technical data<br />

Technical data for <strong>the</strong> WaveRunner 104 MXi<br />

Aqcuisition modes for measurements Normal, Auto, Single, and Stop<br />

• Pre-trigger Delay: 0 to 100% <strong>of</strong> memory size (adjustable in 1% increments or 100 ns)<br />

• Post-trigger Delay: 10,000 divisions in real time mode; limited at slower time/div settings<br />

• Hold<strong>of</strong>f by Time or Events: 1 ns to 20 s or from 1 to 99,999,999 events<br />

Basic Triggers<br />

• Edge/Slope/Line: Triggers when <strong>the</strong> signal meets <strong>the</strong> slope and level condition.<br />

• Width: Triggers on positive or negative pulse widths. Selectable from 500 ps to 20 s or on<br />

intermittent faults (subject to bandwidth limit <strong>of</strong> oscilloscope).<br />

• Pattern: Logic combination (AND, NAND, OR, NOR) <strong>of</strong> 5 inputs, triggers acquisition.<br />

• State or Edge Qualified: Triggers on any input source only if a defined state or edge<br />

occurred on ano<strong>the</strong>r input source. Delay between sources is selectable by time or events.<br />

SMART Triggers<br />

• Dropout: Triggers if signal drops out for longer than a selected time-out , 1 ns- 20 s.<br />

• Glitch: Triggers on positive or negative glitches with selectable widths from 500 ps to 20 s<br />

or on intermittent faults (subject to bandwidth limit <strong>of</strong> oscilloscope).<br />

• Signal or Pattern Interval: Triggers on intervals selectable from 1 ns to 20 s.<br />

• Runt: Positive or negative runts defined by voltage and time limits, 1 ns - 20 s.<br />

• Slew Rate: Activates a trigger when <strong>the</strong> rising or falling edge <strong>of</strong> a pulse crosses two<br />

threshold levels.<br />

Rapid Signal Processing<br />

• Processor: Intel® 2.0 GHz or better with MS Windows® XP Pro Platform<br />

• Processing Memory: 512 MB with VL options<br />

Internal Waveform Memory<br />

Waveform: M1, M2, M3, M4 (Store full-length waveforms with 16 bits/data point.) Or save<br />

to any number <strong>of</strong> files (limited only by data storage media).<br />

• Trigger Rate: 1,250,000 waveforms per second<br />

Maximum Acquisition Points 2 Ch/4 Ch VL Memory Option 12.5M/25M<br />

Acquisition System All Channels 5 GS/ • 2 Channel Max.: 10 GS/s<br />

Acquisition Processing<br />

• Time Resolution (minimum, single-shot): 200 ps (5 GS/s); 100 ps (10 GS/s)<br />

38


Sample code<br />

‘Sample code written in VBScript to simulate physical Rx<br />

Function Update()<br />

End Function<br />

'VBS code<br />

startData = 0<br />

endData = InResult.Samples - 1<br />

ReDim simulRxArray(InResult.Samples)<br />

scalarData1 = InResult1.DataArray(false)<br />

scalarData2 = InResult2.DataArray(false)<br />

' InResult.DataArray(False) provides integer data from -32768 to 32767.<br />

' InResult.DataArray(True) provides real data<br />

' in <strong>the</strong> same unit as <strong>the</strong> vertical scale <strong>of</strong> <strong>the</strong> trace.<br />

For i = 0 To endData<br />

if scalarData1(i) > (scalarData2(i) + 800 )<strong>the</strong>n<br />

simulRxArray(i) = 16700<br />

else<br />

simulRxArray(i) = 350<br />

end if<br />

Next<br />

OutResult.DataArray(false) = simulRxArray ' integer data<br />

39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!