Using Labview for Automotive Communications and Diagnostics
Transcript of Using Labview for Automotive Communications and Diagnostics
![Page 1: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/1.jpg)
1
Using LabVIEW for Automotive Communications and Diagnostics
Tristan JonesTechnical Marketing Engineer
![Page 2: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/2.jpg)
2
Agenda
• Introduction to embedded networksCAN, LIN, FlexrayNational Instruments Hardware
• On-Board Diagnostics• Conclusion
![Page 3: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/3.jpg)
3
What are Embedded Networks?
ECU
I/OI/O
devicedevice
Without Embedded Networks
ECU
I/OI/O
devicedevice
With Embedded Networks
Embedded Network Bus
![Page 4: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/4.jpg)
4
Scope of Automotive Embedded Networks
Cost Per Node
SpeedCAN
HIGH SPEED
CANFAULT TOLERANT
LIN
FlexRay
![Page 5: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/5.jpg)
6
Controller Area Network (CAN)
Peer-to-PeerHigh Speed: 1 MbpsFault Tolerant: 125 kb/sMedium CostDifferential Signaling
Currently Most Popular
CANBUS
CANNODE
CANNODE
CANNODE
CANNODE
CANNODE
+-
![Page 6: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/6.jpg)
7
NI-CAN Driver Software
• Supports all NI PCI, PXI, and PCMCIA CAN Interfaces• Supports LabVIEW, LabVIEW Real-Time LabWindows/CVI,
Microsoft Visual Basic, Microsoft Visual C++, and Borland C/C++ programming environments
• Exposes 100% of the CAN interfaces functionality– Develop your own custom applications– 2 Built-in APIs
• Frame API • Channel API
![Page 7: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/7.jpg)
8
CAN Software
• CANopen LabVIEW Library• Automotive Diagnostic Command Set
KWP2000, Diagnostics On CAN, ISO 15765-2, • ECU Measurement and Calibration Toolkit
CCP and XCP
![Page 8: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/8.jpg)
9
Measurement and Automation Explorer (MAX)• Hardware and software
configuration utility• Import CAN database files
(.dbc or .ncd)• Create and edit CAN channels• Test panel for CAN Channels• CAN bus monitor utility• Update National Instruments
software
![Page 9: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/9.jpg)
10
Quick Demo – Channel API
![Page 10: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/10.jpg)
11
Local Interconnect Network (LIN)
Master-Slave20 KbpsCheap! Single WireSimilar to RS-485New and Lightweight
LINBUS
LINMASTER
LINSLAVE
LINSLAVE
LINSLAVE
LINSLAVE
LINSLAVE
![Page 11: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/11.jpg)
12
GOOD: Low-cost USB-CAN/LIN (New!)
![Page 12: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/12.jpg)
13
USB CAN and LIN
• Low-Cost solution starting at £215• Offered in HS, LS, and LIN versions• HW sync options available from £315• Frame API only
![Page 13: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/13.jpg)
14
USB CAN and LIN Targeted Applications
• AutomotiveIn-Vehicle Data Logging (Via MAX) Bus monitoringAutomotive Diagnostics
• OBD-II• Reading Trouble Codes• Initiating Tests
• Benchtop
![Page 14: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/14.jpg)
15
Synchronisation (USB-847xS models)• 3-pin COMBICON connector• Shared timestamp clock, and start trigger• Slave: Auto detection of 20 Mhz, 10 Mhz, or 1
Mhz external clocks• Master: Generates 1MHz clock
CAN, LIN DAQ
Vision
Motion
![Page 15: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/15.jpg)
16
Better: Series 2 CAN
![Page 16: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/16.jpg)
17
National Instruments Series 2 CAN Hardware
• High speed CAN Max. Baud rate 1Mb/s
• Low speed/Fault-tolerant CANMax. Baud rate of 125kb/s
• Single Wire CAN • Software Selectable CAN
High, Low, or Single Wire
![Page 17: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/17.jpg)
18
BEST: CompactRIO CAN module
![Page 18: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/18.jpg)
19
CAN on CompactRIO• 2 Port High-Speed & Low-speed CAN
Modules• Transmit / Receive 100% bus load at 1
Mbps• ISO 11898-compliant for standard (11-
bit) and extended (29-bit) arbitration IDs
• Hardware Synchronisation with any CompactRIO I/O Module
![Page 19: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/19.jpg)
20
FlexRay
![Page 20: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/20.jpg)
21
Increased Communication Across Subsystems
![Page 21: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/21.jpg)
22
FlexRay History: 1990’s• CAN too limited for X-by-wire
Bandwidth: bits per secondDeterminism: frame at precise timeRedundancy: tolerate failures in cable or ECU
• Assumption: Standard protocol• Various contenders
TTCAN, TTP, Byteflight, …Byteflight used as basis of FlexRay 1.0 standard
![Page 22: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/22.jpg)
23
Will FlexRay Replace CAN?
• No: Ongoing Cost/Benefit tradeoffs
![Page 23: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/23.jpg)
24
BMW Ships First Car with FlexRay
• 2007 BMW X5• AdaptiveDrive: Controls roll and dampening• Uses single FlexRay channel
![Page 24: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/24.jpg)
25
NI FlexRay Solutions
• Currently NI does not make FlexRay Interfaces• Recommended boards:
TZM FlexRay PXI InterfaceUsed by MicroNova in BMW Engine Simulator
![Page 25: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/25.jpg)
26
On Board Diagnostics (OBD)
Automotive Diagnostic
Command Set
USB CAN Interfaces
![Page 26: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/26.jpg)
27
![Page 27: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/27.jpg)
28
NOx
Smog
= CxHy+
![Page 28: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/28.jpg)
29
![Page 29: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/29.jpg)
30
Closed-Loop Emissions System
![Page 30: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/30.jpg)
31
Problem: How do regulators test and enforce functioning emissions
systems?
![Page 31: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/31.jpg)
32
Solution: On Board Diagnostics Standards
• EmissionsMove the testing from garage to the car
• Test toolsReduce variety of tools & costs for repair centers
• Fringe benefits for EngineersUniversal access to engine parameters and trouble codes
![Page 32: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/32.jpg)
33
History of On-board Diagnostics
• 1970 – Clean Air Act• 1982 – GM OBD-I Systems• 1988 – CARB OBD-1 Requirement• 1996 – Federal OBD-II Requirement• 2001 – EU adopts EOBD• 2008 – CAN-based OBD-II
![Page 33: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/33.jpg)
34
Diagnostics are good for Manufacturers…
• Longevity / accelerated testing• Assist all testing procedures • Diagnostic Trouble Codes• Custom control of on-board devices• Download ECU updates
![Page 34: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/34.jpg)
35
Diagnostics are good for the Aftermarket…• Diagnostic Trouble Codes• Logging vehicle data during tests• Standard interface for all new automotives• Wide Variety of data• “Black box”Not good for:• Deterministic data• High sampling rates (over 5-10 Hz)• Model-specific data (without documentation)
![Page 35: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/35.jpg)
36
OBD-II Architecture
P0010 P1522P1011 P0171P0525 P0028
P0010 P1522P1011 P0171P0525 P0028
$01 $02 $03$04 $05 $06$07 $08 $09
$01 $02 $03$04 $05 $06$07 $08 $09
![Page 36: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/36.jpg)
37
![Page 37: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/37.jpg)
38
Diagnostic Services
• Embedded Network Buses are simple:8-Byte FramesNo built-in large message handling
• What if we want to: Not interrupt critical communicationsSend messages, strings, or codes larger than 8 bytes?Send new Firmware to the ECU?Establish a session with the ECU?
![Page 38: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/38.jpg)
41
Automotive Diagnostic Command Set• Set of functions for automotive protocols• Implement automotive diagnostic
protocols in LabVIEW and CVI/C KWP2000 and Diagnostics On CAN
• Works with all NI CAN interfaces• Develop and deploy custom
diagnostic applications
![Page 39: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/39.jpg)
42
• http://ni.com/can/• Supports standard KWP2000
and ISO-15765 services• Includes ECU Simulator
example
Automotive Diagnostic Command Set
![Page 40: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/40.jpg)
43
Test Services• SAE J1979 (ISO 15031-5): Defines test
modes and parameters• Services of interest:
$01 – Get Real-Time Diagnostic Data$02 – Get Freeze Frame data$03 – Get Trouble Codes$04 – Clear Trouble Codes$06 – Specific system monitoring Results$09 – Current Vehicle Information
![Page 41: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/41.jpg)
44
Applications
• Real-time display of parameters not on dashboard• Logging vehicle data• Correlating vehicle data measurements to other
measurements (Sound, Vibration, Acceleration, voltage, etc)
• Custom garage test-tools
![Page 42: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/42.jpg)
45
Primary Engine ECU
NI Tools for Automotive Diagnostics
NI Automotive DiagnosticCommand Set
NI USB-8473(s)CAN interfaceDB9 to J1962 adapter cable
![Page 43: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/43.jpg)
46
NI Automotive DiagnosticCommand Set
NI USB-8473(s)CAN interfaceDB9 to J1962 adapter cable
![Page 44: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/44.jpg)
47
• Full compiled, graphical programming environment
• Target desktop, mobile, industrial, and embedded
• Thousands of out-of-the box mathematics and signal processing
• Seamless connectivity with millions of I/O devices
![Page 45: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/45.jpg)
48
Fig 1. The “Subject”Fig 1. The “Subject”
![Page 46: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/46.jpg)
49
![Page 47: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/47.jpg)
50
![Page 48: Using Labview for Automotive Communications and Diagnostics](https://reader035.fdocuments.net/reader035/viewer/2022082208/55cf99f4550346d0339fdc6e/html5/thumbnails/48.jpg)
51
Summary
• Introduction to embedded networksCAN, LIN, FlexrayNational Instruments Hardware
• On-Board Diagnostics• Conclusion