Search found 5 matches

by aMatosic
Wed 15. Nov 2023, 09:39
Forum: PCAN-PCI Express
Topic: PCI express not receiving messages
Replies: 1
Views: 5780

PCI express not receiving messages

Hi,

I am using a dual channel PCI express device to receive messages from a CAN FD device which transmits messages repeatedly. When I use PCAN-view to initialize the device everything works fine and all messages are received and displayed. But I am developing my own tool for that and ran into some ...
by aMatosic
Fri 23. Jun 2023, 08:54
Forum: PCAN-Basic
Topic: Timestamp value has a delay
Replies: 8
Views: 12142

Re: Timestamp value has a delay

Hi,

Sorry for the delayed response, I implemented the timestamps similar to the example code that you sent. The QueryPerformanceCounter seems to have solved all my issues. Thank you very much for your help and advice.

I only noticed one small detail while running your example, the "Up time" in the ...
by aMatosic
Mon 12. Jun 2023, 10:42
Forum: PCAN-Basic
Topic: Timestamp value has a delay
Replies: 8
Views: 12142

Re: Timestamp value has a delay

I tried using the performance counter, I wrote this snippet just to check if there is an offset.


var peakTime = TimeSpan.FromMicroseconds(timestamp.micros + (1000UL * timestamp.millis) + (0x100000000UL * 1000UL * timestamp.millis_overflow));

var uptime = new PerformanceCounter("System", "System ...
by aMatosic
Fri 9. Jun 2023, 13:49
Forum: PCAN-Basic
Topic: Timestamp value has a delay
Replies: 8
Views: 12142

Re: Timestamp value has a delay

Thank you for your reponse and for spotting that my timestamps were inacurate in the miliseconds range.

But the accuracy in the milisecond range is not my main concern here. The big problem is the unpredictable behaviour of the pcan timestamp. It returns the wrong wrong time elapsed from the system ...
by aMatosic
Tue 6. Jun 2023, 10:42
Forum: PCAN-Basic
Topic: Timestamp value has a delay
Replies: 8
Views: 12142

Timestamp value has a delay

I am using Windows 10, C# and PCAN Basic API dll 4.4

I have software which needs to get the timestamp of the received CAN message. The timestamp should be the time measured from the initialization of the CAN interface. I understand that the TPCANTimestamp gives the time elapsed from the booting of ...