-
-
Notifications
You must be signed in to change notification settings - Fork 74
Description
I’m using pyxcp-0.22.30 in DAQ mode to read ECU measurements from the XCPlite (sin, ramp) thrugh UDP, localhost:5555, but I’m observing a consistent delay of ~60ms every few readings, likely due to buffering or ODT alignment. I need real-time data with minimal latency (no buffering).
RESULTS:
DAQ: [-89.47944519652036, 30800]
sw Δt = 0.061028 s <-- ~60ms
DAQ: [-87.9703023027843, 30801]
sw Δt = 0.000118 s
DAQ: [-86.32179748941594, 30802]
sw Δt = 0.000073 s
DAQ: [-84.67834102928106, 30803]
sw Δt = 0.000067 s
DAQ: [-82.96020441965837, 30804]
sw Δt = 0.061525 s <-- ~60ms
DAQ: [-81.06045530220246, 30805]
sw Δt = 0.000162 s
DAQ: [-79.12423173563438, 30806]
sw Δt = 0.000077 s
DAQ: [-77.11963286955341, 30807]
sw Δt = 0.000053 s
DAQ: [-75.06745117118118, 30808]
sw Δt = 0.061665 s <-- ~60ms
DAQ: [-72.85943196690958, 30809]
sw Δt = 0.000302 s
DAQ: [-70.60426521015314, 30810]
sw Δt = 0.000091 s
DAQ: [-68.25796963782166, 30811]
sw Δt = 0.000069 s
DAQ: [-65.83768589039937, 30812]
sw Δt = 0.061501 s <-- ~60ms
DAQ: [-63.409210402584485, 30813]
sw Δt represents the elapsed time between two consecutive measurements. In theory, XCPlite’s "mainloop" should sample every 10 ms, but in DAQ mode I’m seeing a consistent pattern of four readings:
- Three samples arrive almost instantaneously (~0.05–0.1 ms apart, instead of 10 ms).
- The fourth sample is delayed by roughly 60 ms.
This repeats every four readings, which strongly suggests DAQ is buffering four 10 ms samples internally and then sending them in one burst.
If the data were truly sent in real time, the ECU’s packet counter would jump by several counts on the delayed transmission (reflecting the missed 10 ms intervals), yet it only increments by one.
By contrast, when I switch to simple polling mode, the ramp signal advances by 100 counts per second (one sample every 10 ms), confirming that the ECU can deliver data at the required rate—so the buffering must be occurring within the DAQ/ODT stack.
Questions for the Developer: Is there a hidden config parameter to disable DAQ buffering entirely?