QSerialBus Peakcan timestamp
-
Garza 45 minutes ago
Hello, I use the QCAN Bus example using the peakCAN plug in, I get the time stamps in this format: 1636718852.0344
When I convert it to human readable time I get: 2021-11-12 13:07:32.03440
this time is incorrect since the correct time should correspond approximately to this time:
Nov 12, 12:58 2021I am doing the conversion with this python code:
s=1636718852.0344
print(datetime.datetime.fromtimestamp(s).strftime('%Y-%m-%d %H:%M:%S.%f'))Do you know what I am doing wrong? thanks
-
actually by running the CAN bus example and selection the peak plug in, the time stamps are completely incorrect. As an example:
this what I get on the received CAN messages:
636722718.8972 --- 403 [8] CD 20 81 01 80 C6 01 00
1636722778.4908 --- 400 [8] A8 03 41 25 00 80 01 00
1636722778.7361 --- 401 [8] C6 C0 01 7B 03 D8 0D 00
1636722778.9883 --- 401 [8] 1F 37 6F 01 A0 CF 01 00
1636722779.2386 --- 402 [8] 28 C1 01 37 04 D8 0D 00
1636722779.3807 --- 402 [8] D9 27 7B 01 40 E5 01 00
1636722779.6189 --- 403 [8] 8E C1 C1 7C 03 D8 0D 00
1636722779.8662 --- 403 [8] CF 20 7F 01 A0 C6 01 00 check this ends with 79
1636722840.4878 --- 400 [8] B7 83 41 25 00 80 01 00 then this should be: 1636722780
1636722840.7341 --- 401 [8] C6 C0 01 7B 03 D8 0D 00
1636722840.9823 --- 401 [8] 1F 37 6D 01 A0 CF 01 00 from here
1636722841.2326 --- 402 [8] 28 C1 01 37 04 D8 0D 00 to here is ok: +1 sec
1636722841.4408 --- 402 [8] D9 27 7B 01 40 E5 01 00
1636722841.6790 --- 403 [8] 8E C1 C1 7C 03 D8 0D 00
1636722841.9273 --- 403 [8] CF 20 7F 01 A0 C6 01 00this is repeats continuously and the time jump varies.
Do you know what is the cause?
If I ask by peak, they already told me to ask you, and you refer me to them, so I don't know really where to ask.
Thanks for the supportAditional example:
1636722374.5148 --- 403 [8] D3 20 81 01 40 C9 01 00 jump from 74
1636722435.9223 --- 400 [8] B8 83 DD 28 00 80 01 00 to 35
1636722436.0183 --- 401 [8] C6 C0 01 7B 03 D8 0D 00
1636722436.0224 --- 401 [8] 1F 37 6F 01 40 CF 01 00
1636722436.0254 --- 402 [8] 26 C1 41 38 04 D8 0D 00
1636722436.0284 --- 402 [8] A5 27 7B 01 20 DF 01 00
1636722437.0744 --- 403 [8] 8E C1 81 7C 03 D8 0D 00
1636722437.3126 --- 403 [8] D5 20 81 01 E0 CB 01 00 jump from 37
1636722495.8051 --- 400 [8] C7 03 DE 28 00 80 01 00 to 95
1636722495.9303 --- 401 [8] C6 C0 01 7B 03 D8 0D 00
1636722495.9343 --- 401 [8] 1F 37 6F 01 40 CF 01 00
1636722495.9373 --- 402 [8] 26 C1 41 38 04 D8 0D 00
1636722495.9413 --- 402 [8] A3 27 7B 01 C0 DE 01 00
1636722496.9783 --- 403 [8] 8C C1 41 7C 03 D8 0D 00
1636722497.2185 --- 403 [8] DB 20 81 01 C0 CE 01 00