Search found 16 matches

by Terje
Tue 5. Jan 2021, 19:32
Forum: Linux
Topic: ReadWriteEvent example
Replies: 6
Views: 405

Re: ReadWriteEvent example

Hi Heidemann. More tests are done. I got the interrupt working. But I have not done any long tests and timing checking yet. But I do still have an issue. I'm not familiar with using sigaction. I need to figure out how to send in a pointer (* user_data) so I can avoid using global variables. Do you h...
by Terje
Sun 3. Jan 2021, 12:56
Forum: Linux
Topic: ReadWriteEvent example
Replies: 6
Views: 405

Re: ReadWriteEvent example

Hi again. Just want to add in that I have tested a lot and can't et an reliabile 100mS(+/-5mS) message. The solution in the code works well for a few hours. Then I start to gett Status 0x80 TxQueueFull ?? The receiving computer is holding the queues empty, and also measure the time between every mes...
by Terje
Thu 31. Dec 2020, 15:47
Forum: Linux
Topic: ReadWriteEvent example
Replies: 6
Views: 405

Re: ReadWriteEvent example

Thank you for your advice. I have now made an example of EventRead & Write to CAN. The code is hopefully easy to follow. I did not use a interrupt. I think it is good enough just to loop with a 100mS delay. I think the tolerance will be +/- 1% of the delay. I also used fork instead of threads and a ...
by Terje
Wed 30. Dec 2020, 21:15
Forum: Linux
Topic: ReadWriteEvent example
Replies: 6
Views: 405

ReadWriteEvent example

Hi. There are a few code examples for C in the pcanbasic api package. ReadEvent, WriteEvent. But I'm missing the ReadWriteEvent example. I patched the examples together. The added code is not tested. But I have tested a similar code earlier with none working result. The question is,, Is this the cor...
by Terje
Wed 28. Oct 2020, 11:40
Forum: PCAN-Basic
Topic: Multi-CAN interface
Replies: 4
Views: 617

Re: Multi-CAN interface

Hi. Thanks for a quick answer. I based my code on your program example pcan event read. Anyways I tested threads. One thread-process for each can-interface. Every thread would occupy one core to almost 100% cpu. I don't think select and treads works together well. Anyways, I have now changed the cod...
by Terje
Wed 28. Oct 2020, 06:44
Forum: PCAN-Basic
Topic: Multi-CAN interface
Replies: 4
Views: 617

Re: Multi-CAN interface

Linux can driver 8.10.2 64-Bit.
PEAK Basic API 4.4.0 .
Ubuntu 20.04.1 LTS 64-Bit
The computer is an Intel i5. with 6 cores.
8MB of memory. 480GB MM2 drive.
Two PCAN-USB x 6 IPEH-004064.

Is there any input cache in the PCAN-USBx6 Device?
Does the drivers have any cache? or queue?

/Terje.
by Terje
Mon 26. Oct 2020, 16:15
Forum: PCAN-Basic
Topic: Multi-CAN interface
Replies: 4
Views: 617

Multi-CAN interface

Hi. I'm wondering if you have any good advice to me. I'm writing a program for a Linux-computer which should read data from 12 USB-CAN channels (2x PCAN-USB FDx6). I'm ready with my code and it works perfect. BUT,, I have coded using threads in C . That has resulted in 100% loaded CPU-cores (all six...
by Terje
Mon 26. Oct 2020, 15:58
Forum: Linux
Topic: Pcan drivers gone
Replies: 5
Views: 710

Re: Pcan drivers gone

It solved the issue.

Thanks.
by Terje
Fri 16. Oct 2020, 12:20
Forum: Linux
Topic: Pcan drivers gone
Replies: 5
Views: 710

Re: Pcan drivers gone

Hi. Drivers taken from your online DVD Drivers/PCAN-USB Hub Serial Driver/Linux/libftd2xx-x86_64-1.4.6.tgz And the PCAN Basic I've got from you by email. In tuesday this week all was ok. Yesterday, Thursday it failed to load the drivers. Don't think there has been any update. I'm running Ubuntu om a...
by Terje
Fri 16. Oct 2020, 08:00
Forum: Linux
Topic: Pcan drivers gone
Replies: 5
Views: 710

Pcan drivers gone

Hi. I have during the last weeks coded C i Linux with IPEH-002021. Driver 1.4.6 64-Bit. PEAK Basic API 4.4.0 . Ubuntu 20.04.1 LTS 64-Bit Suddenly the drivers wont load any more. pcan device does not show up using > sudo lsmod No information using > cat /proc/pcan But I can see the cable attached usi...