1

I am working with a CAN application and am having some timing issues. It seems there is some time delta between when my CAN message write function completes and when the CAN message is actually transmitted. So I want to measure the time between the two. The write function is in C++, so it's a simple call to GetTickCount to know when the write function completes. It's knowing when the actual transmission happens that's the problem.

I am using Vector's CANalyzer to monitor my CAN bus, and heard it has a programming interface (CAPL). What I would like to do is grab the PC clock time at which a message has actually been transmitted. Is there any system-CAPL interface that I could use to do this?

Bondolin
  • 2,793
  • 7
  • 34
  • 62

1 Answers1

0

It would be easier to measure the time in your C++ program. The CAN driver should provide some "TX confirmation callback function". The CAN driver calls this function as soon as the message has been successfully transmitted. You would need to configure the callback and to measure the time between your CAN write operation and this callback.

sergej
  • 17,147
  • 6
  • 52
  • 89
  • I agree this would be a better solution than my current setup, unfortunately I'm using a pretty high-level CAN interface that has no such confirmation callback. – Bondolin Apr 25 '17 at 14:14