LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Robust CAN Electrical Measurements in LabVIEW — Handling Ringing and Overshoot with PXIe-5111

 

Hello NI Community,

I am developing an automated CAN physical layer validation system in LabVIEW using a PXIe-5111 oscilloscope. The goal is to validate CAN electrical characteristics against ISO 11898-2.

Test Setup

  • Oscilloscope: NI PXIe-5111

  • Driver: NI-SCOPE in labview

  • CAN speed: 250 kbps (Classical CAN, ISO 11898-2)

  • CH0 → CAN_H

  • CH1 → CAN_L

  • Probe: 10x passive probe, 1 MΩ input impedance

Acquisition Settings

  • Sample rate: 10 MS/s

  • Record length: 50,000 samples

  • Trigger: Rising edge on CH0 at 3.0V


Measurements Being Performed

I am currently validating:

1. Bus Voltage Levels

  • CAN_H dominant/recessive

  • CAN_L dominant/recessive

  • Differential voltage (Vdiff)

2. Differential Signal Characteristics

  • Peak dominant Vdiff

  • Recessive Vdiff floor

  • Peak-to-peak differential amplitude

Thresholds are derived from ISO 11898-2:2024:

  • Table 3 → recessive state

  • Table 5 → dominant state


Current Measurement Method

My current LabVIEW flow is:

  1. Initialize NI-SCOPE

  2. Configure vertical/horizontal timing

  3. Configure analog edge trigger

  4. Acquire CAN_H and CAN_L waveforms

  5. Extract Y arrays

  6. Use:

    • Array Max → dominant levels

    • Array Min → recessive levels

  7. Compute:

    • Vdiff = CAN_H − CAN_L

  8. Compare against ISO thresholds

  9. Generate PASS/FAIL result


Problem Encountered

The issue is that CAN edges contain ringing and overshoot artifacts.

Because I am using raw Array Max and Array Min, even a single transient sample can corrupt the measurement.

Example:

  • True dominant CAN_H level ≈ 3.65V

  • One ringing spike reaches 4.10V

  • Array Max reports 4.10V

Similarly:

  • Recessive ringing can briefly drive Vdiff slightly negative

  • Array Min then produces false failures

So the measurement becomes sensitive to edge artifacts rather than representing the steady-state bus condition intended by ISO 11898-2.


Approaches I Am Considering

1. Percentile-Based Measurement

Use a percentile (95th/99th) instead of raw max/min.

Pros:

  • Simple implementation

  • Rejects isolated spikes

Concern:

  • Percentile selection feels somewhat arbitrary for compliance testing


2. Histogram / Cluster-Based Measurement

Use histogram analysis to identify dominant and recessive voltage clusters, then calculate the mean of each cluster.

Pros:

  • Physically representative

  • Similar to oscilloscope statistical measurements

Concern:

  • More implementation complexity


3. Threshold-Masked Mean (Current Preferred Approach)

Create a dominant-state mask using:

  • Vdiff > 0.9V

Then:

  • Extract only confirmed dominant samples

  • Compute mean CAN_H / CAN_L values from masked samples

This naturally excludes:

  • recessive bits

  • transitions

  • ringing regions

This feels closest to measuring the actual steady-state dominant bus voltage.


4. NI-SCOPE Built-In Measurements

Use NI-SCOPE scalar measurements such as:

  • VOLTAGE_HIGH

  • VOLTAGE_LOW

I understand these internally use histogram/statistical methods.

However, I am unsure whether they are appropriate for a two-state CAN waveform versus a more traditional periodic digital waveform.


Questions

  1. For CAN electrical compliance measurements, which methodology is generally considered most appropriate?

  2. Are NI-SCOPE measurements like VOLTAGE_HIGH / VOLTAGE_LOW suitable for CAN waveforms with dominant/recessive states?

  3. Is the threshold-masked mean approach considered valid for ISO-oriented automated testing?

  4. Has anyone implemented a similar CAN physical-layer validation system using PXI hardware and NI-SCOPE? If so, what measurement strategy did you use to avoid ringing-related false readings?

Any guidance or practical experience would be greatly appreciated.

Thank you.

0 Kudos
Message 1 of 1
(92 Views)