1 / 39

CANbus Solutions and National Instruments

CANbus Solutions and National Instruments. Agenda. Automotive test systems Introduction to CAN CAN basics Overview of National Instruments CAN solution Typical automotive test applications Synchronization capabilities with CAN and DAQ Real- time capabilities with CAN and DAQ.

denzel
Download Presentation

CANbus Solutions and National Instruments

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CANbus SolutionsandNational Instruments

  2. Agenda • Automotive test systems • Introduction to CAN • CAN basics • Overview of National Instruments CAN solution • Typical automotive test applications • Synchronization capabilities with CAN and DAQ • Real- time capabilities with CANand DAQ

  3. Traditional Test Systems PC Sensor-Based Vehicle DAQ Signal Conditioning Point to Point wiring Thick cable harness

  4. PC CAN Requirement: Synchronization with DAQ DAQ CAN-based Test Systems Need: Validate vehicle CAN systems Single CAN cable

  5. Introduction to CAN So, what is CAN?

  6. CAN – Open Industry Standard • Invented by Bosch in mid-80s • High-speed CAN – ISO 11898 • Low-speed CAN – ISO 11519 (fault tolerant CAN) • Heavily used in automotive • Physical layer for DeviceNet, CANOpen, SDS

  7. Huge Market in Automotive • Well established in German/European automotive • High growth in U.S./Japanese automotive

  8. CAN – Automotive Applications Power Steering Power Windows Lights Instrument Panel ABS Transmission

  9. Other CAN Markets Public Transportation CAN Military Systems Avionics Farm Machinery

  10. CAN Basics

  11. Types of CAN • High speed CAN (ISO 11898) • Up to 1 M bits/sec transmission rate • Low speed CAN (ISO 11519) • Up to 125 K bits/sec transmission rate • Fault tolerant

  12. Benefits of CAN • Lower cost from reduced wiring – Multidrop cable • Compared to two wire point-to-point wiring • Highly robust protocol • Built-in determinism • Fault tolerant (low-speed CAN) • Reliable – proven in field • Track history of 10+ years in the automotive industry

  13. CAN Physical Layer Specifications • CAN data (up to 8 data bytes in a frame) • Maximum 1 Mbit/sec • 40 Meters at 1 Mbit/sec • 6 Km at 10 kbit/sec • Maximum 2032 nodes per bus (theoretical) • Approximately 100 node practical due to transceiver • About 3-10 nodes are used in practice

  14. CAN Frame Types • Data frames - Arbitration ID (11 bit or 29 bit) • Indicates message priority • Remote frame • Error frame • Overload frame

  15. Device A transmits ID = 110 0100 0111 (647 hex) 1 1 0 0 1 0 0 0 1 1 1 Device B transmits ID = 110 1100 0111 (6C7 hex) 1 1 0 1 Device B loses, and goes idle until end of frame Device A wins, and proceeds CAN Arbitration When two devices attempt to transmit simultaneously, CAN uses non-destructive bitwise arbitration to resolve the collision.

  16. CAN Data Frame – Example Gearbox CAN Data Frame 0x5 Temperature Pressure Torque …. …. ID 4 bytes 2 bytes 2 bytes ABS CAN Data Frame Data – 8 bytes 0x10 Temperature Torque …. …. ID 4 bytes 2 bytes Data – 8 byte ( 2 bytes not used)

  17. National Instruments CAN Solution

  18. National Instruments CAN Hardware • High speed CAN (ISO 11898) • PCI, PXI/CompactPCI, PCMCIA, ISA • 1 and 2 ports • Max. Baud rate 1mb/s • Low speed CAN (ISO 11519) • PCI, PXI/CompactPCI, PCMCIA • 1 and 2 ports • Max. Baud rate of 125kb/s • Dual speed CAN (ISO 11898 & ISO 11519) • PCI, PXI/CompactPCI, PCMCIA • 2 ports (1 high speed and 1 low speed)

  19. National Instruments CAN Software • LabVIEW VI library • LabWindows/CVI language interface • C/C++ language interface • Bus Monitor utility – for easy monitoring and logging • Special CAN bus features • Support for synchronization with NI-DAQ • Support for LabVIEW Real-Time under PXI

  20. NI-CAN access to the CAN bus • Object oriented architecture • CAN Network Interface Object - CAN port • Low level access to CAN bus • When writing or reading you must specify the ID, data length, etc... of interest • CAN Object - encapsulates a specific arbitration ID along with its data • High level access • At configuration time, you specify ID, data length, etc.. of interest

  21. NI-CAN – Network Interface Object ID3 ID1 ID2

  22. NI-CAN – CAN Objects Receive data periodically using remote frame Transmit data periodically Transmit periodic waveform ID1 ID2 ID3 ID1 ID2 ID3

  23. PC NI-CAN Architecture (Windows) Your Application NI-CAN Driver RTSI Shared Memory CAN Network CAN Stack

  24. Automotive Test Applications

  25. Typical CAN Applications • CAN device durability testing • CAN device validation testing • Examples: • Torture testing of a gear box • Testing instrument clusters • Testing an ABS system

  26. P T T Temp DAQ Synchronized with CAN - “Hard” Temp Pressure Torque …. ….. Example – Gearbox Test DAQ-controlling the test stand -”Soft” PC CAN bus CAN DAQ CAN Frames

  27. Synchronization with CAN & DAQ

  28. Software Synchronization • Loop/global variable controlled • Pros • Easy to implement • Cons • Non-deterministic due to software latency • Measurement data not time-correlated with CAN data • Requires manual correlation for charting or analysis

  29. Hardware Synchronization • Hardware controlled • Pros • Very deterministic because no software timing • Measurements time-correlated with CAN data • Simplifies charting and analysis • Cons • Requires support from hardware vendor

  30. RTSI™ – Real Time System Integration • Timing and Trigger bus used by National Instruments • PXI: implemented on PXI trigger bus • PCI: requires RTSI cable • CAN board configurable as RTSI master or slave • Synchronize to one or more CAN or DAQ interfaces • Synchronize to one or more CAN frames

  31. DAQ as RTSI Master • Transmit CAN frame on RTSI input from DAQ • Synchronize to DAQ update clock for transmitting single frame or waveform • Timestamp RTSI trigger on RTSI input from DAQ • Synchronize to DAQ scan clock for data correlation • CAN read queue collects asynchronous CAN data as well as DAQ triggers

  32. Log Time stamp when DAQ sends RTSI Transmit CAN when DAQ sends RTSI node node node node node node LabVIEW Memory CAN1 DAQ1 DAQ 2 CAN2 DAQ 3 CAN3 CAN card ….. ….. } RTSI DAQ card AI/AO AI/AO AI Scan Clock or AO Clock Update DAQ Masters Synchronization Event CAN card RTSI DAQ card AI Scan Clock or AO Clock Update

  33. CAN as RTSI Master • Output RTSI trigger on receiving a CAN frame • DAQ uses RTSI signal as acquisition clock • Output RTSI trigger on transmission of CAN frame • similar to analog output from DAQ • Output RTSI trigger on demand • manual control via pushbutton

  34. node node node node node node CANcard RTSI DAQcard AI/AO AI/AO CAN Masters Synchronization Event Output RTSI on CAN frame received Output RTSI on CAN frame transmit Ack CAN card RTSI DAQ card

  35. Real- time capabilities with CAN

  36. NI-CAN and LabVIEW Real-Time • Applications: ECU testing, simulation, & validation • Develop on a PC with LabVIEW • Deploy on a PXI controller with LabVIEW Real-Time • No modification to your code • Supports synchronization of CAN and DAQ • Deterministic timing

  37. PC LabVIEW™ Real-Time CAN Architecture LabVIEW Front Panel Download (Ethernet) Controller Running LabVIEW-RT NI-CAN driver RTSI (Trigger) Bus on back plane CAN Interface DAQ Board PXI Chassis Shared Memory LabVIEW Application CAN Stack CAN Network

  38. Summary • Open standard used in: • Automotive • Public Transportation • Avionics • Military • CAN & DAQ synchronization – a must for validation • CAN + LabVIEW Real-Time = deterministic timing

  39. Useful Information • LabVIEW Starter Kits on NI’s Developer Zone • Go to “Development Library” then “Industrial Networks” • Or click here:CAN Starter Kits • Starter Kit examples: • CAN-DAQ Synchronization • CANdb for LabVIEW • SAE J1939

More Related