Page 1 of 1

Messages order in trace

Posted: Thu 23. Apr 2020, 13:27
by waszniowski
I have saved the following trace from PCAN-View:

Code: Select all

;$FILEVERSION=2.0
;$STARTTIME=43944.426755081
;$COLUMNS=N,O,T,I,d,l,D
;
;   D:\PRJ\BasicSw\XCP\tmp\200421\CfgDAQ while Running ERR_SEQUENCE.trc
;   Start time: 23.4.2020 10:14:31.639.0
;   Generated by PCAN-View v4.2.4.564
;-------------------------------------------------------------------------------
;   Connection                 Bit rate
;   PCANLight_USB_16@pcan_usb  250 kBit/s
;-------------------------------------------------------------------------------
;   Message   Time    Type ID     Rx/Tx
;   Number    Offset  |    [hex]  |  Data Length
;   |         [ms]    |    |      |  |  Data [hex] ...
;   |         |       |    |      |  |  |
;---+-- ------+------ +- --+----- +- +- +- +- -- -- -- -- -- -- --
.....
   6155     22455.965 DT 00000200 Rx 8  06 22 22 05 02 02 02 02 
   6156     22456.325 DT 00000200 Rx 2  FD 06 
   6157     22456.874 DT 00000002 Rx 8  77 01 BC 37 4B 44 22 22 
   6158     22458.178 DT 00000100 Rx 8  EF 20 13 14 15 16 17 18  -------<-- MESSAGE 1
   6159     22457.270 DT 00000200 Rx 3  FE 29 20  ----------------------<-- MESSAGE 2
   6160     22457.798 DT 00000200 Rx 7  02 BC 37 4B 44 02 02 
   6161     22458.158 DT 00000200 Rx 2  FD 06 
   6162     22458.710 DT 00000002 Rx 8  96 01 BD 37 4B 44 22 22
Please, notice that the MESSAGE 1 that is written before MESSAGE 2 has higher time offset.

Can anybody explain why?
Which message was earlier on CAN bus? MESSAGE 1 (because it was written first) or MESSAGE 2 (because it has smaller time offset)?

Details of my configuration:
PCAN-USB FD device, Windows 7, PCAN-View v4.2.4.564
There is a C# application (running on the same PC as PCAN-View) accessing PCAN-USB FD via PCAN-Basic API. This application transmit messages with ID 00000100 (MESSAGE 1).
All other messages (MESSAGE 2,...) are transmitted by other HW device (microcontroller).

Thanks.
Libor Waszniowski

Re: Messages order in trace

Posted: Thu 23. Apr 2020, 13:58
by M.Heidemann
Hello,

Thank you for your request.

This behaviour is due to the internal connection of PCAN-View to the driver interface.

It will cause the transmitted messages or your PCANBasic application to be logged instantly, before they are sent on the real CAN-bus.

External devices will not be affected by this, you could test this by generating a trace from another PCAN-USB interface on your CAN-bus.


Best Regards

Marvin

Re: Messages order in trace

Posted: Thu 23. Apr 2020, 14:22
by waszniowski
Thanks for your fast reply.
So in my case, message MESSAGE 2 was earlier on CAN bus because it has smaller time offset.